rgw: refact start_docker_rgw.yml

remove usage of `shell` module in favor of `systemd` module.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/1872/head
Guillaume Abrioux 2017-09-16 23:36:29 +02:00
parent f4fc3bbfea
commit 6c9f3a08a7
1 changed files with 11 additions and 15 deletions

View File

@ -10,24 +10,20 @@
# For backward compatibility # For backward compatibility
- name: disable old systemd unit ('ceph-rgw@') if present - name: disable old systemd unit ('ceph-rgw@') if present
service: systemd:
name: ceph-rgw@{{ ansible_hostname }} name: "{{ item }}"
state: disable state: stopped
enabled: no
daemon_reload: yes
with_items:
- "ceph-rgw@{{ ansible_hostname }}"
- "ceph-radosgw@{{ ansible_hostname }}.service"
ignore_errors: true ignore_errors: true
- name: enable systemd unit file for rgw instance
shell: systemctl enable ceph-radosgw@{{ 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 rgw container - name: systemd start rgw container
service: systemd:
name: ceph-radosgw@{{ ansible_hostname }} name: "ceph-radosgw@rgw.{{ ansible_hostname }}.service"
state: started state: started
enabled: yes enabled: yes
daemon_reload: yes
changed_when: false changed_when: false