]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
common: do not log keyring secret v4.0.62.2
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 9 Aug 2021 12:57:33 +0000 (14:57 +0200)
committerDimitri Savineau <dsavinea@redhat.com>
Wed, 11 Aug 2021 21:06:50 +0000 (17:06 -0400)
let's not display any keyring secret by default in ansible log.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1980744
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 7511195738e9d1e8f3d3ec77ad4473fa90d17d22)

20 files changed:
group_vars/all.yml.sample
group_vars/rhcs.yml.sample
roles/ceph-client/tasks/create_users_keys.yml
roles/ceph-client/tasks/pre_requisite.yml
roles/ceph-crash/tasks/main.yml
roles/ceph-defaults/defaults/main.yml
roles/ceph-iscsi-gw/tasks/common.yml
roles/ceph-mds/tasks/common.yml
roles/ceph-mds/tasks/non_containerized.yml
roles/ceph-mgr/tasks/common.yml
roles/ceph-mon/tasks/ceph_keys.yml
roles/ceph-mon/tasks/deploy_monitors.yml
roles/ceph-nfs/tasks/main.yml
roles/ceph-nfs/tasks/pre_requisite_container.yml
roles/ceph-nfs/tasks/pre_requisite_non_container.yml
roles/ceph-osd/tasks/common.yml
roles/ceph-osd/tasks/openstack_config.yml
roles/ceph-rbd-mirror/tasks/common.yml
roles/ceph-rgw/tasks/common.yml
roles/ceph-rgw/tasks/pre_requisite.yml

index eab63c668e771b813aaabd11c56990928e981f3c..a89244b1c3e435f96f6386e1b2f8b03aaec43202 100644 (file)
@@ -887,7 +887,7 @@ dummy:
 
 #client_connections: {}
 
-
+#no_log_on_ceph_key_tasks: True
 
 ###############
 # DEPRECATION #
index b097952f0a510e2d7700da1fc251198852af1856..d9fa34889e50e33bbb9b2d9ca518a687e6dcab05 100644 (file)
@@ -887,7 +887,7 @@ alertmanager_container_image: registry.redhat.io/openshift4/ose-prometheus-alert
 
 #client_connections: {}
 
-
+#no_log_on_ceph_key_tasks: True
 
 ###############
 # DEPRECATION #
index 0c99fbb50b933ad5c3f77f3f0f46b4a67c3fd499..76cf29c714587d81931b11a3a1701560f2bb8f6d 100644 (file)
@@ -52,7 +52,7 @@
     - cephx | bool
     - keys | length > 0
     - inventory_hostname == groups.get('_filtered_clients') | first
-  no_log: true
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
 
 - name: slurp client cephx key(s)
   slurp:
@@ -64,7 +64,7 @@
     - cephx | bool
     - keys | length > 0
     - inventory_hostname == groups.get('_filtered_clients') | first
-  no_log: true
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
 
 - name: pool related tasks
   when:
     group: "{{ ceph_uid }}"
   with_items: "{{ hostvars[groups['_filtered_clients'][0]]['slurp_client_keys']['results'] }}"
   when: not item.get('skipped', False)
-  no_log: true
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
 
index 1f144f7766ebeb68adf77f48fb2df281729d56f7..46cbcc05ad568819135c67e303b6146d305df2ba 100644 (file)
@@ -11,6 +11,7 @@
       when:
         - cephx | bool
         - item.copy_key | bool
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
 
     - name: copy ceph key(s) if needed
       copy:
@@ -22,5 +23,5 @@
       with_items: "{{ _client_keys.results }}"
       when:
         - item.item.copy_key | bool
-      no_log: true
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
   when: cephx | bool
index 89536f4d575f285b8d86546741ac89d8a8be2203..6db9028867b75ea37b5fd9ff8498c0e2fa4a99c4 100644 (file)
@@ -19,6 +19,7 @@
         CEPH_CONTAINER_BINARY: "{{ container_binary }}"
       delegate_to: "{{ groups.get(mon_group_name, [])[0] }}"
       run_once: True
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
 
     - name: enforce container_binary on first monitor
       import_role:
@@ -42,6 +43,7 @@
       check_mode: False
       changed_when: False
       run_once: true
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
 
     - name: copy ceph key(s) if needed
       copy:
@@ -50,7 +52,7 @@
         owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
         group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
         mode: "{{ ceph_keyring_permissions }}"
-      no_log: true
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
 
 - name: start ceph-crash daemon
   when: containerized_deployment | bool
index 16bbf2f2e3eda61a53baa77fc658d68a071faa32..c3744d021f507b440fe907ec5033d9de5ffe32b4 100644 (file)
@@ -879,7 +879,7 @@ rbd_devices: {}
 
 client_connections: {}
 
