ceph-ansible/roles/ceph-rgw/tasks/start_radosgw.yml

44 lines
1.0 KiB
YAML

---
- name: check if rgw is started
command: /etc/init.d/radosgw status
register: rgwstatus
changed_when: false
failed_when: false
- name: start rgw
command: /etc/init.d/radosgw start
when:
rgwstatus.rc != 0 and
ansible_distribution != "Ubuntu" and
ansible_os_family != 'RedHat'
- name: activate rgw on ubuntu
command: initctl emit radosgw cluster=ceph id=rgw.{{ ansible_hostname }}
changed_when: false
when: ansible_distribution == 'Ubuntu'
- name: start rgw on ubuntu
service:
name: radosgw
args: id=rgw.{{ ansible_hostname }}
state: started
when: ansible_distribution == 'Ubuntu'
- name: start rgw on red hat (before or on infernalis)
service:
name: ceph-radosgw
state: started
enabled: yes
when:
ansible_os_family == 'RedHat' and
not is_ceph_infernalis
- name: start rgw on red hat (after infernalis)
service:
name: ceph-radosgw@rgw.{{ ansible_hostname }}
state: started
enabled: yes
when:
ansible_os_family == 'RedHat' and
is_ceph_infernalis