tripleo-quickstart-extras/roles/undercloud-deploy/tasks/post-install.yml

31 lines
927 B
YAML

# Extract the undercloud admin password from
# `undercloud-passwords.conf`.
- name: Get undercloud admin password
command: >
awk -F= '$1 == "undercloud_admin_password" {print $2}'
{{ working_dir }}/undercloud-passwords.conf
register: undercloud_admin_password
changed_when: false
- name: Copy stackrc to ansible host
tags:
- undercloud-post-install
fetch:
flat: true
src: stackrc
dest: "{{ local_working_dir }}/stackrc"
# We need this (and the previous task) in order to replace the
# `sudo hiera admin_password` with an actual password in the `stackrc`
# file.
- name: Update admin password in local credentials file
delegate_to: localhost
lineinfile:
dest: "{{ local_working_dir }}/stackrc"
line: "export OS_PASSWORD={{ undercloud_admin_password.stdout }}"
regexp: "OS_PASSWORD"
- name: Include VBMC setup if enabled
include: configure-vbmc.yml
when: enable_vbmc|bool