summaryrefslogtreecommitdiffstats
path: root/playbooks/aws/openshift-cluster/install.yml
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-10-05 05:19:53 -0700
committerGitHub <noreply@github.com>2017-10-05 05:19:53 -0700
commit2dde1853efe73b7b6f185ce918aaaefeac20334c (patch)
tree2283cf415cb1544797a8c8b264b2f869741afeee /playbooks/aws/openshift-cluster/install.yml
parentcdbc995e65921210981e9fb3710a36c7d93a35dc (diff)
parentca90c960f14824608e546f71ef777f19ce818c43 (diff)
downloadopenshift-2dde1853efe73b7b6f185ce918aaaefeac20334c.tar.gz
openshift-2dde1853efe73b7b6f185ce918aaaefeac20334c.tar.bz2
openshift-2dde1853efe73b7b6f185ce918aaaefeac20334c.tar.xz
openshift-2dde1853efe73b7b6f185ce918aaaefeac20334c.zip
Merge pull request #5605 from mgugino-upstream-stage/build-provision-split
Automatic merge from submit-queue. Build provision split Make provisioning steps more reusable Reorganizing and making some of the plays more reusable. Depends-on: https://github.com/openshift/openshift-ansible/pull/5565
Diffstat (limited to 'playbooks/aws/openshift-cluster/install.yml')
-rw-r--r--playbooks/aws/openshift-cluster/install.yml63
1 files changed, 7 insertions, 56 deletions
diff --git a/playbooks/aws/openshift-cluster/install.yml b/playbooks/aws/openshift-cluster/install.yml
index 86d58a68e..4d0bf9531 100644
--- a/playbooks/aws/openshift-cluster/install.yml
+++ b/playbooks/aws/openshift-cluster/install.yml
@@ -1,68 +1,19 @@
---
-- name: Setup the vpc and the master node group
+- name: Setup the master node group
hosts: localhost
tasks:
- - name: Alert user to variables needed - clusterid
- debug:
- msg: "openshift_aws_clusterid={{ openshift_aws_clusterid | default('default') }}"
-
- - name: Alert user to variables needed - region
- debug:
- msg: "openshift_aws_region={{ openshift_aws_region | default('us-east-1') }}"
-
- - name: fetch newly created instances
- ec2_remote_facts:
- region: "{{ openshift_aws_region | default('us-east-1') }}"
- filters:
- "tag:clusterid": "{{ openshift_aws_clusterid | default('default') }}"
- "tag:host-type": master
- instance-state-name: running
- register: instancesout
- retries: 20
- delay: 3
- until: instancesout.instances|length > 0
-
- - name: add new master to masters group
- add_host:
- groups: "masters,etcd,nodes"
- name: "{{ item.public_ip_address }}"
- hostname: "{{ openshift_aws_clusterid | default('default') }}-master-{{ item.id[:-5] }}"
- with_items: "{{ instancesout.instances }}"
-
- - name: wait for ssh to become available
- wait_for:
- port: 22
- host: "{{ item.public_ip_address }}"
- timeout: 300
- search_regex: OpenSSH
- with_items: "{{ instancesout.instances }}"
+ - include_role:
+ name: openshift_aws
+ tasks_from: setup_master_group.yml
- name: set the master facts for hostname to elb
hosts: masters
gather_facts: no
remote_user: root
tasks:
- - name: fetch elbs
- ec2_elb_facts:
- region: "{{ openshift_aws_region | default('us-east-1') }}"
- names:
- - "{{ item }}"
- with_items:
- - "{{ openshift_aws_clusterid | default('default') }}-master-external"
- - "{{ openshift_aws_clusterid | default('default') }}-master-internal"
- delegate_to: localhost
- register: elbs
-
- - debug: var=elbs
-
- - name: set fact
- set_fact:
- openshift_master_cluster_hostname: "{{ elbs.results[1].elbs[0].dns_name }}"
- osm_custom_cors_origins:
- - "{{ elbs.results[1].elbs[0].dns_name }}"
- - "console.{{ openshift_aws_clusterid | default('default') }}.openshift.com"
- - "api.{{ openshift_aws_clusterid | default('default') }}.openshift.com"
- with_items: "{{ groups['masters'] }}"
+ - include_role:
+ name: openshift_aws
+ tasks_from: master_facts.yml
- name: normalize groups
include: ../../byo/openshift-cluster/initialize_groups.yml