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" when: ansible_distribution == "Ubuntu"
changed_when: false 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) - name: start and add that the monitor service to the init sequence (Ubuntu)
service: > service: >
name=ceph-mon name=ceph-mon
@ -32,14 +20,18 @@
args="id={{ ansible_hostname }}" args="id={{ ansible_hostname }}"
when: ansible_distribution == "Ubuntu" 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 - name: start and add that the monitor service to the init sequence
service: > command: service ceph start mon
name=ceph
state=started
enabled=yes
args=mon
when: ansible_distribution != "Ubuntu" 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 - name: get Ceph monitor version
shell: ceph daemon mon."{{ ansible_hostname }}" version | cut -d '"' -f 4 | cut -f 1,2 -d '.' shell: ceph daemon mon."{{ ansible_hostname }}" version | cut -d '"' -f 4 | cut -f 1,2 -d '.'
changed_when: false 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 - name: check if RGW is started
command: /etc/init.d/radosgw status command: /etc/init.d/radosgw status
changed_when: false
ignore_errors: true
register: rgwstatus register: rgwstatus
ignore_errors: true
- name: start RGW - name: start RGW
command: /etc/init.d/radosgw start command: /etc/init.d/radosgw start
@ -14,13 +12,9 @@
ansible_os_family != 'RedHat' ansible_os_family != 'RedHat'
- name: start RGW - name: start RGW
service: > service: name=radosgw-all state=started
name=radosgw-all
state=started
when: ansible_distribution == "Ubuntu" when: ansible_distribution == "Ubuntu"
- name: start RGW - name: start RGW
service: > service: name=ceph-radosgw state=started
name=ceph-radosgw
state=started
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'