Newer
Older
file:
path: /var/lib/ceph/mon/ceph-{{ ansible_hostname }}/{{ item }}
state: touch
owner: root
group: root
mode: 0600
with_items:
- done
- upstart
when: ansible_distribution == "Ubuntu"
- name: start and add that the monitor service to the init sequence (ubuntu)
service:
name: ceph-mon
state: started
enabled: yes
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
when: ansible_distribution != "Ubuntu"
- name: collect admin and bootstrap keys
command: ceph-create-keys --id {{ ansible_hostname }}
changed_when: false
failed_when: false
shell: ceph daemon mon."{{ ansible_hostname }}" version | cut -d '"' -f 4 | cut -f 1,2 -d '.'
failed_when: "'No such file or directory' in ceph_version.stderr"