mirror of https://github.com/ceph/ceph-ansible.git
30 lines
729 B
YAML
30 lines
729 B
YAML
---
|
|
- 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@') if present
|
|
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: systemd start rgw container
|
|
systemd:
|
|
name: "ceph-radosgw@rgw.{{ ansible_hostname }}.service"
|
|
state: started
|
|
enabled: yes
|
|
daemon_reload: yes
|
|
changed_when: false
|