238 lines
8.1 KiB
YAML
238 lines
8.1 KiB
YAML
# Note.. the order of heat templates and args is very important. The last environment that sets a variable takes precedent.
|
|
|
|
- name: Deprecation message for network isolation types
|
|
debug:
|
|
msg: >-
|
|
Network isolation types 'multi-nic', 'bond_with_vlans', 'single_nic_vlans'
|
|
are deprecated in R release, please use 'multiple-nics', 'bond-with-vlans',
|
|
'single-nic-vlans'.
|
|
when: network_isolation_type in ["single_nic_vlans", "bond_with_vlans", "multi-nic"]
|
|
|
|
# NOTE: 'single_nic_vlans' is deprecated
|
|
- name: set network isolation args for single-nic-vlans IPv4
|
|
set_fact:
|
|
network_isolation_args: >-
|
|
-e {{ overcloud_templates_path }}/environments/network-isolation.yaml
|
|
-e {{ overcloud_templates_path }}/environments/net-single-nic-with-vlans.yaml
|
|
-e {{ working_dir }}/network-environment.yaml
|
|
when:
|
|
- network_isolation_type in ["single_nic_vlans", "single-nic-vlans"]
|
|
|
|
- name: set network isolation args for bond-with-vlans IPv4
|
|
set_fact:
|
|
network_isolation_args: >-
|
|
-e {{ overcloud_templates_path }}/environments/network-isolation.yaml
|
|
-e {{ overcloud_templates_path }}/environments/net-bond-with-vlans.yaml
|
|
-e {{ working_dir }}/network-environment.yaml
|
|
when:
|
|
- network_isolation_type in ["bond_with_vlans", "bond-with-vlans"]
|
|
|
|
# NOTE: 'multi-nic' is deprecated
|
|
- name: set network isolation args for multi-nic IPv4
|
|
set_fact:
|
|
network_isolation_args: >-
|
|
-e {{ overcloud_templates_path }}/environments/network-isolation.yaml
|
|
-e {{ overcloud_templates_path }}/environments/net-multiple-nics.yaml
|
|
-e {{ working_dir }}/network-environment.yaml
|
|
when:
|
|
- network_isolation_type in ["multi-nic", "multiple-nics"]
|
|
- not overcloud_ipv6|bool
|
|
|
|
# NOTE: 'multi-nic' is deprecated
|
|
- name: set network isolation args for multi-nic IPv6
|
|
set_fact:
|
|
network_isolation_args: >-
|
|
-e {{ overcloud_templates_path }}/environments/network-isolation-v6.yaml
|
|
-e {{ overcloud_templates_path }}/environments/net-multiple-nics-v6.yaml
|
|
-e {{ working_dir }}/network-environment.yaml
|
|
when:
|
|
- network_isolation_type in ["multi-nic", "multiple-nics"]
|
|
- overcloud_ipv6|bool
|
|
|
|
# Since there are no nic-configs for public-bond in the default
|
|
# tripleo-heat-templates directory, no public-bond specfic
|
|
# /environments/ file is listed.
|
|
# The network-environment.yaml file can point to path where the
|
|
# public-bond nic-configs are stored.
|
|
- name: set network isolation args for public-bond IPv4
|
|
set_fact:
|
|
network_isolation_args: >-
|
|
-e {{ overcloud_templates_path }}/environments/network-isolation.yaml
|
|
-e {{ working_dir }}/network-environment.yaml
|
|
when:
|
|
- network_isolation_type == "public-bond"
|
|
- not overcloud_ipv6|bool
|
|
|
|
- name: set network_args fact
|
|
set_fact:
|
|
network_args: >-
|
|
{% if network_isolation|bool %}{{ network_isolation_args }}{% endif %}
|
|
when:
|
|
- not containerized_overcloud|bool
|
|
|
|
- name: set network_args fact for containers
|
|
set_fact:
|
|
network_args: >-
|
|
{{ network_isolation_args }}
|
|
-e {{ working_dir }}/containers-default-parameters.yaml
|
|
when:
|
|
- containerized_overcloud|bool
|
|
- network_isolation|bool
|
|
- not enable_tls_everywhere|bool
|
|
|
|
- name: set network_args fact for TLS containers
|
|
set_fact:
|
|
network_args: >-
|
|
-e {{ overcloud_templates_path }}/environments/docker-services-tls-everywhere.yaml
|
|
{{ network_isolation_args }}
|
|
-e {{ working_dir }}/containers-default-parameters.yaml
|
|
when:
|
|
- containerized_overcloud|bool
|
|
- network_isolation|bool
|
|
- enable_tls_everywhere|bool
|
|
|
|
- name: set ntp_args
|
|
set_fact:
|
|
ntp_args: >-
|
|
--ntp-server {{ ntp_server }}
|
|
when:
|
|
- ntp_server|default('')
|
|
|
|
- name: enable pacemaker
|
|
set_fact:
|
|
pacemaker_args: >-
|
|
-e {{ overcloud_templates_path }}/environments/puppet-pacemaker.yaml
|
|
when:
|
|
- enable_pacemaker|bool
|
|
- not containerized_overcloud|bool
|
|
|
|
- name: use resource registry
|
|
set_fact:
|
|
resource_registry_nic_configs_args: >-
|
|
-e {{ working_dir }}/resource-registry-nic-configs.yaml
|
|
when: use_resource_registry_nic_configs|bool
|
|
|
|
- name: extract the number of controllers to be deployed
|
|
set_fact: number_of_controllers="{{ deploy_args| regex_replace('^.*--control-scale +([0-9]+).*$', '\\1') | regex_replace('^[^ 0-9]+$', '1') }}"
|
|
|
|
- name: Set cinder-backup
|
|
set_fact:
|
|
backup_args: >-
|
|
-e {{ overcloud_templates_path }}/environments/cinder-backup.yaml
|
|
when: enable_cinder_backup|bool
|
|
|
|
- name: Set cloud-name variables
|
|
set_fact:
|
|
cloud_name_args: >-
|
|
-e {{ working_dir }}/cloud-names.yaml
|
|
when: release not in ['mitaka', 'liberty']
|
|
|
|
- name: set ssl_args fact for releases after mitaka
|
|
set_fact:
|
|
ssl_args: >-
|
|
-e {{ working_dir }}/enable-tls.yaml
|
|
-e {{ overcloud_templates_path }}/environments/tls-endpoints-public-ip.yaml
|
|
-e {{ working_dir }}/inject-trust-anchor.yaml
|
|
when:
|
|
- ssl_overcloud|bool
|
|
- release not in ['mitaka', 'liberty']
|
|
|
|
- name: set ssl_args fact for mitaka/liberty
|
|
set_fact:
|
|
ssl_args: >-
|
|
-e {{ working_dir }}/enable-tls.yaml
|
|
-e {{ working_dir }}/inject-trust-anchor.yaml
|
|
when:
|
|
- ssl_overcloud|bool
|
|
- release in ['mitaka', 'liberty']
|
|
|
|
- name: set novajoin/TLS everywhere fact
|
|
set_fact:
|
|
tls_everywhere_args: >-
|
|
-e {{ overcloud_templates_path }}/environments/services/haproxy-public-tls-certmonger.yaml
|
|
-e {{ overcloud_templates_path }}/environments/enable-internal-tls.yaml
|
|
-e {{ overcloud_templates_path }}/environments/tls-everywhere-endpoints-dns.yaml
|
|
when:
|
|
- enable_tls_everywhere|bool
|
|
- release not in ['mitaka', 'liberty', 'newton']
|
|
|
|
- name: set validation_args fact for mitaka/liberty
|
|
set_fact:
|
|
validation_args: "--validation-errors-fatal --validation-warnings-fatal"
|
|
when: release in ['mitaka', 'liberty']
|
|
|
|
- name: disable L3 HA
|
|
set_fact:
|
|
pacemaker_args: >-
|
|
{{ pacemaker_args }}
|
|
-e {{ working_dir }}/neutronl3ha.yaml
|
|
when:
|
|
- enable_pacemaker|bool
|
|
- number_of_controllers|int < 3
|
|
|
|
- name: set workers_args fact
|
|
set_fact:
|
|
workers_args: >-
|
|
-e {{ overcloud_templates_path }}/environments/low-memory-usage.yaml
|
|
when:
|
|
- release not in ['mitaka', 'liberty']
|
|
- set_overcloud_workers|bool
|
|
|
|
- name: Use KVM for Red Hat distro
|
|
set_fact: libvirt_args="--libvirt-type kvm"
|
|
when:
|
|
- ansible_distribution is defined
|
|
- ansible_distribution == 'RedHat'
|
|
|
|
- name: set container_args fact
|
|
set_fact:
|
|
container_args: >-
|
|
-e {{ overcloud_templates_path }}/environments/docker.yaml
|
|
{% if enable_pacemaker|bool or osp_release is defined%}
|
|
-e {{ overcloud_templates_path }}/environments/docker-ha.yaml
|
|
{% endif %}
|
|
-e {{ working_dir }}/containers-default-parameters.yaml
|
|
when:
|
|
- containerized_overcloud|bool
|
|
|
|
- name: set composable roles args fact
|
|
set_fact:
|
|
composable_args: >-
|
|
--roles-file {{ working_dir }}/overcloud_roles.yaml
|
|
when: composable_roles|bool
|
|
|
|
- name: set composable service args fact
|
|
set_fact:
|
|
composable_args: >-
|
|
{{ composable_args }}
|
|
-e {{ working_dir }}/overcloud_services.yaml
|
|
when: composable_services|bool
|
|
|
|
- name: set the multinode args
|
|
set_fact:
|
|
multinode_args: >-
|
|
-e {{ overcloud_templates_path }}/environments/deployed-server-environment.yaml
|
|
{% if release not in ['mitaka', 'newton'] and overcloud_release|default('') not in ['newton', 'mitaka'] %}
|
|
-e {{ overcloud_templates_path }}/environments/deployed-server-bootstrap-environment-centos.yaml
|
|
{% endif %}
|
|
--overcloud-ssh-user {{ undercloud_user }}
|
|
when: deploy_multinode|bool
|
|
|
|
- name: set the scenario args for composable roles
|
|
set_fact:
|
|
scenario_args: >-
|
|
-e {{ overcloud_templates_path }}/ci/environments/{{ composable_scenario }}
|
|
when: not composable_scenario|trim == ''
|
|
|
|
- name: set swap_args to enable swap file
|
|
set_fact:
|
|
swap_args: >-
|
|
-e {{ overcloud_templates_path }}/environments/enable-swap.yaml
|
|
when: enable_swap|bool and swap_type == 'file'
|
|
|
|
- name: set swap_args to enable swap partition
|
|
set_fact:
|
|
swap_args: >-
|
|
-e {{ overcloud_templates_path }}/environments/enable-swap-partition.yaml
|
|
when: enable_swap|bool and swap_type == 'partition'
|