mirror of https://github.com/ceph/ceph-ansible.git
infra: Fix ceph.conf creation when taking over existing cluster
Fixes bug introduced in https://github.com/ceph/ceph-ansible/pull/1330 The "stat ceph.conf" task was basically using the stat module on a string instead of the ceph.conf filename. This caused the "generate ceph configuration file" task to fail. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1463382 Signed-off-by: David Galloway <dgallowa@redhat.com>pull/2034/head
parent
fb9fa6c65f
commit
2e111221c1
|
@ -30,18 +30,18 @@
|
||||||
shell: |
|
shell: |
|
||||||
basename $(grep -R fsid /etc/ceph/ | egrep -o '^[^.]*')
|
basename $(grep -R fsid /etc/ceph/ | egrep -o '^[^.]*')
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: ceph_conf
|
register: cluster_name
|
||||||
|
|
||||||
- name: stat ceph.conf
|
- name: "stat {{ cluster_name.stdout }}.conf"
|
||||||
stat:
|
stat:
|
||||||
path: "{{ ceph_conf.stdout }}"
|
path: "/etc/ceph/{{ cluster_name.stdout }}.conf"
|
||||||
register: ceph_conf_stat
|
register: ceph_conf_stat
|
||||||
|
|
||||||
- name: generate ceph configuration file
|
- name: generate ceph configuration file
|
||||||
action: config_template
|
action: config_template
|
||||||
args:
|
args:
|
||||||
src: "roles/ceph-common/templates/ceph.conf.j2"
|
src: "roles/ceph-common/templates/ceph.conf.j2"
|
||||||
dest: "{{ ceph_conf.stdout }}"
|
dest: "/etc/ceph/{{ cluster_name.stdout }}.conf"
|
||||||
owner: "{{ ceph_conf_stat.stat.pw_name }}"
|
owner: "{{ ceph_conf_stat.stat.pw_name }}"
|
||||||
group: "{{ ceph_conf_stat.stat.gr_name }}"
|
group: "{{ ceph_conf_stat.stat.gr_name }}"
|
||||||
mode: "{{ ceph_conf_stat.stat.mode }}"
|
mode: "{{ ceph_conf_stat.stat.mode }}"
|
||||||
|
|
Loading…
Reference in New Issue