diff --git a/etc/kayobe/ansible/rabbitmq-reset.yml b/etc/kayobe/ansible/rabbitmq-reset.yml index 1d8d8cd1a0..957569cb39 100644 --- a/etc/kayobe/ansible/rabbitmq-reset.yml +++ b/etc/kayobe/ansible/rabbitmq-reset.yml @@ -12,7 +12,7 @@ ansible.builtin.shell: cmd: >- set -o pipefail && - systemctl -a | egrep 'kolla-(barbican|blazar|cinder|cloudkitty|designate|heat|ironic|keystone|magnum|manila|neutron|nova|octavia)' | + systemctl -a | grep -E 'kolla-(barbican|blazar|cinder|cloudkitty|designate|heat|ironic|keystone|magnum|manila|neutron|nova|octavia)' | awk '{ print $NF }' | xargs systemctl stop executable: "/bin/bash" @@ -87,7 +87,7 @@ cmd: >- set -o pipefail && systemctl list-units --type=service --all --no-legend --plain | - egrep 'kolla-(barbican|blazar|cinder|cloudkitty|designate|heat|ironic|keystone|magnum|manila|neutron|nova|octavia)' | + grep -E 'kolla-(barbican|blazar|cinder|cloudkitty|designate|heat|ironic|keystone|magnum|manila|neutron|nova|octavia)' | awk '{ print $1 }' | xargs -r systemctl restart executable: "/bin/bash" diff --git a/etc/kayobe/ansible/stop-openstack-services.yml b/etc/kayobe/ansible/stop-openstack-services.yml index 1f34b6e909..4c71960780 100644 --- a/etc/kayobe/ansible/stop-openstack-services.yml +++ b/etc/kayobe/ansible/stop-openstack-services.yml @@ -29,4 +29,4 @@ executable: "/bin/bash" cmd: >- set -o pipefail && - systemctl -a | egrep 'kolla-({{ stop_service_list | join('|') }})' | awk '{ print $1 }' | xargs systemctl stop + systemctl -a | grep -E 'kolla-({{ stop_service_list | join('|') }})' | awk '{ print $1 }' | xargs systemctl stop diff --git a/releasenotes/notes/remove-egrep-bf2184856b46532b.yaml b/releasenotes/notes/remove-egrep-bf2184856b46532b.yaml new file mode 100644 index 0000000000..8bb6511fe6 --- /dev/null +++ b/releasenotes/notes/remove-egrep-bf2184856b46532b.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Removed ``egrep`` usage from scripts. Instances have been replaced with + ``grep -E``. This resolves the warning ``egrep: warning: egrep is + obsolescent; using grep -E``.