
This adds an example overcloud deployment playbook that deploys a 1 controller and 1 compute overcloud using only the control plane. Change-Id: Ib82418a85c4f9f40e71bbfe74bd6e17cc0066cd8
60 lines
2.1 KiB
YAML
60 lines
2.1 KiB
YAML
---
|
|
###############################################################################
|
|
# Overcloud deploy playbook
|
|
#
|
|
# Description:
|
|
# This is a basic playbook to execute an overcloud deployment.
|
|
#
|
|
###############################################################################
|
|
- hosts: undercloud
|
|
collections:
|
|
- tripleo.operator
|
|
vars:
|
|
deploy_debug: true
|
|
deploy_templates: /usr/share/openstack-tripleo-heat-templates/
|
|
deploy_controller_count: 1
|
|
deploy_compute_count: 1
|
|
deploy_dns:
|
|
- 1.1.1.1
|
|
- 8.8.8.8
|
|
deploy_ntp:
|
|
- 0.pool.ntp.org
|
|
- 1.pool.ntp.org
|
|
- 2.pool.ntp.org
|
|
- 3.pool.ntp.org
|
|
deploy_env_files:
|
|
- /usr/share/openstack-tripleo-heat-templates/environments/enable-swap.yaml
|
|
- /usr/share/openstack-tripleo-heat-templates/environments/docker-ha.yaml
|
|
- "{{ ansible_env.HOME }}/container-image-prepare.yaml"
|
|
- "{{ ansible_env.HOME }}/parameters.yaml"
|
|
|
|
tasks:
|
|
- name: Gather the rpm package facts
|
|
package_facts:
|
|
|
|
- name: Check if tripleoclient is installed
|
|
fail:
|
|
msg: >-
|
|
TripleO Client is not installed. Please make sure that the client
|
|
has been installed and the repositories are properly configured.
|
|
when: (ansible_facts.distribution_major_version|int <= 7 and not 'python2-tripleoclient' in ansible_facts.packages) or
|
|
(ansible_facts.distribution_major_version|int >= 8 and not 'python3-tripleoclient' in ansible_facts.packages)
|
|
|
|
- name: Generate parameters.yaml
|
|
copy:
|
|
content: |
|
|
parameter_defaults:
|
|
ControllerCount: {{ deploy_controller_count | default(1) }}
|
|
ComputeCount: {{ deploy_compute_count | default(1) }}
|
|
DnsServers: {{ deploy_dns }}
|
|
NtpServer: {{ deploy_ntp }}
|
|
dest: "{{ ansible_env.HOME }}/parameters.yaml"
|
|
|
|
- name: Run overcloud deployment
|
|
include_role:
|
|
name: tripleo_overcloud_deploy
|
|
vars:
|
|
tripleo_overcloud_deploy_debug: "{{ deploy_debug }}"
|
|
tripleo_overcloud_deploy_environment_files: "{{ deploy_env_files }}"
|
|
tripleo_overcloud_deploy_templates: "{{ deploy_templates }}"
|