-
+no_log_on_ceph_key_tasks: True
 
 ###############
 # DEPRECATION #
index c5f94ed02c5fdf745bd131a8773a982d3815ad93..4517f535b44657f003d32b6718767a065d40087f 100644 (file)
@@ -9,6 +9,7 @@
   when:
     - cephx | bool
     - item.copy_key | bool
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
 
 - name: copy ceph key(s) if needed
   copy:
@@ -21,7 +22,7 @@
   when:
     - cephx | bool
     - item.item.copy_key | bool
-  no_log: true
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
 
 - name: add mgr ip address to trusted list with dashboard - ipv4
   set_fact:
index 7d5f9c2811c20e9f8f9ee9ed322607b6b917ead0..50dcc19300ee0f3ee2ca9bc3f06627a5eeb31dd4 100644 (file)
@@ -21,6 +21,7 @@
   when:
     - cephx | bool
     - item.copy_key | bool
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
 
 - name: copy ceph key(s) if needed
   copy:
@@ -33,5 +34,5 @@
   when:
     - cephx | bool
     - item.item.copy_key | bool
-  no_log: true
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
 
index 0e2314d7a7268397a57cdce3e78feab5419a3991..ac71a7aa0146ed51580cbd7158c0ed715dcd8454 100644 (file)
@@ -26,6 +26,7 @@
     creates: /var/lib/ceph/mds/{{ cluster }}-{{ mds_name }}/keyring
   changed_when: false
   when: cephx
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
 
 - name: set mds key permissions
   file:
index 0c8ae8a04e42249099b07f60dcd5d27daf4a96e1..44f167252efbcb067d3b8a58247cb6a91e3ce8ce 100644 (file)
@@ -24,6 +24,7 @@
     CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
     CEPH_CONTAINER_BINARY: "{{ container_binary }}"
   when: groups.get(mgr_group_name, []) | length == 0 # the key is present already since one of the mons created it in "create ceph mgr keyring(s)"
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
 
 - name: create and copy keyrings
   when: groups.get(mgr_group_name, []) | length > 0
@@ -46,6 +47,7 @@
       with_items: "{{ groups.get(mgr_group_name, []) }}"
       run_once: True
       delegate_to: "{{ groups[mon_group_name][0] }}"
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
 
     - name: set_fact _mgr_keys
       set_fact:
@@ -61,6 +63,7 @@
       when:
         - cephx | bool
         - item.copy_key | bool
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
 
     - name: copy ceph key(s) if needed
       copy:
@@ -74,7 +77,7 @@
         - cephx | bool
         - item is not skipped
         - item.item.copy_key | bool
-      no_log: true
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
 
 - name: set mgr key permissions
   file:
index e55504ec9ca8a43dbbe8e4c1f306f63ed7a78b47..c35b2a15dc646dc676d78859c6f9e9e4fd0c4ca6 100644 (file)
@@ -28,5 +28,6 @@
     CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
     CEPH_CONTAINER_BINARY: "{{ container_binary }}"
     CEPH_ROLLING_UPDATE: "{{ rolling_update }}"
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
   when:
     - cephx | bool
index 37ce49c4b2cc744082602fd49c294540dec13c67..b988f764eed2248f4c06e33a2e2aff32eddf16ab 100644 (file)
@@ -16,6 +16,7 @@
       run_once: True
       delegate_to: "{{ running_mon }}"
       failed_when: initial_mon_key.rc not in [0, 2]
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
       when: running_mon is defined
 
     - name: generate monitor initial keyring
@@ -25,6 +26,7 @@
       delegate_to: localhost
       become: false
       run_once: true
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
       when:
         - initial_mon_key is skipped
           or
@@ -51,6 +53,7 @@
         owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
         group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
         mode: "0400"
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
       environment:
         CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
         CEPH_CONTAINER_BINARY: "{{ container_binary }}"
     CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
     CEPH_CONTAINER_BINARY: "{{ container_binary }}"
   register: create_custom_admin_secret
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
   when:
     - cephx | bool
     - admin_secret != 'admin_secret'
index 186fb0f529684d3249a2434b39317f8217e515d8..164414c4c900912067e2870933f4e5248ab23c4f 100644 (file)
@@ -75,7 +75,7 @@
       when:
         - not item.0.get('skipped', False)
         - item.0.item.name == 'client.' + ceph_nfs_ceph_user or item.0.item.name == rgw_client_name
-      no_log: true
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
 
 - name: include start_nfs.yml
   import_tasks: start_nfs.yml
