2015-01-21 01:43:47 +08:00
|
|
|
---
|
2015-07-07 17:19:50 +08:00
|
|
|
- name: check if rgw is started
|
2015-01-21 01:43:47 +08:00
|
|
|
command: /etc/init.d/radosgw status
|
|
|
|
register: rgwstatus
|
2015-08-03 23:39:57 +08:00
|
|
|
changed_when: false
|
2015-07-29 00:21:15 +08:00
|
|
|
failed_when: false
|
2015-03-23 19:20:00 +08:00
|
|
|
|
2015-07-07 17:19:50 +08:00
|
|
|
- name: start rgw
|
2015-06-03 22:31:51 +08:00
|
|
|
command: /etc/init.d/radosgw start
|
2015-06-26 06:26:03 +08:00
|
|
|
when:
|
|
|
|
rgwstatus.rc != 0 and
|
|
|
|
ansible_distribution != "Ubuntu" and
|
|
|
|
ansible_os_family != 'RedHat'
|
2015-06-03 22:31:51 +08:00
|
|
|
|
2015-08-03 23:39:57 +08:00
|
|
|
- name: activate rgw on ubuntu
|
|
|
|
command: initctl emit radosgw cluster=ceph id=rgw.{{ ansible_hostname }}
|
|
|
|
changed_when: false
|
|
|
|
when: ansible_distribution == 'Ubuntu'
|
|
|
|
|
2015-07-07 19:48:37 +08:00
|
|
|
- name: start rgw on ubuntu
|
2015-10-19 11:19:31 +08:00
|
|
|
service:
|
|
|
|
name: radosgw
|
|
|
|
args: id=rgw.{{ ansible_hostname }}
|
|
|
|
state: started
|
2015-07-07 19:48:37 +08:00
|
|
|
when: ansible_distribution == 'Ubuntu'
|
2015-07-07 17:19:50 +08:00
|
|
|
|
2015-07-07 19:48:37 +08:00
|
|
|
- name: start rgw on red hat
|
2015-10-19 11:19:31 +08:00
|
|
|
service:
|
|
|
|
name: ceph-radosgw
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
2015-07-07 19:48:37 +08:00
|
|
|
when: ansible_distribution == 'RedHat'
|