2015-01-21 01:43:47 +08:00
|
|
|
---
|
2015-05-16 00:27:41 +08:00
|
|
|
# NOTE (leseb): if we don't perform this check Ansible will start multiple instance of radosgw
|
|
|
|
- name: check if RGW is started
|
2015-01-21 01:43:47 +08:00
|
|
|
command: /etc/init.d/radosgw status
|
2015-06-26 06:26:03 +08:00
|
|
|
changed_when: false
|
|
|
|
ignore_errors: true
|
2015-01-21 01:43:47 +08:00
|
|
|
register: rgwstatus
|
2015-03-23 19:20:00 +08:00
|
|
|
|
2015-06-03 22:31:51 +08:00
|
|
|
- name: start RGW
|
|
|
|
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-05-16 00:27:41 +08:00
|
|
|
- name: start RGW
|
2015-06-26 06:26:03 +08:00
|
|
|
service: >
|
|
|
|
name=radosgw-all
|
|
|
|
state=started
|
2015-03-23 19:20:00 +08:00
|
|
|
when: ansible_distribution == "Ubuntu"
|
2015-01-21 01:43:47 +08:00
|
|
|
|
2015-05-16 00:27:41 +08:00
|
|
|
- name: start RGW
|
2015-06-26 06:26:03 +08:00
|
|
|
service: >
|
|
|
|
name=ceph-radosgw
|
|
|
|
state=started
|
2015-06-03 22:31:51 +08:00
|
|
|
when: ansible_os_family == 'RedHat'
|