From: Sébastien Han Date: Fri, 16 Nov 2018 09:29:05 +0000 (+0100) Subject: mon: secure cluster on container X-Git-Tag: v4.0.0beta1~154 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a0e5ef8516b63cfefd4608a435b12aec8bd51e26;p=ceph-ansible.git mon: secure cluster on container Add the ability to protect pools on containerized clusters. Signed-off-by: Sébastien Han --- diff --git a/roles/ceph-mon/tasks/main.yml b/roles/ceph-mon/tasks/main.yml index f25ff8459..fbb92ce1e 100644 --- a/roles/ceph-mon/tasks/main.yml +++ b/roles/ceph-mon/tasks/main.yml @@ -23,7 +23,6 @@ run_once: true when: - secure_cluster - - not containerized_deployment - name: include docker/main.yml include_tasks: docker/main.yml diff --git a/roles/ceph-mon/tasks/secure_cluster.yml b/roles/ceph-mon/tasks/secure_cluster.yml index bdce42946..f94005f54 100644 --- a/roles/ceph-mon/tasks/secure_cluster.yml +++ b/roles/ceph-mon/tasks/secure_cluster.yml @@ -1,12 +1,14 @@ --- - name: collect all the pools - command: rados --cluster {{ cluster }} lspools + command: > + {{ docker_exec_cmd }} rados --cluster {{ cluster }} lspools changed_when: false register: ceph_pools check_mode: no - name: secure the cluster - command: ceph --cluster {{ cluster }} osd pool set {{ item[0] }} {{ item[1] }} true + command: > + {{ docker_exec_cmd }} ceph --cluster {{ cluster }} osd pool set {{ item[0] }} {{ item[1] }} true changed_when: false with_nested: - "{{ ceph_pools.stdout_lines|default([]) }}"