From 7bb04a59707850be1b592129f3eb09d47c72bfab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 23 Jun 2017 16:16:06 +0200 Subject: [PATCH] docker: refactor followup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup on https://github.com/ceph/ceph-ansible/pull/1469 where we merged most of the container code from roles/ceph-*/task/docker/*.yml into roles/ceph-docker-common/tasks/ It seems that we forgot to remove the original files. Signed-off-by: Sébastien Han --- .../tasks/docker/dirs_permissions.yml | 11 ---- roles/ceph-mds/tasks/docker/fetch_configs.yml | 31 ------------ roles/ceph-mds/tasks/docker/selinux.yml | 14 ------ .../tasks/docker/dirs_permissions.yml | 12 ----- roles/ceph-mgr/tasks/docker/fetch_configs.yml | 43 ---------------- roles/ceph-mgr/tasks/docker/selinux.yml | 14 ------ .../tasks/docker/dirs_permissions.yml | 13 ----- roles/ceph-mon/tasks/docker/fetch_configs.yml | 50 ------------------- roles/ceph-mon/tasks/docker/selinux.yml | 14 ------ .../tasks/docker/dirs_permissions.yml | 24 --------- roles/ceph-nfs/tasks/docker/fetch_configs.yml | 37 -------------- roles/ceph-nfs/tasks/docker/selinux.yml | 17 ------- .../tasks/docker/dirs_permissions.yml | 11 ---- roles/ceph-osd/tasks/docker/fetch_configs.yml | 32 ------------ roles/ceph-osd/tasks/docker/selinux.yml | 14 ------ .../tasks/docker/dirs_permissions.yml | 10 ---- .../tasks/docker/fetch_configs.yml | 30 ----------- .../ceph-rbd-mirror/tasks/docker/selinux.yml | 13 ----- .../tasks/docker/dirs_permissions.yml | 13 ----- .../tasks/docker/fetch_configs.yml | 28 ----------- .../tasks/docker/dirs_permissions.yml | 11 ---- roles/ceph-rgw/tasks/docker/fetch_configs.yml | 28 ----------- roles/ceph-rgw/tasks/docker/selinux.yml | 14 ------ 23 files changed, 484 deletions(-) delete mode 100644 roles/ceph-mds/tasks/docker/dirs_permissions.yml delete mode 100644 roles/ceph-mds/tasks/docker/fetch_configs.yml delete mode 100644 roles/ceph-mds/tasks/docker/selinux.yml delete mode 100644 roles/ceph-mgr/tasks/docker/dirs_permissions.yml delete mode 100644 roles/ceph-mgr/tasks/docker/fetch_configs.yml delete mode 100644 roles/ceph-mgr/tasks/docker/selinux.yml delete mode 100644 roles/ceph-mon/tasks/docker/dirs_permissions.yml delete mode 100644 roles/ceph-mon/tasks/docker/fetch_configs.yml delete mode 100644 roles/ceph-mon/tasks/docker/selinux.yml delete mode 100644 roles/ceph-nfs/tasks/docker/dirs_permissions.yml delete mode 100644 roles/ceph-nfs/tasks/docker/fetch_configs.yml delete mode 100644 roles/ceph-nfs/tasks/docker/selinux.yml delete mode 100644 roles/ceph-osd/tasks/docker/dirs_permissions.yml delete mode 100644 roles/ceph-osd/tasks/docker/fetch_configs.yml delete mode 100644 roles/ceph-osd/tasks/docker/selinux.yml delete mode 100644 roles/ceph-rbd-mirror/tasks/docker/dirs_permissions.yml delete mode 100644 roles/ceph-rbd-mirror/tasks/docker/fetch_configs.yml delete mode 100644 roles/ceph-rbd-mirror/tasks/docker/selinux.yml delete mode 100644 roles/ceph-restapi/tasks/docker/dirs_permissions.yml delete mode 100644 roles/ceph-restapi/tasks/docker/fetch_configs.yml delete mode 100644 roles/ceph-rgw/tasks/docker/dirs_permissions.yml delete mode 100644 roles/ceph-rgw/tasks/docker/fetch_configs.yml delete mode 100644 roles/ceph-rgw/tasks/docker/selinux.yml diff --git a/roles/ceph-mds/tasks/docker/dirs_permissions.yml b/roles/ceph-mds/tasks/docker/dirs_permissions.yml deleted file mode 100644 index 40f159410..000000000 --- a/roles/ceph-mds/tasks/docker/dirs_permissions.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -- name: create bootstrap directories - file: - path: "{{ item }}" - state: directory - owner: "{{ bootstrap_dirs_owner }}" - group: "{{ bootstrap_dirs_group }}" - mode: "0755" - with_items: - - /etc/ceph/ - - /var/lib/ceph/bootstrap-mds diff --git a/roles/ceph-mds/tasks/docker/fetch_configs.yml b/roles/ceph-mds/tasks/docker/fetch_configs.yml deleted file mode 100644 index de922eef8..000000000 --- a/roles/ceph-mds/tasks/docker/fetch_configs.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -# NOTE (leseb): the mds container needs the admin key -# so it can create the mds pools for cephfs -- name: set config and keys paths - set_fact: - ceph_config_keys: - - /etc/ceph/{{ cluster }}.conf - - /etc/ceph/{{ cluster }}.client.admin.keyring - - /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring - -- name: stat for ceph config and keys - local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }} - with_items: "{{ ceph_config_keys }}" - changed_when: false - become: false - failed_when: false - always_run: true - register: statconfig - -- name: try to fetch ceph config and keys - copy: - src: "{{ fetch_directory }}/docker_mon_files/{{ item.0 }}" - dest: "{{ item.0 }}" - owner: root - group: root - mode: 0644 - changed_when: false - with_together: - - "{{ ceph_config_keys }}" - - "{{ statconfig.results }}" - when: item.1.stat.exists == true diff --git a/roles/ceph-mds/tasks/docker/selinux.yml b/roles/ceph-mds/tasks/docker/selinux.yml deleted file mode 100644 index 6d4ee022f..000000000 --- a/roles/ceph-mds/tasks/docker/selinux.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- name: check if selinux is enabled - command: getenforce - register: sestatus - changed_when: false - always_run: true - -- name: set selinux permissions - shell: chcon -Rt svirt_sandbox_file_t {{ item }} - with_items: - - /etc/ceph - - /var/lib/ceph - changed_when: false - when: sestatus.stdout != 'Disabled' diff --git a/roles/ceph-mgr/tasks/docker/dirs_permissions.yml b/roles/ceph-mgr/tasks/docker/dirs_permissions.yml deleted file mode 100644 index faa4631c5..000000000 --- a/roles/ceph-mgr/tasks/docker/dirs_permissions.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- name: create bootstrap directories - file: - path: "{{ item }}" - state: directory - owner: "64045" - group: "64045" - mode: "0755" - with_items: - - /etc/ceph - - /var/lib/ceph/mgr - - /var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }} diff --git a/roles/ceph-mgr/tasks/docker/fetch_configs.yml b/roles/ceph-mgr/tasks/docker/fetch_configs.yml deleted file mode 100644 index 6e43b5e12..000000000 --- a/roles/ceph-mgr/tasks/docker/fetch_configs.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -- name: set config and keys paths - set_fact: - ceph_config_keys: - - /etc/ceph/{{ cluster }}.conf - - /etc/ceph/{{ cluster }}.mgr.{{ ansible_hostname }}.keyring - -- name: stat for ceph config and keys - local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }} - with_items: "{{ ceph_config_keys }}" - changed_when: false - become: false - failed_when: false - always_run: true - register: statconfig - -- name: try to fetch ceph config and keys - copy: - src: "{{ fetch_directory }}/docker_mon_files/{{ item.0 }}" - dest: "{{ item.0 }}" - owner: root - group: root - mode: 0644 - changed_when: false - with_together: - - "{{ ceph_config_keys }}" - - "{{ statconfig.results }}" - when: item.1.stat.exists == true - -- name: "copy mgr key to /var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}/keyring" - command: cp /etc/ceph/{{ cluster }}.mgr.{{ ansible_hostname }}.keyring /var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}/keyring - changed_when: false - always_run: true - with_items: "{{ statconfig.results }}" - when: item.stat.exists == true - -- name: set ceph mgr key permission - file: - path: "/var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}/keyring" - owner: "{{ bootstrap_dirs_owner }}" - group: "{{ bootstrap_dirs_group }}" - mode: "0600" - when: cephx diff --git a/roles/ceph-mgr/tasks/docker/selinux.yml b/roles/ceph-mgr/tasks/docker/selinux.yml deleted file mode 100644 index 6d4ee022f..000000000 --- a/roles/ceph-mgr/tasks/docker/selinux.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- name: check if selinux is enabled - command: getenforce - register: sestatus - changed_when: false - always_run: true - -- name: set selinux permissions - shell: chcon -Rt svirt_sandbox_file_t {{ item }} - with_items: - - /etc/ceph - - /var/lib/ceph - changed_when: false - when: sestatus.stdout != 'Disabled' diff --git a/roles/ceph-mon/tasks/docker/dirs_permissions.yml b/roles/ceph-mon/tasks/docker/dirs_permissions.yml deleted file mode 100644 index 65997fd08..000000000 --- a/roles/ceph-mon/tasks/docker/dirs_permissions.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: create bootstrap directories - file: - path: "{{ item }}" - state: directory - owner: "{{ bootstrap_dirs_owner }}" - group: "{{ bootstrap_dirs_group }}" - mode: "0755" - with_items: - - /etc/ceph/ - - /var/lib/ceph/bootstrap-osd - - /var/lib/ceph/bootstrap-mds - - /var/lib/ceph/bootstrap-rgw diff --git a/roles/ceph-mon/tasks/docker/fetch_configs.yml b/roles/ceph-mon/tasks/docker/fetch_configs.yml deleted file mode 100644 index a96f34c88..000000000 --- a/roles/ceph-mon/tasks/docker/fetch_configs.yml +++ /dev/null @@ -1,50 +0,0 @@ ---- -- name: set config and keys paths - set_fact: - ceph_config_keys: - - /etc/ceph/{{ cluster }}.conf - - /etc/ceph/{{ cluster }}.client.admin.keyring - - /etc/ceph/monmap-{{ cluster }} - - /etc/ceph/{{ cluster }}.mon.keyring - - /var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring - - /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring - - /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring - -- name: add mgr keys to config and keys paths - set_fact: - tmp_ceph_mgr_keys: /etc/ceph/{{ cluster }}.mgr.{{ hostvars[item]['ansible_hostname'] }}.keyring - with_items: "{{ groups.get(mgr_group_name, []) }}" - register: tmp_ceph_mgr_keys_result - when: "{{ groups.get(mgr_group_name, []) | length > 0 }}" - -- name: convert mgr keys to an array - set_fact: - ceph_mgr_keys: "{{ tmp_ceph_mgr_keys_result.results | map(attribute='ansible_facts.tmp_ceph_mgr_keys') | list }}" - when: "{{ groups.get(mgr_group_name, []) | length > 0 }}" - -- name: merge mgr keys to config and keys paths - set_fact: - ceph_config_keys: "{{ ceph_config_keys + ceph_mgr_keys }}" - 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 }} - with_items: "{{ ceph_config_keys }}" - changed_when: false - become: false - failed_when: false - register: statconfig - always_run: true - -- name: try to fetch ceph config and keys - copy: - src: "{{ fetch_directory }}/docker_mon_files/{{ item.0 }}" - dest: "{{ item.0 }}" - owner: root - group: root - mode: 0644 - changed_when: false - with_together: - - "{{ ceph_config_keys }}" - - "{{ statconfig.results }}" - when: item.1.stat.exists == true diff --git a/roles/ceph-mon/tasks/docker/selinux.yml b/roles/ceph-mon/tasks/docker/selinux.yml deleted file mode 100644 index 6d4ee022f..000000000 --- a/roles/ceph-mon/tasks/docker/selinux.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- name: check if selinux is enabled - command: getenforce - register: sestatus - changed_when: false - always_run: true - -- name: set selinux permissions - shell: chcon -Rt svirt_sandbox_file_t {{ item }} - with_items: - - /etc/ceph - - /var/lib/ceph - changed_when: false - when: sestatus.stdout != 'Disabled' diff --git a/roles/ceph-nfs/tasks/docker/dirs_permissions.yml b/roles/ceph-nfs/tasks/docker/dirs_permissions.yml deleted file mode 100644 index 0fc40a1ce..000000000 --- a/roles/ceph-nfs/tasks/docker/dirs_permissions.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: create bootstrap directories - file: - path: "{{ item }}" - state: directory - owner: "{{ bootstrap_dirs_owner }}" - group: "{{ bootstrap_dirs_group }}" - mode: "0755" - with_items: - - /etc/ceph/ - - /var/lib/ceph/ - - /var/lib/ceph/radosgw - -- name: create ganesha directories - file: - path: "{{ item }}" - state: directory - owner: root - group: root - mode: "0755" - with_items: - - /etc/ganesha/ - - /var/lib/nfs/ganesha - - /var/run/ganesha diff --git a/roles/ceph-nfs/tasks/docker/fetch_configs.yml b/roles/ceph-nfs/tasks/docker/fetch_configs.yml deleted file mode 100644 index 549ff8ca8..000000000 --- a/roles/ceph-nfs/tasks/docker/fetch_configs.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -- name: set config paths - set_fact: - nfs_config_keys: - - /etc/ganesha/ganesha.conf - -- name: stat for config and keys - local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }} - with_items: "{{ nfs_config_keys }}" - changed_when: false - become: false - failed_when: false - always_run: true - register: statconfig - -- name: try to fetch config and keys - copy: - src: "{{ fetch_directory }}/docker_mon_files/{{ item.0 }}" - dest: "{{ item.0 }}" - owner: root - group: root - mode: 0644 - changed_when: false - with_together: - - "{{ nfs_config_keys }}" - - "{{ statconfig.results }}" - when: item.1.stat.exists == true - -- name: push ganesha files to the ansible server - fetch: - src: "{{ item.0 }}" - dest: "{{ fetch_directory }}/docker_mon_files/{{ item.0 }}" - flat: yes - with_together: - - "{{ nfs_config_keys }}" - - "{{ statconfig.results }}" - when: item.1.stat.exists == false diff --git a/roles/ceph-nfs/tasks/docker/selinux.yml b/roles/ceph-nfs/tasks/docker/selinux.yml deleted file mode 100644 index be983910b..000000000 --- a/roles/ceph-nfs/tasks/docker/selinux.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -- name: check if selinux is enabled - command: getenforce - register: sestatus - changed_when: false - always_run: true - -- name: set selinux permissions - shell: chcon -Rt svirt_sandbox_file_t {{ item }} - with_items: - - /etc/ceph - - /etc/ganesha - - /var/lib/ceph - - /var/lib/nfs/ganesha - - /var/run/ganesha - changed_when: false - when: sestatus.stdout != 'Disabled' diff --git a/roles/ceph-osd/tasks/docker/dirs_permissions.yml b/roles/ceph-osd/tasks/docker/dirs_permissions.yml deleted file mode 100644 index 82b6d6b2b..000000000 --- a/roles/ceph-osd/tasks/docker/dirs_permissions.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -- name: create bootstrap directories - file: - path: "{{ item }}" - state: directory - owner: "{{ bootstrap_dirs_owner }}" - group: "{{ bootstrap_dirs_group }}" - mode: "0755" - with_items: - - /etc/ceph/ - - /var/lib/ceph/bootstrap-osd diff --git a/roles/ceph-osd/tasks/docker/fetch_configs.yml b/roles/ceph-osd/tasks/docker/fetch_configs.yml deleted file mode 100644 index ac3bd875d..000000000 --- a/roles/ceph-osd/tasks/docker/fetch_configs.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -- name: set config and keys paths - set_fact: - ceph_config_keys: - - /etc/ceph/{{ cluster }}.conf - - /var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring - -- name: wait for ceph.conf and keys - local_action: > - wait_for - path="{{ fetch_directory }}/docker_mon_files/{{ item.0 }}" - become: false - with_items: "{{ ceph_config_keys }}" - -- name: stat for ceph config and keys - local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }} - with_items: "{{ ceph_config_keys }}" - changed_when: false - become: false - failed_when: false - always_run: true - register: statconfig - -- name: try to copy ceph config and keys - copy: - src: "{{ fetch_directory }}/docker_mon_files/{{ item.0 }}" - dest: "{{ item.0 }}" - owner: root - group: root - mode: 0644 - changed_when: false - with_items: "{{ ceph_config_keys }}" diff --git a/roles/ceph-osd/tasks/docker/selinux.yml b/roles/ceph-osd/tasks/docker/selinux.yml deleted file mode 100644 index 6d4ee022f..000000000 --- a/roles/ceph-osd/tasks/docker/selinux.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- name: check if selinux is enabled - command: getenforce - register: sestatus - changed_when: false - always_run: true - -- name: set selinux permissions - shell: chcon -Rt svirt_sandbox_file_t {{ item }} - with_items: - - /etc/ceph - - /var/lib/ceph - changed_when: false - when: sestatus.stdout != 'Disabled' diff --git a/roles/ceph-rbd-mirror/tasks/docker/dirs_permissions.yml b/roles/ceph-rbd-mirror/tasks/docker/dirs_permissions.yml deleted file mode 100644 index 0b446c639..000000000 --- a/roles/ceph-rbd-mirror/tasks/docker/dirs_permissions.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: create bootstrap directories - file: - path: "{{ item }}" - state: directory - owner: "{{ bootstrap_dirs_owner }}" - group: "{{ bootstrap_dirs_group }}" - mode: "0755" - with_items: - - /etc/ceph/ diff --git a/roles/ceph-rbd-mirror/tasks/docker/fetch_configs.yml b/roles/ceph-rbd-mirror/tasks/docker/fetch_configs.yml deleted file mode 100644 index 2c4c4fa11..000000000 --- a/roles/ceph-rbd-mirror/tasks/docker/fetch_configs.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -# NOTE (leseb): the mds container needs the admin key -# so it can create the mds pools for cephfs -- name: set config and keys paths - set_fact: - ceph_config_keys: - - /etc/ceph/{{ cluster }}.conf - - /etc/ceph/{{ cluster }}.client.admin.keyring - -- name: stat for ceph config and keys - local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }} - with_items: "{{ ceph_config_keys }}" - changed_when: false - become: false - failed_when: false - always_run: true - register: statconfig - -- name: try to fetch ceph config and keys - copy: - src: "{{ fetch_directory }}/docker_mon_files/{{ item.0 }}" - dest: "{{ item.0 }}" - owner: root - group: root - mode: 0644 - changed_when: false - with_together: - - "{{ ceph_config_keys }}" - - "{{ statconfig.results }}" - when: item.1.stat.exists == true diff --git a/roles/ceph-rbd-mirror/tasks/docker/selinux.yml b/roles/ceph-rbd-mirror/tasks/docker/selinux.yml deleted file mode 100644 index 59fd6667a..000000000 --- a/roles/ceph-rbd-mirror/tasks/docker/selinux.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: check if selinux is enabled - command: getenforce - register: sestatus - changed_when: false - always_run: true - -- name: set selinux permissions - shell: chcon -Rt svirt_sandbox_file_t {{ item }} - with_items: - - /etc/ceph - changed_when: false - when: sestatus.stdout != 'Disabled' diff --git a/roles/ceph-restapi/tasks/docker/dirs_permissions.yml b/roles/ceph-restapi/tasks/docker/dirs_permissions.yml deleted file mode 100644 index 65997fd08..000000000 --- a/roles/ceph-restapi/tasks/docker/dirs_permissions.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: create bootstrap directories - file: - path: "{{ item }}" - state: directory - owner: "{{ bootstrap_dirs_owner }}" - group: "{{ bootstrap_dirs_group }}" - mode: "0755" - with_items: - - /etc/ceph/ - - /var/lib/ceph/bootstrap-osd - - /var/lib/ceph/bootstrap-mds - - /var/lib/ceph/bootstrap-rgw diff --git a/roles/ceph-restapi/tasks/docker/fetch_configs.yml b/roles/ceph-restapi/tasks/docker/fetch_configs.yml deleted file mode 100644 index 6515830e7..000000000 --- a/roles/ceph-restapi/tasks/docker/fetch_configs.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- name: set config and keys paths - set_fact: - ceph_config_keys: - - /etc/ceph/{{ cluster }}.conf - - /etc/ceph/{{ cluster }}.client.admin.keyring - -- name: stat for ceph config and keys - local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }} - with_items: "{{ ceph_config_keys }}" - changed_when: false - become: false - ignore_errors: true - register: statconfig - always_run: true - -- name: try to fetch ceph config and keys - copy: - src: "{{ playbook_dir }}/{{ fetch_directory }}/docker_mon_files/{{ item.0 }}" - dest: "{{ item.0 }}" - owner: root - group: root - mode: 0644 - changed_when: false - with_together: - - "{{ ceph_config_keys }}" - - "{{ statconfig.results }}" - when: item.1.stat.exists == true diff --git a/roles/ceph-rgw/tasks/docker/dirs_permissions.yml b/roles/ceph-rgw/tasks/docker/dirs_permissions.yml deleted file mode 100644 index 07f36cec6..000000000 --- a/roles/ceph-rgw/tasks/docker/dirs_permissions.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -- name: create bootstrap directories - file: - path: "{{ item }}" - state: directory - owner: "{{ bootstrap_dirs_owner }}" - group: "{{ bootstrap_dirs_group }}" - mode: "0755" - with_items: - - /etc/ceph/ - - /var/lib/ceph/bootstrap-rgw diff --git a/roles/ceph-rgw/tasks/docker/fetch_configs.yml b/roles/ceph-rgw/tasks/docker/fetch_configs.yml deleted file mode 100644 index 1b68b2211..000000000 --- a/roles/ceph-rgw/tasks/docker/fetch_configs.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- name: set config and keys paths - set_fact: - ceph_config_keys: - - /etc/ceph/{{ cluster }}.conf - - /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring - -- name: stat for ceph config and keys - local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }} - with_items: "{{ ceph_config_keys }}" - changed_when: false - become: false - ignore_errors: true - always_run: true - register: statconfig - -- name: try to fetch ceph config and keys - copy: - src: "{{ fetch_directory }}/docker_mon_files/{{ item.0 }}" - dest: "{{ item.0 }}" - owner: root - group: root - mode: 0644 - changed_when: false - with_together: - - "{{ ceph_config_keys }}" - - "{{ statconfig.results }}" - when: item.1.stat.exists == true diff --git a/roles/ceph-rgw/tasks/docker/selinux.yml b/roles/ceph-rgw/tasks/docker/selinux.yml deleted file mode 100644 index 6d4ee022f..000000000 --- a/roles/ceph-rgw/tasks/docker/selinux.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- name: check if selinux is enabled - command: getenforce - register: sestatus - changed_when: false - always_run: true - -- name: set selinux permissions - shell: chcon -Rt svirt_sandbox_file_t {{ item }} - with_items: - - /etc/ceph - - /var/lib/ceph - changed_when: false - when: sestatus.stdout != 'Disabled'