github.com/openshift/installer@v1.4.17/upi/openstack/update-network-resources.yaml (about)

     1  # Required Python packages:
     2  #
     3  # ansible
     4  # openstackclient
     5  # openstacksdk
     6  # netaddr
     7  
     8  - ansible.builtin.import_playbook: common.yaml
     9  
    10  - hosts: all
    11    gather_facts: no
    12  
    13    tasks:
    14    - name: 'Set tags on the primary cluster network'
    15      ansible.builtin.command:
    16        cmd: "openstack network set --tag {{ primary_cluster_network_tag }} --tag {{ cluster_id_tag }} {{ os_network }}"
    17  
    18    - name: 'Set tags on primary cluster subnet IPv4'
    19      ansible.builtin.command:
    20        cmd: "openstack subnet set --tag {{ cluster_id_tag }} {{ os_subnet }}"
    21  
    22    - name: 'Set tags on primary cluster subnet IPv6'
    23      ansible.builtin.command:
    24        cmd: "openstack subnet set --tag {{ cluster_id_tag }} {{ os_subnet6 }}"
    25      when: os_subnet6_range is defined
    26  
    27    - name: 'Set tags on the API VIP port'
    28      ansible.builtin.command:
    29        cmd: "openstack port set --tag {{ cluster_id_tag }} {{ os_port_api }}"
    30  
    31    - name: 'Set tags on the Ingress VIP port'
    32      ansible.builtin.command:
    33        cmd: "openstack port set --tag {{ cluster_id_tag }} {{ os_port_ingress }}"
    34  
    35    - name: 'Set external router tag'
    36      ansible.builtin.command:
    37        cmd: "openstack router set --tag {{ cluster_id_tag }} {{ os_router }}"
    38      when: os_external_network is defined and os_external_network|length>0
    39  
    40    # NOTE: openstack ansible module doesn't allow attaching Floating IPs to
    41    # ports, let's use the CLI instead
    42    - name: 'Attach the API floating IP to API port'
    43      ansible.builtin.command:
    44        cmd: "openstack floating ip set --port {{ os_port_api }} {{ os_api_fip }}"
    45      when: os_api_fip is defined and os_api_fip|length>0
    46  
    47    # NOTE: openstack ansible module doesn't allow attaching Floating IPs to
    48    # ports, let's use the CLI instead
    49    - name: 'Attach the Ingress floating IP to Ingress port'
    50      ansible.builtin.command:
    51        cmd: "openstack floating ip set --port {{ os_port_ingress }} {{ os_ingress_fip }}"
    52      when: os_ingress_fip is defined and os_ingress_fip|length>0
    53  
    54    - name: 'Set security group to api port'
    55      ansible.builtin.command:
    56        cmd: "openstack port set --security-group {{ os_sg_master }} {{ os_port_api }}"
    57  
    58    - name: 'Set security group to ingress port'
    59      ansible.builtin.command:
    60        cmd: "openstack port set --security-group {{ os_sg_worker }} {{ os_port_ingress }}"