Skip to content
Snippets Groups Projects
Commit 6cba8458 authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "Extract cephx keys from vault encrypted files"

parents a2c7be1d 44709f41
No related branches found
No related tags found
No related merge requests found
...@@ -79,26 +79,26 @@ ...@@ -79,26 +79,26 @@
- Restart nova-libvirt container - Restart nova-libvirt container
- name: Extract nova key from file - name: Extract nova key from file
local_action: shell cat "{{ nova_cephx_keyring_file.stat.path }}" | grep -E 'key\s*=' | awk '{ print $3 }' set_fact:
nova_cephx_raw_key: "{{ lookup('file', nova_cephx_keyring_file.stat.path) | regex_search('key\\s*=.*$', multiline=True) | regex_replace('key\\s*=\\s*(.*)\\s*', '\\1') }}"
changed_when: false changed_when: false
run_once: True run_once: True
register: nova_cephx_raw_key
when: when:
- nova_backend == "rbd" - nova_backend == "rbd"
- external_ceph_cephx_enabled | bool - external_ceph_cephx_enabled | bool
- name: Extract cinder key from file - name: Extract cinder key from file
local_action: shell cat "{{ cinder_cephx_keyring_file.stat.path }}" | grep -E 'key\s*=' | awk '{ print $3 }' set_fact:
cinder_cephx_raw_key: "{{ lookup('file', cinder_cephx_keyring_file.stat.path) | regex_search('key\\s*=.*$', multiline=True) | regex_replace('key\\s*=\\s*(.*)\\s*', '\\1') }}"
changed_when: false changed_when: false
run_once: True run_once: True
register: cinder_cephx_raw_key
when: when:
- cinder_backend_ceph | bool - cinder_backend_ceph | bool
- external_ceph_cephx_enabled | bool - external_ceph_cephx_enabled | bool
- name: Pushing secrets key for libvirt - name: Pushing secrets key for libvirt
copy: copy:
content: "{{ item.result.stdout }}" content: "{{ item.result }}"
dest: "{{ node_config_directory }}/nova-libvirt/secrets/{{ item.uuid }}.base64" dest: "{{ node_config_directory }}/nova-libvirt/secrets/{{ item.uuid }}.base64"
mode: "0600" mode: "0600"
become: true become: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment