tripleo-quickstart/playbooks/provision.yml

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: