From c18117be010eae92315df6b675edcc3aa27d1210 Mon Sep 17 00:00:00 2001 From: Sergii Golovatiuk Date: Wed, 13 Nov 2024 11:23:41 +0100 Subject: [PATCH] Get Barbican password with sudo RHEV is using stack user to ssh the controller nodes. Adding sudo to execute the command for fetching simple_crypto_plugin from barbican.conf. --- tests/roles/barbican_adoption/tasks/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/roles/barbican_adoption/tasks/main.yaml b/tests/roles/barbican_adoption/tasks/main.yaml index 7d63fef3f..0b92fdf3f 100644 --- a/tests/roles/barbican_adoption/tasks/main.yaml +++ b/tests/roles/barbican_adoption/tasks/main.yaml @@ -3,7 +3,7 @@ {{ shell_header }} {{ oc_header }} CONTROLLER1_SSH="{{ controller1_ssh }}" - oc set data secret/osp-secret "BarbicanSimpleCryptoKEK=$($CONTROLLER1_SSH "python3 -c \"import configparser; c = configparser.ConfigParser(); c.read('/var/lib/config-data/puppet-generated/barbican/etc/barbican/barbican.conf'); print(c['simple_crypto_plugin']['kek'])\"")" + oc set data secret/osp-secret "BarbicanSimpleCryptoKEK=$($CONTROLLER1_SSH "sudo python3 -c \"import configparser; c = configparser.ConfigParser(); c.read('/var/lib/config-data/puppet-generated/barbican/etc/barbican/barbican.conf'); print(c['simple_crypto_plugin']['kek'])\"")" - name: deploy podified Barbican ansible.builtin.shell: |