From d11975800ceb98e7ee02d36a8ba5ac6af6a2bec8 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 13 Jul 2017 16:22:54 +0200 Subject: [PATCH] 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 --- roles/ceph-docker-common/tasks/fetch_configs.yml | 4 ++-- roles/ceph-mon/tasks/docker/copy_configs.yml | 2 +- roles/ceph-mon/tasks/docker/main.yml | 2 +- roles/ceph-nfs/tasks/docker/copy_configs.yml | 4 ++-- roles/ceph-rgw/tasks/docker/copy_configs.yml | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/ceph-docker-common/tasks/fetch_configs.yml b/roles/ceph-docker-common/tasks/fetch_configs.yml index ac432dd6c..b321b5495 100644 --- a/roles/ceph-docker-common/tasks/fetch_configs.yml +++ b/roles/ceph-docker-common/tasks/fetch_configs.yml @@ -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 diff --git a/roles/ceph-mon/tasks/docker/copy_configs.yml b/roles/ceph-mon/tasks/docker/copy_configs.yml index e5a684a96..53076e859 100644 --- a/roles/ceph-mon/tasks/docker/copy_configs.yml +++ b/roles/ceph-mon/tasks/docker/copy_configs.yml @@ -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 }}" diff --git a/roles/ceph-mon/tasks/docker/main.yml b/roles/ceph-mon/tasks/docker/main.yml index 1a2f99a05..f7d073d9d 100644 --- a/roles/ceph-mon/tasks/docker/main.yml +++ b/roles/ceph-mon/tasks/docker/main.yml @@ -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 }}" diff --git a/roles/ceph-nfs/tasks/docker/copy_configs.yml b/roles/ceph-nfs/tasks/docker/copy_configs.yml index 8101f2f95..21d2f86c2 100644 --- a/roles/ceph-nfs/tasks/docker/copy_configs.yml +++ b/roles/ceph-nfs/tasks/docker/copy_configs.yml @@ -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" diff --git a/roles/ceph-rgw/tasks/docker/copy_configs.yml b/roles/ceph-rgw/tasks/docker/copy_configs.yml index a05d638ae..fb5eee6ae 100644 --- a/roles/ceph-rgw/tasks/docker/copy_configs.yml +++ b/roles/ceph-rgw/tasks/docker/copy_configs.yml @@ -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 }}"