2015-07-28 23:35:47 +08:00
|
|
|
---
|
2016-06-01 03:59:05 +08:00
|
|
|
- name: generate systemd unit file
|
|
|
|
become: true
|
|
|
|
template:
|
2017-02-17 01:31:32 +08:00
|
|
|
src: "{{ role_path }}/templates/ceph-rgw.service.j2"
|
|
|
|
dest: /etc/systemd/system/ceph-rgw@.service
|
2016-06-01 03:59:05 +08:00
|
|
|
owner: "root"
|
|
|
|
group: "root"
|
|
|
|
mode: "0644"
|
|
|
|
|
|
|
|
- name: enable systemd unit file for rgw instance
|
2017-02-17 01:31:32 +08:00
|
|
|
shell: systemctl enable ceph-rgw@{{ ansible_hostname }}.service
|
2016-06-01 03:59:05 +08:00
|
|
|
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-rgw@{{ ansible_hostname }}
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
|
|
|
changed_when: false
|