95 lines
2.2 KiB
YAML
95 lines
2.2 KiB
YAML
---
|
|
- include: quickstart.yml
|
|
|
|
# setup for the undercloud
|
|
- name: Prepare the node for installation
|
|
hosts: undercloud
|
|
gather_facts: false
|
|
tags:
|
|
- standalone
|
|
roles:
|
|
- undercloud-setup
|
|
|
|
- name: Add remove ens3 if not required
|
|
hosts: undercloud
|
|
gather_facts: true
|
|
tasks:
|
|
- include_role:
|
|
name: baremetal-prep-virthost
|
|
tasks_from: remove_ens3.yml
|
|
when:
|
|
- ansible_distribution == 'CentOS'
|
|
- ansible_distribution_major_version|int >= 8
|
|
|
|
- name: Gather facts
|
|
hosts: undercloud
|
|
become: false
|
|
tags:
|
|
- standalone
|
|
tasks:
|
|
- name: Ensure all facts are gathered
|
|
setup:
|
|
|
|
# Deploy the standalone
|
|
- name: Deploy the standalone
|
|
hosts: undercloud
|
|
gather_facts: true
|
|
tags:
|
|
- standalone
|
|
roles:
|
|
- standalone
|
|
|
|
- name: Validate the undercloud
|
|
hosts: undercloud
|
|
gather_facts: false
|
|
roles:
|
|
- {role: validate-services, when: validate_services|default(false)|bool}
|
|
- {role: validate-tempest, when: run_tempest|bool}
|
|
tags:
|
|
- standalone
|
|
|
|
- name: Setup virtualenv
|
|
hosts: undercloud
|
|
tasks:
|
|
- name: set python_cmd
|
|
set_fact:
|
|
python_cmd: "python{{ ansible_python.version.major }}"
|
|
cacheable: true
|
|
when: python_cmd is not defined
|
|
|
|
- name: Check if virtualenv is in the system
|
|
command: "{{ python_cmd }} -m virtualenv --version"
|
|
register: virtualenv_exist
|
|
failed_when: false
|
|
changed_when: false
|
|
|
|
- when: virtualenv_exist.rc != 0
|
|
name: Install virtualenv
|
|
become: true
|
|
package:
|
|
state: present
|
|
name: >
|
|
{% if ansible_python.version.major == 3 %}
|
|
python3-virtualenv
|
|
{% else %}
|
|
python-virtualenv
|
|
{% endif %}
|
|
|
|
- name: Validate the deployment
|
|
hosts: undercloud
|
|
# Note(chkumar246): Moved the os_tempest related var at the top
|
|
# of play level in order to have scope for the whole of the play
|
|
# https://bugs.launchpad.net/tripleo/+bug/1838496
|
|
|
|
vars:
|
|
tempest_install_method: distro
|
|
tempest_cloud_name: 'standalone'
|
|
tasks:
|
|
- include_tasks: tempest.yml
|
|
when:
|
|
- not run_tempest|bool
|
|
- use_os_tempest is defined
|
|
- use_os_tempest|bool
|
|
tags:
|
|
- standalone
|