Files
tripleo-quickstart-extras/roles/overcloud-prep-config/tasks/main.yml
Sagi Shnaidman f791f5b3cd Add pipefail to each command that piped with timestamp
When pipe is added to command, it should still exit with its
result code, so save it by setting pipeline option before each
command.

Close-Bug: #1676156
Change-Id: Ibbe49b4a15a5b7825447a563fe35af85fd48b3ff
2017-03-26 19:49:32 +03:00

81 lines
2.7 KiB
YAML

---
- name: Deprecation message for network isolation types
debug:
msg: >-
Network isolation type 'bond_with_vlans' is deprecated in R release,
please use 'bond-with-vlans'.
when: network_isolation_type is defined and network_isolation_type == "bond_with_vlans"
- name: Add PublicVirtualFixedIPs Argument to network environment file
set_fact:
network_environment_args: >-
{{ network_environment_args | combine(public_virtual_fixed_ips) }}
when: ssl_overcloud|bool and undercloud_type != "baremetal"
- name: Create network environment file for network isolation
template:
src: "{{ network_environment_file }}"
dest: "{{ working_dir }}/network-environment.yaml"
mode: 0644
when: network_isolation|bool and undercloud_type != "baremetal"
- when: undercloud_type == "baremetal"
block:
- name: "Push baremetal instackenv.json"
copy:
src: "{{ baremetal_instackenv }}"
dest: "{{ working_dir }}/instackenv.json"
- name: "Push network-environment.yaml"
copy:
src: "{{ baremetal_network_environment }}"
dest: "{{ working_dir }}/network-environment.yaml"
# NOTE: 'bond_with_vlans' is deprecated
- when: network_isolation_type is defined and network_isolation_type in ["bond-with-vlans", "bond_with_vlans"]
block:
- name: Create bond-with-vlans nic-configs script
template:
src: "{{ bond_with_vlans_copy_nic_configs_script }}"
dest: "{{ working_dir }}/bond-with-vlans-copy-nic-configs.sh"
mode: 0755
- name: Modify the nic-configs file to use Linux bonds
shell: >
set -o pipefail &&
{{ working_dir }}/bond-with-vlans-copy-nic-configs.sh 2>&1 {{ timestamper_cmd }} >
{{ bond_with_vlans_nic_configs_log }}
- name: "Push baremetal nic-configs directory (if defined)"
copy:
src: "{{ baremetal_nic_configs }}"
dest: "{{ working_dir }}"
when: baremetal_nic_configs is defined
- name: Create overcloud custom tht script
template:
src: "{{ overcloud_custom_tht_script }}"
dest: "{{ working_dir }}/overcloud-custom-tht-script.sh"
mode: 0755
- name: Checkout custom tht heat templates from src
shell: >
set -o pipefail &&
{{ working_dir }}/overcloud-custom-tht-script.sh 2>&1 {{ timestamper_cmd }} >
{{ overcloud_custom_tht_log }}
- 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('') }}
-e {{ working_dir }}/{{ item | basename }}
with_items: "{{ extra_tht_configs|default([]) }}"