ae0d47a851
In an attempt to ensure yum repos were in place for any possible package installs the include statement was added agressively to the beginning of the workflow. This passed local testing because the user was present even with --teardown all initially. In fact we have to move it after some of the provisioning steps. This has been confirmed to work with a fresh install of RHEL 7.3 on the virthost w/ minimal packages. Change-Id: I40adea3349c2fc0a2565b6e8ff1718786b9decc5
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
# This playbooks is responsible for preparing a target host.
|
|
#
|
|
# Create an inventory entry for the target host
|
|
- name: Add virthost to inventory
|
|
hosts: localhost
|
|
roles:
|
|
- provision/local
|
|
tags:
|
|
- provision
|
|
|
|
# Create non root user on the virthost
|
|
- name: Create non root user on the virthost
|
|
hosts: virthost
|
|
roles:
|
|
- provision/user
|
|
tags:
|
|
- provision
|
|
|
|
- name: Create target user on virt host
|
|
hosts: virthost
|
|
roles:
|
|
- provision/remote
|
|
tags:
|
|
- provision
|
|
|
|
- name: Add the virthost node to the generated inventory
|
|
hosts: localhost
|
|
gather_facts: yes
|
|
roles:
|
|
- tripleo-inventory
|
|
tags:
|
|
- provision
|
|
|
|
# Allow the user to optionally perform a yum repo setup
|
|
# the virthost_repo_setup variable by default is set to false
|
|
- include: repo-setup-virthost.yml
|
|
when: virthost_repo_setup|bool
|
|
|
|
- name: Check if the target virthost distro is supported (RHEL or CentOS)
|
|
hosts: virthost
|
|
roles:
|
|
- provision/support_check
|
|
tags:
|
|
- provision
|
|
|
|
# We need to force-refresh fact gathering because we are now connecting
|
|
# as a different user ('stack' instead of 'root'), which affects
|
|
# things like ansible_user_id and other facts.
|
|
- name: Run setup again on virthost
|
|
hosts: virthost
|
|
tasks:
|
|
- name: Force-refresh facts
|
|
setup:
|
|
|