ceph-ansible/roles/ceph-rgw/tasks/docker/start_docker_rgw.yml

31 lines
829 B
YAML
Raw Normal View History

---
- name: generate systemd unit file
become: true
template:
src: "{{ role_path }}/templates/ceph-radosgw.service.j2"
dest: /etc/systemd/system/ceph-radosgw@.service
owner: "root"
group: "root"
mode: "0644"
# For backward compatibility
- name: disable old systemd unit ('ceph-rgw@'|'ceph-radosgw@radosgw.'|'ceph-radosgw@') if present
systemd:
name: "{{ item }}"
state: stopped
enabled: no
daemon_reload: yes
with_items:
- "ceph-rgw@{{ ansible_hostname }}"
- "ceph-radosgw@{{ ansible_hostname }}.service"
- "ceph-radosgw@radosgw.{{ ansible_hostname }}.service"
ignore_errors: true
- name: systemd start rgw container
systemd:
name: "ceph-radosgw@rgw.{{ ansible_hostname }}.service"
state: started
enabled: yes
daemon_reload: yes
changed_when: false