mirror of https://github.com/ceph/ceph-ansible.git
Use systemd module instead of service.
Using systemd module allows us to do in one task what we did in three tasks: - enable unit file, - issue a `daemon-reload`, - start the service Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/1967/head
parent
deb5d3ba1f
commit
466f6f35b7
|
@ -8,19 +8,10 @@
|
|||
group: "root"
|
||||
mode: "0644"
|
||||
|
||||
- name: enable systemd unit file for mds instance
|
||||
shell: systemctl enable ceph-mds@{{ ansible_hostname }}.service
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
|
||||
- name: reload systemd unit files
|
||||
shell: systemctl daemon-reload
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: systemd start mds container
|
||||
service:
|
||||
systemd:
|
||||
name: ceph-mds@{{ ansible_hostname }}
|
||||
state: started
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
changed_when: false
|
||||
|
|
|
@ -8,19 +8,10 @@
|
|||
group: "root"
|
||||
mode: "0644"
|
||||
|
||||
- name: enable systemd unit file for mgr instance
|
||||
shell: systemctl enable ceph-mgr@{{ ansible_hostname }}.service
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
|
||||
- name: reload systemd unit files
|
||||
shell: systemctl daemon-reload
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: systemd start mgr container
|
||||
service:
|
||||
systemd:
|
||||
name: ceph-mgr@{{ ansible_hostname }}
|
||||
state: started
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
changed_when: false
|
||||
|
|
|
@ -49,19 +49,10 @@
|
|||
group: "root"
|
||||
mode: "0644"
|
||||
|
||||
- name: enable systemd unit file for mon instance
|
||||
shell: systemctl enable ceph-mon@{{ ansible_hostname }}.service
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
|
||||
- name: reload systemd unit files
|
||||
shell: systemctl daemon-reload
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: systemd start mon container
|
||||
service:
|
||||
systemd:
|
||||
name: ceph-mon@{{ ansible_hostname }}
|
||||
state: started
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
changed_when: false
|
||||
|
|
|
@ -28,19 +28,11 @@
|
|||
group: "root"
|
||||
mode: "0644"
|
||||
|
||||
- name: enable systemd unit file for osd instance
|
||||
shell: systemctl enable ceph-osd@{{ item | basename }}.service
|
||||
changed_when: false
|
||||
with_items: "{{ devices }}"
|
||||
|
||||
- name: reload systemd unit files
|
||||
shell: systemctl daemon-reload
|
||||
changed_when: false
|
||||
|
||||
- name: systemd start osd container
|
||||
service:
|
||||
systemd:
|
||||
name: ceph-osd@{{ item | basename }}
|
||||
state: started
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
changed_when: false
|
||||
with_items: "{{ devices }}"
|
||||
|
|
|
@ -9,19 +9,10 @@
|
|||
group: "root"
|
||||
mode: "0644"
|
||||
|
||||
- name: enable systemd unit file for rbd mirror instance
|
||||
command: systemctl enable ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}.service
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
|
||||
- name: reload systemd unit files
|
||||
command: systemctl daemon-reload
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: systemd start rbd mirror container
|
||||
service:
|
||||
systemd:
|
||||
name: ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}
|
||||
state: started
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
changed_when: false
|
||||
|
|
Loading…
Reference in New Issue