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:
|
2016-05-09 22:08:33 +08:00
|
|
|
- rgwstatus.rc != 0
|
|
|
|
- ansible_distribution != "Ubuntu"
|
|
|
|
- ansible_os_family != 'RedHat'
|
|
|
|
- not use_systemd
|
2015-06-03 22:31:51 +08:00
|
|
|
|
2016-03-29 21:37:31 +08:00
|
|
|
- name: start and add that the rados gateway service to the init sequence (ubuntu)
|
|
|
|
command: initctl emit radosgw cluster={{ cluster }} id=rgw.{{ ansible_hostname }}
|
2015-08-03 23:39:57 +08:00
|
|
|
changed_when: false
|
2016-03-29 21:37:31 +08:00
|
|
|
failed_when: false
|
2016-05-06 03:31:12 +08:00
|
|
|
when: not use_systemd
|
2015-07-07 17:19:50 +08:00
|
|
|
|
2015-11-21 05:34:29 +08:00
|
|
|
- name: start rgw on red hat (before or on infernalis)
|
2015-10-19 11:19:31 +08:00
|
|
|
service:
|
|
|
|
name: ceph-radosgw
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
2015-11-20 22:09:34 +08:00
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- ansible_os_family == 'RedHat'
|
|
|
|
- is_before_infernalis
|
2015-11-21 05:34:29 +08:00
|
|
|
|
2016-03-29 07:37:39 +08:00
|
|
|
- name: enable systemd unit file for rgw instance (for or after infernalis)
|
2016-05-14 02:19:29 +08:00
|
|
|
command: systemctl enable ceph-radosgw@rgw.{{ ansible_hostname }}
|
2016-03-29 07:37:39 +08:00
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- use_systemd
|
|
|
|
- is_after_hammer
|
2016-03-29 07:37:39 +08:00
|
|
|
|
2016-05-06 03:31:12 +08:00
|
|
|
- name: start rgw with systemd (for or after infernalis)
|
2015-11-21 05:34:29 +08:00
|
|
|
service:
|
2016-03-18 01:34:56 +08:00
|
|
|
name: ceph-radosgw@rgw.{{ ansible_hostname }}
|
2015-11-21 05:34:29 +08:00
|
|
|
state: started
|
|
|
|
enabled: yes
|
2015-11-20 22:09:34 +08:00
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- use_systemd
|
|
|
|
- is_after_hammer
|