2016-12-09 21:51:35 +08:00
|
|
|
---
|
2017-03-15 20:32:30 +08:00
|
|
|
- name: create ceph conf directory and assemble directory
|
2016-12-09 21:51:35 +08:00
|
|
|
file:
|
2017-03-15 20:32:30 +08:00
|
|
|
path: "{{ item }}"
|
2016-12-09 21:51:35 +08:00
|
|
|
state: directory
|
2017-01-20 17:14:35 +08:00
|
|
|
owner: "ceph"
|
|
|
|
group: "ceph"
|
|
|
|
mode: "0755"
|
2017-03-15 20:32:30 +08:00
|
|
|
with_items:
|
|
|
|
- /etc/ceph/
|
|
|
|
- /etc/ceph/ceph.d/
|
2016-12-09 21:51:35 +08:00
|
|
|
|
2017-06-02 16:06:19 +08:00
|
|
|
- name: template ceph_conf_overrides
|
|
|
|
local_action: copy content="{{ ceph_conf_overrides }}" dest=/tmp/ceph_conf_overrides_temp
|
|
|
|
run_once: true
|
|
|
|
|
|
|
|
- name: get rendered ceph_conf_overrides
|
|
|
|
local_action: set_fact ceph_conf_overrides_rendered="{{ lookup('template', '/tmp/ceph_conf_overrides_temp') | from_yaml }}"
|
|
|
|
run_once: true
|
|
|
|
|
2016-12-08 01:22:39 +08:00
|
|
|
- name: "generate ceph configuration file: {{ cluster }}.conf"
|
2016-12-09 21:51:35 +08:00
|
|
|
action: config_template
|
|
|
|
args:
|
|
|
|
src: ceph.conf.j2
|
2017-03-15 20:32:30 +08:00
|
|
|
dest: /etc/ceph/ceph.d/{{ cluster }}.conf
|
2017-01-20 17:14:35 +08:00
|
|
|
owner: "ceph"
|
|
|
|
group: "ceph"
|
|
|
|
mode: "0644"
|
2017-06-02 16:06:19 +08:00
|
|
|
config_overrides: "{{ ceph_conf_overrides_rendered }}"
|
2016-12-09 21:51:35 +08:00
|
|
|
config_type: ini
|
2017-03-15 20:32:30 +08:00
|
|
|
|
|
|
|
- name: assemble {{ cluster }}.conf and fragments
|
|
|
|
assemble:
|
|
|
|
src: /etc/ceph/ceph.d/
|
|
|
|
dest: /etc/ceph/{{ cluster }}.conf
|
2017-04-11 21:33:21 +08:00
|
|
|
regexp: "^(({{cluster}})|(osd)).conf$"
|
2017-03-15 20:32:30 +08:00
|
|
|
owner: "ceph"
|
|
|
|
group: "ceph"
|
|
|
|
mode: "0644"
|
2016-12-09 21:51:35 +08:00
|
|
|
notify:
|
|
|
|
- restart ceph mons
|
|
|
|
- restart ceph osds
|
|
|
|
- restart ceph mdss
|
|
|
|
- restart ceph rgws
|
2016-09-22 23:03:14 +08:00
|
|
|
- restart ceph nfss
|