
This change removes logic for releases older than train, because these releases are already EOLed. This covers only overcloud-* roles and playbooks and the other items will be covered by separate changes. Note that this change also removes the containerized_* variables because current active releases(>=Train) no longer supports non-containerized deployment. The containerized_overcloud_upgrade variable is still left because the variable is still required by the tripleo-ci-base-multinode-standard job template. Change-Id: If29ec2c2219a28a1f79db0e552e2c622c0a7bda6
168 lines
5.7 KiB
YAML
168 lines
5.7 KiB
YAML
---
|
|
- name: Copy extra THT config files on the undercloud
|
|
copy:
|
|
src: "{{ item }}"
|
|
dest: "{{ working_dir }}"
|
|
with_items: "{{ extra_tht_configs|default([]) }}"
|
|
|
|
- name: Add extra THT config file to the deploy command
|
|
set_fact:
|
|
extra_tht_config_args: >-
|
|
{{ extra_tht_config_args|default('') }}
|
|
{% if extra_tht_configs|default([])|length > 0 %}
|
|
-e {{ extra_tht_configs | default([]) | map('basename') | map('regex_replace', '(.+)', working_dir + "/\1") | join (' -e ') }}
|
|
{% endif %}
|
|
cacheable: true
|
|
|
|
- name: Add custom rules needed in CI infra after switch to nftables.
|
|
when: release not in ['train', 'wallaby']
|
|
block:
|
|
- name: Find the default network on the undercloud node
|
|
set_fact:
|
|
source_ci_ip_address: "{{ ansible_default_ipv4.address }}/{{ ansible_default_ipv4.netmask }}"
|
|
|
|
- name: Convert to obtain the network address in CIDR notation format.
|
|
set_fact:
|
|
source_ci_network: "{{ source_ci_ip_address | ipaddr('network/prefix') }}"
|
|
|
|
- name: Create a yaml file with custom CI rules for VXLAN support, open ssh to all
|
|
vars:
|
|
ips: "{{ ((hostvars | json_query('*.ansible_host') |list) +
|
|
ansible_facts['all_ipv4_addresses'] +
|
|
ansible_facts['all_ipv6_addresses'] +
|
|
[source_ci_network]) | unique | ipaddr }}"
|
|
copy:
|
|
dest: "{{ working_dir }}/ci_custom_firewall_rules.yaml"
|
|
content: |
|
|
parameter_defaults:
|
|
SshFirewallAllowAll: true
|
|
ExtraFirewallRules:
|
|
{% for ip in ips %}
|
|
'020 Allow VXLan from {{ ip }}':
|
|
proto: "udp"
|
|
dport: 4789
|
|
source: "{{ ip }}"
|
|
state: []
|
|
'021 Allow OTV for vxlan from {{ ip }}':
|
|
proto: 'udp'
|
|
dport: 8472
|
|
source: "{{ ip }}"
|
|
state: []
|
|
{% endfor %}
|
|
|
|
# Generate a number of scripts from templates. These are scripts
|
|
# rather than additional ansible tasks so that they can be run
|
|
# manually from the undercloud host.
|
|
- name: Create overcloud deploy script
|
|
template:
|
|
src: "{{ deploy_script }}"
|
|
dest: "{{ working_dir }}/{{ stack_name }}-deploy.sh"
|
|
mode: 0755
|
|
|
|
- name: Create post-deploy script
|
|
template:
|
|
src: "{{ post_deploy_script }}"
|
|
dest: "{{ working_dir }}/{{ stack_name }}-deploy-post.sh"
|
|
mode: 0755
|
|
|
|
- name: Copy neutron l3 ha heat template
|
|
when: enable_pacemaker|bool and number_of_controllers|int < 3
|
|
template:
|
|
src: "neutronl3ha.yaml.j2"
|
|
dest: "{{ working_dir }}/neutronl3ha.yaml"
|
|
|
|
- name: Create config-download environment
|
|
when: (deploy_steps_ansible_workflow|bool) and (deploy_multinode|bool)
|
|
template:
|
|
src: "config-download.yaml.j2"
|
|
dest: "{{ working_dir }}/config-download.yaml"
|
|
|
|
- name: Write composable roles file
|
|
when: composable_roles|bool and generate_overcloud_roles is not defined
|
|
template:
|
|
src: "overcloud_roles.yaml.j2"
|
|
dest: "{{ working_dir }}/overcloud_roles.yaml"
|
|
|
|
- name: Copy composable services file
|
|
when: composable_services|bool
|
|
template:
|
|
src: "overcloud_services.yaml.j2"
|
|
dest: "{{ working_dir }}/overcloud_services.yaml"
|
|
|
|
- name: Create overcloud topology configuration
|
|
template:
|
|
src: "overcloud-topology-config.yaml.j2"
|
|
dest: "{{ working_dir }}/overcloud-topology-config.yaml"
|
|
when: topology_map is defined
|
|
|
|
- name: Create overcloud baremetal deploy yaml
|
|
block:
|
|
- name: Read instackenv.json file
|
|
command: cat "{{ working_dir }}/instackenv.json"
|
|
register: instackenv_json
|
|
|
|
- name: Set the baremetal nodes into a json var
|
|
set_fact:
|
|
baremetal_instackenv: "{{ instackenv_json.stdout | from_json }}"
|
|
|
|
- name: Create overcloud baremetal deploy yaml file
|
|
template:
|
|
src: "overcloud_baremetal_deploy.yaml.j2"
|
|
dest: "{{ working_dir }}/overcloud_baremetal_deploy.yaml"
|
|
when: baremetal_provision|bool and topology_map is defined
|
|
|
|
- name: Cloud names heat environment
|
|
when: non_custom_network|bool
|
|
template:
|
|
src: "cloud-names.yaml.j2"
|
|
dest: "{{ working_dir }}/cloud-names.yaml"
|
|
|
|
- name: Set OS::TripleO::Services::IpaClient for novajoin-less deployment
|
|
when:
|
|
- enable_tls_everywhere|bool and not undercloud_enable_novajoin|bool
|
|
template:
|
|
src: "tls-everywhere.yaml.j2"
|
|
dest: "{{ working_dir }}/tls-everywhere.yaml"
|
|
|
|
- name: Create the hostname_map parameters yaml
|
|
when:
|
|
- groups['overcloud'] is defined
|
|
- groups['overcloud'][0] is defined
|
|
- overcloud_nodes is defined
|
|
- overcloud_nodes[0] is defined
|
|
- overcloud_nodes[0].hostnamemap_override is defined
|
|
template:
|
|
src: "hostnamemap.yaml.j2"
|
|
dest: "{{ working_dir }}/hostnamemap.yaml"
|
|
|
|
- name: Copy nic-configs resource registry template
|
|
when: use_resource_registry_nic_configs|bool
|
|
template:
|
|
src: "resource-registry-nic-configs.yaml.j2"
|
|
dest: "{{ working_dir }}/resource-registry-nic-configs.yaml"
|
|
|
|
- name: Create the overcloud network parameters yaml
|
|
when:
|
|
- overcloud_neutron_global_physnet_mtu is defined
|
|
template:
|
|
src: "overcloud_network_params.yaml.j2"
|
|
dest: "{{ working_dir }}/overcloud_network_params.yaml"
|
|
|
|
- name: Create the overcloud storage parameters yaml
|
|
when:
|
|
- overcloud_cinder_lvm_loop_device_size is defined
|
|
template:
|
|
src: "overcloud_storage_params.yaml.j2"
|
|
dest: "{{ working_dir }}/overcloud_storage_params.yaml"
|
|
|
|
- name: Create overriding ansible.cfg for overcloud deployment
|
|
when: override_ansiblecfg|bool
|
|
template:
|
|
src: "ansible.cfg.j2"
|
|
dest: "{{ working_dir }}/custom_ansible.cfg"
|
|
|
|
- name: Create selinux configuration for overcloud
|
|
template:
|
|
src: "overcloud-selinux-config.yaml.j2"
|
|
dest: "{{ working_dir }}/overcloud-selinux-config.yaml"
|