<commit_before>- block:
  - name: extract our external allocation pools start value
    command: "cat {{ template_base }}/network/{{ network_environment_file }}"
    register: network_env

  - name: get IP address of VIP
    set_fact:
        external_allocation_pool_start: "{{ (network_env.stdout | from_yaml).parameter_defaults.ExternalAllocationPools[0].start }}"
  when:
    - "not 'bmc' in groups"
    - not use_network_data|bool
    - install.version|default(undercloud_version)| openstack_release < 17

- block:
  - name: extract our external vip addess uri
    command: "cat /home/stack/templates/overcloud-vip-deployed.yaml"
    register: network_env

  - name: get IP address of VIP
    set_fact:
        external_allocation_pool_start: "{{ (network_env.stdout | from_yaml).parameter_defaults.VipPortMap.external.ip_address }}"
  when:
    - "not 'bmc' in groups"
    - install.version|default(undercloud_version)| openstack_release >= 17

- block:
  - name: read deployment network configuration from network_data
    command: "cat {{ template_base }}/network/network_data.yaml"
    register: network_template_out
    changed_when: false<commit_msg>service_net_map_replace for get IP address of VIP<commit_after>- block:
  - name: extract our external allocation pools start value
    command: "cat {{ template_base }}/network/{{ network_environment_file }}"
    register: network_env

  - name: get IP address of VIP
    set_fact:
        external_allocation_pool_start: "{{ (network_env.stdout | from_yaml).parameter_defaults.ExternalAllocationPools[0].start }}"
  when:
    - "not 'bmc' in groups"
    - not use_network_data|bool
    - install.version|default(undercloud_version)| openstack_release < 17

- block:
  - name: Load network data
    slurp:
      src: "{{ template_base }}/network/network_data_v2.yaml"
    register: network_data

  - name: Set network data struct fact
    set_fact:
      network_data_struct: "{{ network_data.content | b64decode | from_yaml }}"

  - name: Get external network name
    set_fact:
      external_network_name:
        "{% for network in network_data_struct
             if (network.name in ['External', 'external'] or
                 network.name_lower|default(network.name) in ['External', 'external'])
               or (network.service_net_map_replace is defined
                   and network.service_net_map_replace == 'external')
         %}{{ network.name_lower|default(network.name|lower) }}{% endfor %}"

  - name: extract our external vip addess uri
    slurp:
      src: /home/stack/templates/overcloud-vip-deployed.yaml
    register: overcloud_vip_deployed

  - name: Set overcloud-vip-deployed struct fact
    set_fact:
      overcloud_vip_deployed_struct: "{{ overcloud_vip_deployed.content | b64decode | from_yaml }}"

  - name: get IP address of VIP
    set_fact:
        external_allocation_pool_start: "{{ overcloud_vip_deployed_struct['parameter_defaults']['VipPortMap'][external_network_name]['ip_address'] }}"
  when:
    - "not 'bmc' in groups"
    - install.version|default(undercloud_version)| openstack_release >= 17

- block:
  - name: read deployment network configuration from network_data
    command: "cat {{ template_base }}/network/network_data.yaml"
    register: network_template_out
    changed_when: false
{'fraction_non_alphanumeric': 0.10202845897668786, 'fraction_numerical': 0.004541326067211626, 'mean_word_length': 3.6931818181818183, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4214924', 'n_tokens_mistral': 1019, 'n_tokens_neox': 991, 'n_words': 233}