tripleo-quickstart-extras/roles/undercloud-deploy/tasks/create-scripts.yml

76 lines
2.5 KiB
YAML

# Creat the scripts that will be used to deploy the undercloud
# environment.
- name: Check the dns information provided by the virthost
shell: >
gawk '/^nameserver +/ { print $2 }' /etc/resolv.conf
delegate_to: virthost
register: virthost_nameservers_output
when: nameserver_from_virthost|bool
- name: set name server facts
set_fact:
virthost_nameservers: "{{ virthost_nameservers_output.stdout_lines }}"
when: nameserver_from_virthost|bool
- name: Create undercloud configuration
template:
src: "{{ undercloud_config_file }}"
dest: "./undercloud.conf"
mode: 0600
- when: undercloud_hieradata_override_file is defined
block:
- name: deprecation message
vars:
deprecation_warning_msg: |
WARNING: The variable undercloud_hieradata_override_file
is deprecated for removal since Pike.
Reason: Both the undercloud and overcloud can use
hieradata overrides and we must distinguish between the two.
The variable will be removed in the "R" release.
Please revise your code to use the new variable,
and file name.
debug:
msg: "{{ deprecation_warning_msg.split('\n') }}"
- name: Create the deprecated undercloud hieradata overrides
template:
src: "{{ undercloud_hieradata_override_file }}"
dest: "./hieradata-overrides-classic-undercloud.yaml"
mode: 0600
- name: Create t-h-t driven undercloud hieradata overrides
template:
src: "{{ hieradata_override_file_t_h_t_undercloud }}"
dest: "./hieradata-overrides-t-h-t-undercloud.yaml"
mode: 0600
- name: Create classic undercloud hieradata overrides
template:
src: "{{ hieradata_override_file_classic_undercloud }}"
dest: "./hieradata-overrides-classic-undercloud.yaml"
mode: 0600
- name: Create undercloud install script
template:
src: "{{ undercloud_install_script }}"
dest: "{{ working_dir }}/undercloud-install.sh"
mode: 0755
- name: Prepare custom t-h-t branch/refspec
include_role:
name: overcloud-prep-config
tasks_from: custom_tht
when:
- overcloud_templates_branch is defined or overcloud_templates_refspec is defined
- overcloud_templates_repo is defined
- overcloud_templates_path is defined
static: no
- name: Create the undercloud parameter defaults file.
template:
src: undercloud-parameter-defaults.yaml.j2
dest: "{{ working_dir }}/undercloud-parameter-defaults.yaml"
mode: 0600