diff --git a/roles/ceph-rgw/tasks/docker/start_docker_rgw.yml b/roles/ceph-rgw/tasks/docker/start_docker_rgw.yml index 3bce3d4fe..d81a6c669 100644 --- a/roles/ceph-rgw/tasks/docker/start_docker_rgw.yml +++ b/roles/ceph-rgw/tasks/docker/start_docker_rgw.yml @@ -10,24 +10,20 @@ # For backward compatibility - name: disable old systemd unit ('ceph-rgw@') if present - service: - name: ceph-rgw@{{ ansible_hostname }} - state: disable + systemd: + name: "{{ item }}" + state: stopped + enabled: no + daemon_reload: yes + with_items: + - "ceph-rgw@{{ ansible_hostname }}" + - "ceph-radosgw@{{ ansible_hostname }}.service" 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 - service: - name: ceph-radosgw@{{ ansible_hostname }} + systemd: + name: "ceph-radosgw@rgw.{{ ansible_hostname }}.service" state: started enabled: yes + daemon_reload: yes changed_when: false