Common: change path for fetch_directory

Some tasks fetch file to `{{ fetch_directory }}/docker_mon_files` and
then try to copy from `{{ fetch_directory }}/{{ fsid }}`. That causes
the playbook to fail.

Fixes: #1683

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/1677/head
Guillaume Abrioux 2017-07-13 16:22:54 +02:00
parent d0311c6aa3
commit d11975800c
5 changed files with 8 additions and 8 deletions

View File

@ -28,7 +28,7 @@
when: "{{ groups.get(mgr_group_name, []) | length > 0 }}"
- name: stat for ceph config and keys
local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}
local_action: stat path={{ fetch_directory }}/{{ fsid }}/{{ item }}
with_items: "{{ ceph_config_keys }}"
changed_when: false
become: false
@ -38,7 +38,7 @@
- name: try to fetch ceph config and keys
copy:
src: "{{ fetch_directory }}/docker_mon_files/{{ item.0 }}"
src: "{{ fetch_directory }}/{{ fsid }}/{{ item.0 }}"
dest: "{{ item.0 }}"
owner: root
group: root

View File

@ -2,7 +2,7 @@
- name: push ceph files to the ansible server
fetch:
src: "{{ item.0 }}"
dest: "{{ fetch_directory }}/docker_mon_files/{{ item.0 }}"
dest: "{{ fetch_directory }}/{{ fsid }}/{{ item.0 }}"
flat: yes
with_together:
- "{{ ceph_config_keys }}"

View File

@ -72,7 +72,7 @@
- name: push ceph mgr key(s)
fetch:
src: "{{ ceph_conf_key_directory }}/{{ cluster }}.mgr.{{ hostvars[item.item]['ansible_hostname'] }}.keyring"
dest: "{{ fetch_directory }}/docker_mon_files/{{ item.stat.path }}"
dest: "{{ fetch_directory }}/{{ fsid }}/{{ item.stat.path }}"
flat: yes
with_items:
- "{{ stat_mgr_keys.results }}"

View File

@ -7,7 +7,7 @@
- /var/lib/ceph/radosgw/keyring
- name: stat for config and keys
local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}
local_action: stat path={{ fetch_directory }}/{{ fsid }}/{{ item }}
with_items: "{{ ceph_config_keys }}"
changed_when: false
become: false
@ -17,7 +17,7 @@
- name: try to fetch config and keys
copy:
src: "{{ fetch_directory }}/docker_mon_files/{{ item.0 }}"
src: "{{ fetch_directory }}/{{ fsid }}/{{ item.0 }}"
dest: "{{ item.0 }}"
owner: "64045"
group: "64045"

View File

@ -12,7 +12,7 @@
- inventory_hostname == groups[rgw_group_name][0]
- name: stat for config and keys
local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}
local_action: stat path={{ fetch_directory }}/{{ fsid }}/{{ item }}
with_items: "{{ rgw_config_keys }}"
changed_when: false
become: false
@ -26,7 +26,7 @@
- name: push ceph files to the ansible server
fetch:
src: "{{ item.0 }}"
dest: "{{ fetch_directory }}/docker_mon_files/var/lib/ceph/radosgw/keyring"
dest: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/radosgw/keyring"
flat: yes
with_together:
- "{{ rgw_config_keys }}"