27dca26e9a
We are creating a new featureset064 that will deploy overcloud with custom network + custom overcloud name + IPA integration. For that new featureset, We don't want to add the default file created from cloud-names.yaml.j2 template but instead use the values we defined in ci tht templates[1] for custom networks. Adding a var non_custom_network that defaults to true so that we can override in fs064. testproject: https://review.rdoproject.org/r/c/testproject/+/31954 [1] https://review.opendev.org/c/openstack/tripleo-heat-templates/+/812369 Change-Id: I4fec8997d3f74552b72a6e1a33258c684f683eff
133 lines
4.3 KiB
YAML
133 lines
4.3 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
|
|
|
|
# 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
|
|
- release not in ['mitaka', 'liberty', 'newton']
|
|
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"
|