index 24d3121f90c3fd86a1f9d856ee67b8502eee9cd4..a1e63618dbe7d5b2f971ead54f5f4b17a5cb4861 100644 (file)
@@ -20,6 +20,7 @@
       when:
         - cephx | bool
         - item.copy_key | bool
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
 
     - name: copy ceph key(s) if needed
       copy:
@@ -32,7 +33,7 @@
       when:
         - cephx | bool
         - item.item.copy_key | bool
-      no_log: true
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
   when: groups.get(mon_group_name, []) | length > 0
 
 - name: dbus related tasks
index 4bf1b59be8b89b14468d8cb42bf7a41993731b45..36ba2965d4b5476746b35e4188896ed8551d725d 100644 (file)
@@ -57,6 +57,7 @@
       when:
         - cephx | bool
         - item.copy_key | bool
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
 
     - name: copy ceph key(s) if needed
       copy:
@@ -69,7 +70,7 @@
       when:
         - cephx | bool
         - item.item.copy_key | bool
-      no_log: true
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
 
     - name: nfs object gateway related tasks
       when: nfs_obj_gw | bool
@@ -79,6 +80,7 @@
           args:
             creates: /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}/keyring
           changed_when: false
+          no_log: "{{ no_log_on_ceph_key_tasks }}"
 
         - name: set rados gateway key permissions
           file:
index 40f01b6c23e30f2a5cd157406d002708ac87d6e6..8966645af416190477336c05a6054c5f5c2747ac 100644 (file)
@@ -19,6 +19,7 @@
     - { name: "client.admin", path: "/etc/ceph/{{ cluster }}.client.admin.keyring", copy_key: "{{ copy_admin_key }}" }
   delegate_to: "{{ groups.get(mon_group_name)[0] }}"
   run_once: true
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
   when:
     - cephx | bool
     - item.copy_key | bool
@@ -35,5 +36,5 @@
     - cephx | bool
     - item is not skipped
     - item.item.copy_key | bool
-  no_log: true
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
 
index 1b8c8d2be6f3f28ccf55ac7e9d42a66882fb4b13..2e869d274b3988e9d37b582cb7c3e2a687b58cd3 100644 (file)
         CEPH_CONTAINER_BINARY: "{{ container_binary }}"
       with_items: "{{ openstack_keys }}"
       delegate_to: "{{ groups[mon_group_name][0] }}"
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
 
     - name: get keys from monitors
       command: "{{ hostvars[groups[mon_group_name][0]]['container_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} auth get {{ item.name }}"
       with_items: "{{ openstack_keys }}"
       run_once: true
       delegate_to: "{{ groups.get(mon_group_name)[0] }}"
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
 
     - name: copy ceph key(s) if needed
       copy:
         - "{{ _osp_keys.results }}"
         - "{{ groups[mon_group_name] }}"
       delegate_to: "{{ item.1 }}"
-      no_log: true
+      no_log: "{{ no_log_on_ceph_key_tasks }}"
   when:
     - cephx | bool
     - openstack_config | bool
index 4de1bc7d1957fa3f898ebc21ac90b76dd7c43e21..978ccad84b0a857344daa1a6f93168ed657187a3 100644 (file)
@@ -10,6 +10,7 @@
   when:
     - cephx | bool
     - item.copy_key | bool
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
 
 - name: copy ceph key(s) if needed
   copy:
@@ -22,7 +23,7 @@
   when:
     - cephx | bool
     - item.item.copy_key | bool
-  no_log: true
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
 
 - name: create rbd-mirror keyring
   command: >
@@ -43,4 +44,5 @@
     owner: "ceph"
     group: "ceph"
     mode: "{{ ceph_keyring_permissions }}"
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
   when: not containerized_deployment | bool
index e325ede5b999e7f2ca56c67b554d2fe66c91c7b5..9d9b3c6e3cc42aee9d7e3e6fdfd74adb4e4b8831 100644 (file)
@@ -19,6 +19,7 @@
   when:
     - cephx | bool
     - item.copy_key | bool
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
 
 - name: copy ceph key(s) if needed
   copy:
@@ -32,4 +33,4 @@
     - cephx | bool
     - item is not skipped
     - item.item.copy_key | bool
-  no_log: true
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
index cd489e0e4989dcfec39e6f91f7a12c3d34574be4..eeabdc36ff936dc2a4cc7a5ff896d5e6cec39907 100644 (file)
@@ -14,6 +14,7 @@
     owner: "ceph"
     group: "ceph"
     mode: "0600"
+  no_log: "{{ no_log_on_ceph_key_tasks }}"
   environment:
     CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
     CEPH_CONTAINER_BINARY: "{{ container_binary }}"