From 8839b2f9a6f7bc780c768a8cd48556a21a7f00e1 Mon Sep 17 00:00:00 2001 From: Alex-Welsh Date: Tue, 10 Dec 2024 16:47:44 +0000 Subject: [PATCH] Add bash executable for cmd shell invocations --- etc/kayobe/ansible/rabbitmq-reset.yml | 12 +++++++----- etc/kayobe/ansible/stop-openstack-services.yml | 8 +++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/etc/kayobe/ansible/rabbitmq-reset.yml b/etc/kayobe/ansible/rabbitmq-reset.yml index 47fc1c3ff..e910d7765 100644 --- a/etc/kayobe/ansible/rabbitmq-reset.yml +++ b/etc/kayobe/ansible/rabbitmq-reset.yml @@ -67,8 +67,10 @@ tasks: # The following services use RabbitMQ. - name: Restart OpenStack services - ansible.builtin.shell: >- - set -o pipefail && - systemctl -a | egrep 'kolla-(barbican|blazar|cinder|cloudkitty|designate|heat|ironic|keystone|magnum|manila|neutron|nova|octavia)' | - awk '{ print $1 }' | - xargs systemctl restart + ansible.builtin.shell: + cmd: >- + set -o pipefail && + systemctl -a | egrep 'kolla-(barbican|blazar|cinder|cloudkitty|designate|heat|ironic|keystone|magnum|manila|neutron|nova|octavia)' | + awk '{ print $1 }' | + xargs systemctl restart + executable: "/bin/bash" diff --git a/etc/kayobe/ansible/stop-openstack-services.yml b/etc/kayobe/ansible/stop-openstack-services.yml index f7d438094..5318fcf7c 100644 --- a/etc/kayobe/ansible/stop-openstack-services.yml +++ b/etc/kayobe/ansible/stop-openstack-services.yml @@ -25,6 +25,8 @@ - placement tasks: - name: Stop OpenStack services - ansible.builtin.shell: >- - set -o pipefail && - systemctl -a | egrep '({{ stop_service_list | join('|') }})' | awk '{ print $1 }' | xargs systemctl stop + ansible.builtin.shell: + executable: "/bin/bash" + cmd: >- + set -o pipefail && + systemctl -a | egrep '({{ stop_service_list | join('|') }})' | awk '{ print $1 }' | xargs systemctl stop