mirror of https://github.com/ceph/ceph-ansible.git
34 lines
841 B
YAML
34 lines
841 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
|
|
service:
|
|
name: ceph-rgw@{{ ansible_hostname }}
|
|
state: disable
|
|
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 }}
|
|
state: started
|
|
enabled: yes
|
|
changed_when: false
|