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

33 lines
770 B
YAML
Raw Normal View History

---
- 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
2015-10-19 11:19:31 +08:00
service:
name: radosgw
args: id=rgw.{{ ansible_hostname }}
state: started
when: ansible_distribution == 'Ubuntu'
- name: start rgw on red hat
2015-10-19 11:19:31 +08:00
service:
name: ceph-radosgw
state: started
enabled: yes
when: ansible_os_family == 'RedHat'