Alex Schultz 89128aed0a Undercloud minion role
Provide a playbook and undercloud minion deploy role

Depends-On: https://review.opendev.org/#/c/672318/
Change-Id: Ia63561b9b7e8638e2d1869d4ad608a9b00da4deb
2019-07-29 15:36:16 -06:00

58 lines
2.1 KiB
YAML

---
# Creat the scripts that will be used to deploy the undercloud minion
# environment.
- name: Check the dns information provided by the virthost
shell: >
awk 'match($0, /nameserver\s+(([0-9]{1,3}.?){4})/,address){ print address[1] }' /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 minion configuration
template:
src: "{{ minion_config_file }}"
dest: "./minion.conf"
mode: 0600
- name: Create minion install script
template:
src: "{{ minion_install_script }}"
dest: "{{ working_dir }}/minion-install.sh"
mode: 0755
- name: Prepare undercloud custom t-h-t branch/refspec
include_role:
name: tht-prep-config
vars:
custom_tht_log: "{{ undercloud_custom_tht_log }}"
custom_tht_script: "{{ undercloud_custom_tht_script }}"
tht_templates_repo: "{{ undercloud_templates_repo|default('') }}"
tht_templates_refspec: "{{ undercloud_templates_refspec|default('') }}"
tht_templates_branch: "{{ undercloud_templates_branch|default('') }}"
tht_templates_path: "{{ undercloud_templates_path }}"
composable_scenario: "{{ undercloud_composable_scenario }}"
upgrade_composable_scenario: "{{ undercloud_upgrade_composable_scenario }}"
prep_post_hook_script: "{{ undercloud_prep_post_hook_script }}"
download_templates_rpm: "{{ download_undercloud_templates_rpm }}"
tht_rpm_url: "{{ undercloud_tht_rpm_url }}"
when:
- undercloud_templates_branch is defined or undercloud_templates_refspec is defined
- undercloud_templates_repo is defined
- undercloud_templates_path is defined
- name: Create the minion parameter defaults file.
template:
src: minion-parameter-defaults.yaml.j2
dest: "{{ working_dir }}/minion-parameter-defaults.yaml"
mode: 0600
- name: Write containers-prepare-parameter.yaml
template:
src: containers-prepare-parameter.yaml.j2
dest: "{{ working_dir }}/containers-prepare-parameter.yaml"