]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Simplify ceph.conf generation
authorAndy McCrae <andy.mccrae@gmail.com>
Mon, 12 Mar 2018 14:13:53 +0000 (14:13 +0000)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 15 Mar 2018 14:47:41 +0000 (15:47 +0100)
Since the approach to creating a ceph.conf file has changed, and now
no-longer relies on assembling config file fragments in /etc/ceph/ceph.d
we can avoid the conf_overrides rendering on the local host and skip out
the tasks related to that, instead using just the config_template task
to configure the file directly.

roles/ceph-config/tasks/main.yml

index b9dd05970ffed6ff01f3118fa2c485530c5ce2dc..51fb77fa0823ed7d2aa6716624b37d1720ffc211 100644 (file)
@@ -9,33 +9,6 @@
       group: "ceph"
       mode: "0755"
 
-  - name: template ceph_conf_overrides
-    copy:
-      content: "{{ ceph_conf_overrides }}"
-      dest: "/tmp/ceph_conf_overrides_temp_{{ ansible_hostname }}"
-
-  - name: copy tmp template file for ceph_conf_overrides to the ansible server
-    fetch:
-      src: "/tmp/ceph_conf_overrides_temp_{{ ansible_hostname }}"
-      dest: "{{ fetch_directory }}/{{ fsid }}/ceph_conf_overrides_temp_{{ ansible_hostname }}"
-      flat: yes
-
-  - name: get rendered ceph_conf_overrides
-    set_fact:
-      ceph_conf_overrides_rendered: "{{ lookup('template', '{{ fetch_directory }}/{{ fsid }}/ceph_conf_overrides_temp_{{ ansible_hostname }}') | from_yaml }}"
-
-  - name: remove tmp template file for ceph_conf_overrides
-    file:
-      path: "/tmp/ceph_conf_overrides_temp_{{ ansible_hostname }}"
-      state: absent
-
-  - name: remove tmp template file for ceph_conf_overrides (localhost)
-    local_action:
-      module: file
-      path: "{{ fetch_directory }}/{{ fsid }}/ceph_conf_overrides_temp_{{ ansible_hostname }}"
-      state: absent
-    become: false
-
   - name: "generate ceph configuration file: {{ cluster }}.conf"
     action: config_template
     args:
@@ -44,7 +17,7 @@
       owner: "ceph"
       group: "ceph"
       mode: "0644"
-      config_overrides: "{{ ceph_conf_overrides_rendered }}"
+      config_overrides: "{{ ceph_conf_overrides }}"
       config_type: ini
     notify:
       - restart ceph mons