---

# Script and log locations used during the deploy process.
deploy_script: overcloud-deploy.sh.j2
deploy_log: "{{ working_dir }}/overcloud_deploy.log"
post_deploy_script: overcloud-deploy-post.sh.j2
post_deploy_log: "{{ working_dir }}/overcloud_deploy_post.log"
failed_deployments_log: "{{ working_dir }}/failed_deployments.log"
failed_deployment_list: "{{ working_dir }}/failed_deployment_list.log"
tripleo_config_download_log: "{{ working_dir }}/tripleo_config_download.log"
ansible_steps_log: "{{ working_dir }}/ansible_steps.log"
validate_script: overcloud-validate.sh.j2

# Deploy a specific scenario THT to the Overcloud
composable_scenario: ""

# `floating_ip_cidr` controls the address range used in the network
# created for tempest tests.  We use Ansible's [ipaddr][] filter to
# calculate addresses within this range so that you can provide a
# different value for `floating_ip_cidr` and in many cases not need to
# change any of the related variables.
#
# [ipaddr]: http://docs.ansible.com/ansible/playbooks_filters_ipaddr.html
floating_ip_cidr: "{{ undercloud_network_cidr }}"
floating_ip_start: "{{ floating_ip_cidr|nthhost(100) }}"
floating_ip_end: "{{ floating_ip_cidr|nthhost(120) }}"
external_network_gateway: "{{ floating_ip_cidr|nthhost(1) }}"

# Minutes to wait before giving up on the deploy.
deploy_timeout: 90

# Disable cinder backup by default
enable_cinder_backup: false

# Deployment variations
composable_args: ""
extra_args: ""
topology: ""
ssl_overcloud: false
libvirt_args: "--libvirt-type {{ virt_type|default('qemu') }}"
deploy_ha_ovn: false

use_git_tht_repo: false
tht_branch: master
overcloud_release: "{{ release }}"

# we generally assume that the argument to --control-flavor will
# always be the `oooq_control` that we create from the flavors: key.
# If the deployer needs to use a different name, she can configure a
# `flavor_map` key that will map overcloud roles to specific flavor
# names, like:
#
# flavor_map:
#   control: my_special_control_flavor
#
# This is to avoid having to replace the flavor_args key wholesale for
# a single change.
#
flavor_args: >-
  --control-flavor {{flavor_map.control
  if flavor_map is defined and 'control' in flavor_map else 'oooq_control'}}
  --compute-flavor {{flavor_map.compute
  if flavor_map is defined and 'compute' in flavor_map else 'oooq_compute'}}
  --ceph-storage-flavor {{flavor_map.ceph
  if flavor_map is defined and 'ceph' in flavor_map else 'oooq_ceph'}}
  --block-storage-flavor {{flavor_map.block
  if flavor_map is defined and 'blockstorage' in flavor_map else 'oooq_blockstorage'}}
  --swift-storage-flavor {{flavor_map.swift
  if flavor_map is defined and 'objectstorage' in flavor_map else 'oooq_objectstorage'}}

timeout_args: "--timeout {{deploy_timeout}}"

set_overcloud_workers: true

cloud_name_args: ""
hostnamemap_args: ""
network_args: ""
network_isolation_args: ""
ntp_args: ""
pacemaker_args: ""
workers_args: ""
backup_args: ""
resource_registry_nic_configs_args: ""
use_resource_registry_nic_configs: false

ssl_args: ""
tls_everywhere_args: ""
validation_args: "--validation-warnings-fatal"

enable_swap: false
swap_type: "file"
swap_args: ""

deployed_server_overcloud_roles:
  - name: Controller
    hosts: "$(sed -n 1,1p /etc/nodepool/sub_nodes_private)"

deployed_server_prepare_script: deployed_server_prepare.sh.j2
deployed_server_prepare_log: "{{ working_dir }}/deployed_server_prepare.txt"

container_args: ""
scenario_args: ""
topology_args: ""
multinode_args: ""
ovn_args: ""
telemetry_args: ""
config_download_args: ""
selinux_args: ""

deploy_args: >-
  {{ libvirt_args }}
  {{ flavor_args }}
  {{ timeout_args }}
  {{ ntp_args }}
  {{ cloud_name_args }}
  {{ hostnamemap_args }}
  {{ multinode_args }}
  {{ ovn_args }}
  {{ pacemaker_args }}
  {{ container_args }}
  {{ scenario_args }}
  {{ network_args }}
  {{ resource_registry_nic_configs_args }}
  {{ workers_args }}
  {{ backup_args }}
  {{ ssl_args }}
  {{ tls_everywhere_args }}
  {{ telemetry_args }}
  {{ extra_tht_config_args|default('') }}
  {{ validation_args }}
  {{ swap_args }}
  {{ composable_args }}
  {{ topology }}
  {{ topology_args }}
  {{ config_download_args }}
  {{ selinux_args }}
  {{ extra_args }}

composable_roles: false
composable_services: false
deploy_multinode: false

step_deploy_overcloud: true

deploy_steps_ansible_workflow: false

step_validate_overcloud: true
prepare_tempest: false

# If `test_tempest` is `true`, run tempests tests, otherwise do not
# run them.
test_tempest: false
tempest_regex: smoke
tempest_workers: 2

# enable IPv6 on overcloud deployment
overcloud_ipv6: false

# Wait for hypervisor in the deployment script
hypervisor_wait: true

overcloud_services:
  - name: 'ControllerServices:'
    services:
      - OS::TripleO::Services::Kernel

ara_overcloud_db_path: "/var/lib/mistral/overcloud/ara_overcloud.sqlite"
override_ansiblecfg: true

# Use to populate the resource registry for nic configs
resource_registry_args:
  OS::TripleO::BlockStorage::Net::SoftwareConfig: nic-configs/cinder-storage.yaml
  OS::TripleO::Compute::Net::SoftwareConfig: nic-configs/compute.yaml
  OS::TripleO::Controller::Net::SoftwareConfig: nic-configs/controller.yaml
  OS::TripleO::ObjectStorage::Net::SoftwareConfig: nic-configs/swift-storage.yaml
  OS::TripleO::CephStorage::Net::SoftwareConfig: nic-configs/ceph-storage.yaml

# Used to deploy podman on the undercloud instead of docker
# TODO(emilien) in Stein, we'll switch the default to podman
overcloud_container_cli: docker
# We disable selinux when running under CentOS. It's enabled for RHEL
overcloud_selinux_enabled: >-
   {% if ansible_distribution == 'CentOS' -%}
   permissive
   {%- else -%}
   enforcing
   {%- endif -%}
