Merge pull request #300 from leseb/rgw-start-rhel

Fixes rgw and mon startup on red hat
pull/302/head
Leseb 2015-06-30 19:20:40 +02:00
commit 8a493af632
2 changed files with 12 additions and 26 deletions

View File

@ -12,18 +12,6 @@
when: ansible_distribution == "Ubuntu"
changed_when: false
- name: activate monitor with sysvinit
file: >
path=/var/lib/ceph/mon/ceph-{{ ansible_hostname }}/{{ item }}
state=touch
owner=root
group=root
mode=0600
with_items:
- done
- sysvinit
when: ansible_distribution != "Ubuntu"
- name: start and add that the monitor service to the init sequence (Ubuntu)
service: >
name=ceph-mon
@ -32,14 +20,18 @@
args="id={{ ansible_hostname }}"
when: ansible_distribution == "Ubuntu"
# NOTE (leseb): somehow the service ansible module is messing things up
# as a safety measure we run the raw command
- name: start and add that the monitor service to the init sequence
service: >
name=ceph
state=started
enabled=yes
args=mon
command: service ceph start mon
when: ansible_distribution != "Ubuntu"
- name: collect admin and bootstrap keys
command: ceph-create-keys --id {{ ansible_hostname }}
changed_when: false
failed_when: false
when: ansible_os_family == 'RedHat'
- name: get Ceph monitor version
shell: ceph daemon mon."{{ ansible_hostname }}" version | cut -d '"' -f 4 | cut -f 1,2 -d '.'
changed_when: false

View File

@ -1,10 +1,8 @@
---
# NOTE (leseb): if we don't perform this check Ansible will start multiple instance of radosgw
- name: check if RGW is started
command: /etc/init.d/radosgw status
changed_when: false
ignore_errors: true
register: rgwstatus
ignore_errors: true
- name: start RGW
command: /etc/init.d/radosgw start
@ -14,13 +12,9 @@
ansible_os_family != 'RedHat'
- name: start RGW
service: >
name=radosgw-all
state=started
service: name=radosgw-all state=started
when: ansible_distribution == "Ubuntu"
- name: start RGW
service: >
name=ceph-radosgw
state=started
service: name=ceph-radosgw state=started
when: ansible_os_family == 'RedHat'