Files
tripleo-quickstart-extras/roles/undercloud-deploy/tasks/novajoin_prep.yml
Sorin Sbarnea 8b2e5653e4 lint: fixed ansible-lint 301 rule
Change-Id: I8ce7e11cd6027b53f1112c5880a5891c778db9d4
2020-01-05 19:37:09 +00:00

56 lines
2.0 KiB
YAML

---
- name: Validate FreeIPA Admin password was passed
fail: msg="freeipa_admin_password is not passed and or blank"
when:
- deploy_supplemental_node|bool and not hostvars['supplemental'].freeipa_admin_password|default('')
- not freeipa_admin_password|default('')
- name: Validate FreeIPA Server hostname was passed
fail: msg="freeipa_server_hostname is not passed and or blank"
when: freeipa_server_hostname is not defined or ( freeipa_server_hostname is defined and freeipa_server_hostname == "" )
- name: Validate a domain for the cloud was given
fail: msg="overcloud_cloud_domain is not passed and or blank"
when: overcloud_cloud_domain is not defined or ( overcloud_cloud_domain is defined and overcloud_cloud_domain == "" )
- name: Validate a undercloud hostname was given
fail: msg="undercloud_undercloud_hostname is not passed and or blank"
when: undercloud_undercloud_hostname is not defined or ( undercloud_undercloud_hostname is defined and undercloud_undercloud_hostname == "" )
- name: Install novajoin package installation script
template:
src: install_novajoin.sh.j2
dest: "{{ working_dir }}/install_novajoin.sh"
mode: 0755
- name: Run the novajoin installation script
shell: >
set -o pipefail &&
{{ working_dir }}/install_novajoin.sh 2>&1 {{ timestamper_cmd }} >
{{ working_dir }}/install_novajoin.sh.log
changed_when: true
- name: Install novajoin preparation script
template:
src: novajoin_prep.sh.j2
dest: "{{ working_dir }}/novajoin_prep.sh"
mode: 0755
- name: Run the novajoin preparation script
shell: >
set -o pipefail &&
{{ working_dir }}/novajoin_prep.sh 2>&1 {{ timestamper_cmd }} >
{{ working_dir }}/novajoin_prep.sh.log
changed_when: true
- name: Register OTP output
command: cat {{ freeipa_otp_key }}
register: ipa_otp_register
changed_when: false
- name: Set OTP Fact for undercloud enrollment
set_fact:
undercloud_ipa_otp: "{{ ipa_otp_register.stdout }}"
when: ipa_otp_register.rc == 0