12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- ---
- - name: Create the OpenStack resources for cluster installation
- any_errors_fatal: true
- hosts: localhost
- tasks:
- - name: retrieve cluster name from the environment if present
- set_fact:
- openshift_openstack_stack_name: "{{ lookup('env', 'OPENSHIFT_CLUSTER') | ternary (lookup('env', 'OPENSHIFT_CLUSTER'), omit) }}"
- - name: provision cluster
- import_role:
- name: openshift_openstack
- tasks_from: provision.yml
- # NOTE(shadower): Bring in the host groups:
- - name: evaluate groups
- import_playbook: ../../init/evaluate_groups.yml
- - name: Wait for the nodes and gather their facts
- any_errors_fatal: true
- hosts: oo_all_hosts
- become: yes
- # NOTE: The nodes may not be up yet, don't gather facts here.
- # They'll be collected after `wait_for_connection`.
- gather_facts: no
- tasks:
- - name: Wait for the the nodes to come up
- wait_for_connection:
- - name: Gather facts for the new nodes
- setup:
- # TODO(shadower): consider splitting this up so people can stop here
- # and configure their DNS if they have to.
- - name: Populate the DNS entries
- any_errors_fatal: true
- hosts: localhost
- tasks:
- - name: Populate DNS entries
- import_role:
- name: openshift_openstack
- tasks_from: populate-dns.yml
- when:
- - openshift_openstack_external_nsupdate_keys is defined
- - openshift_openstack_external_nsupdate_keys.private is defined or openshift_openstack_external_nsupdate_keys.public is defined
- - import_playbook: ../../init/basic_facts.yml
- - name: Optionally subscribe the RHEL nodes
- any_errors_fatal: true
- hosts: oo_all_hosts
- become: yes
- gather_facts: yes
- tasks:
- - name: Subscribe RHEL instances
- import_role:
- name: rhel_subscribe
- when:
- - ansible_distribution == "RedHat"
- - rhsub_user is defined
- - rhsub_pass is defined
|