1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 06:46:36 +01:00
Files
installer/upi/openstack/down-security-groups.yaml
2023-07-28 13:08:18 -04:00

22 lines
538 B
YAML

# Required Python packages:
#
# ansible
# openstackclient
# openstacksdk
- ansible.builtin.import_playbook: common.yaml
- hosts: all
gather_facts: no
tasks:
- name: 'List security groups'
ansible.builtin.command:
cmd: "openstack security group list --tags {{ cluster_id_tag }} -f value -c ID"
register: security_groups
- name: 'Remove the cluster security groups'
ansible.builtin.command:
cmd: "openstack security group delete {{ item.1 }}"
with_indexed_items: "{{ security_groups.stdout_lines }}"