BaR Ceph authenticacion more ansible way

Instead of execute a command and redirect the output to a file.
This patch gets the output of the command line and writes it
to a file.

Also fixed the molecule-backup_and_restore test

Change-Id: Ie38d8b9fce36ce2f73a2811072e53f405f1367f6
This commit is contained in:
Juan Badia Payno 2020-06-15 09:41:28 +02:00
parent 19172a2169
commit ad2c7b5892
2 changed files with 13 additions and 3 deletions

View File

@ -38,13 +38,14 @@
roles:
- role: test_deps
test_deps_setup_tripleo: true
test_deps_tripleo_packages:
- hiera
test_deps_extra_packages:
- rear
- syslinux
- genisoimage
- kbd
- puppet
- hiera
post_tasks:
- name: Create hiera config file

View File

@ -35,7 +35,16 @@
- name: Export ceph authentication
shell: |
set -o pipefail
{{ tripleo_container_cli }} exec ceph-mon-{{ ansible_hostname }} bash -c "ceph auth export" > {{ tripleo_backup_and_restore_ceph_auth_file }}
{{ tripleo_container_cli }} exec ceph-mon-{{ ansible_hostname }} bash -c "ceph auth export"
become: true
register: bar_ceph_autentication_content
tags:
- bar_create_recover_image
- name: Save ceph authentication at {{ tripleo_backup_and_restore_ceph_auth_file }}
copy:
dest: "{{ tripleo_backup_and_restore_ceph_auth_file }}"
content: |
{{ bar_ceph_autentication_content.stdout }}
tags:
- bar_create_recover_image