]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Using ini_file with ansible_hostname to ensure each INI block gets the rgw_zone setti... 1256/head
authorChris Wells <chris@nexcess.net>
Sat, 28 Jan 2017 17:30:27 +0000 (12:30 -0500)
committerChris Wells <chris@nexcess.net>
Sat, 28 Jan 2017 17:30:27 +0000 (12:30 -0500)
roles/ceph-rgw/tasks/multisite/main.yml

index 0dc6d94da096a83e39b79d3092f2c4dae2430354..2f7114a3dacd2a4cadb4db78d89fdabc115fbc9d 100644 (file)
 
 # Continue with common tasks
 - name: add zone to rgw stanza in ceph.conf
-  lineinfile:
+  ini_file:
     dest: "/etc/ceph/{{ cluster }}.conf"
-    regexp: "{{ ansible_host }}"
-    insertafter: "^[client.rgw.{{ ansible_host }}]"
-    line: "rgw_zone = {{ rgw_zone }}"
-    state: present
+    section: "client.rgw.{{ ansible_hostname }}"
+    option: "rgw_zone"
+    value: "{{ rgw_zone }}"
   notify:
     - restart rgw