Skip to content

Commit

Permalink
Sensitive key data now hidden in output log
Browse files Browse the repository at this point in the history
Fixes: #6529

Signed-off-by: Neelaksh Singh <neelaksh48@gmail.com>
(cherry picked from commit d18a986)
  • Loading branch information
Neelaksh-Singh authored and dsavineau committed Jul 12, 2021
1 parent a14a3e5 commit 9c04909
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions roles/ceph-client/tasks/create_users_keys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- cephx | bool
- keys | length > 0
- inventory_hostname == groups.get('_filtered_clients') | first
no_log: true

- name: slurp client cephx key(s)
slurp:
Expand All @@ -39,6 +40,7 @@
- cephx | bool
- keys | length > 0
- inventory_hostname == groups.get('_filtered_clients') | first
no_log: true

- name: pool related tasks
when:
Expand Down Expand Up @@ -79,3 +81,5 @@
group: "{{ ceph_uid }}"
with_items: "{{ hostvars[groups['_filtered_clients'][0]]['slurp_client_keys']['results'] }}"
when: not item.get('skipped', False)
no_log: true

1 change: 1 addition & 0 deletions roles/ceph-client/tasks/pre_requisite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
with_items: "{{ _client_keys.results }}"
when:
- item.item.copy_key | bool
no_log: true
when: cephx | bool
1 change: 1 addition & 0 deletions roles/ceph-crash/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
mode: "{{ ceph_keyring_permissions }}"
no_log: true

- name: start ceph-crash daemon
when: containerized_deployment | bool
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-iscsi-gw/tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
when:
- cephx | bool
- item.item.copy_key | bool
no_log: true

- name: add mgr ip address to trusted list with dashboard - ipv4
set_fact:
Expand Down
2 changes: 2 additions & 0 deletions roles/ceph-mds/tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@
when:
- cephx | bool
- item.item.copy_key | bool
no_log: true

1 change: 1 addition & 0 deletions roles/ceph-mgr/tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
- cephx | bool
- item is not skipped
- item.item.copy_key | bool
no_log: true

- name: set mgr key permissions
file:
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-nfs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +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

- name: include start_nfs.yml
import_tasks: start_nfs.yml
3 changes: 2 additions & 1 deletion roles/ceph-nfs/tasks/pre_requisite_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
when:
- cephx | bool
- item.item.copy_key | bool
no_log: true
when: groups.get(mon_group_name, []) | length > 0

- name: dbus related tasks
Expand All @@ -52,4 +53,4 @@

- name: reload dbus configuration
command: "killall -SIGHUP dbus-daemon"
when: ceph_nfs_dynamic_exports | bool
when: ceph_nfs_dynamic_exports | bool
1 change: 1 addition & 0 deletions roles/ceph-nfs/tasks/pre_requisite_non_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
when:
- cephx | bool
- item.item.copy_key | bool
no_log: true

- name: nfs object gateway related tasks
when: nfs_obj_gw | bool
Expand Down
2 changes: 2 additions & 0 deletions roles/ceph-osd/tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@
- cephx | bool
- item is not skipped
- item.item.copy_key | bool
no_log: true

1 change: 1 addition & 0 deletions roles/ceph-osd/tasks/openstack_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
- "{{ _osp_keys.results }}"
- "{{ groups[mon_group_name] }}"
delegate_to: "{{ item.1 }}"
no_log: true
when:
- cephx | bool
- openstack_config | bool
1 change: 1 addition & 0 deletions roles/ceph-rbd-mirror/tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
when:
- cephx | bool
- item.item.copy_key | bool
no_log: true

- name: create rbd-mirror keyring
command: >
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-rgw/tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- cephx | bool
- item is not skipped
- item.item.copy_key | bool
no_log: true

- name: copy SSL certificate & key data to certificate path
copy:
Expand Down

0 comments on commit 9c04909

Please sign in to comment.