Using ini_file with ansible_hostname to ensure each INI block gets the rgw_zone setting in a multi-RGW setup. Also, ansible_hostname better matches what ceph-common does for the actual hostname (ansible_host != ansible_hostname under all conditions).

pull/1278/head
Chris Wells 2017-01-28 12:30:27 -05:00 committed by Sébastien Han
parent 57e6edff98
commit aac89e548d
1 changed files with 4 additions and 5 deletions

View File

@ -17,11 +17,10 @@
# 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