summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2017-12-19 15:52:50 -0500
committerAndrew Butcher <abutcher@redhat.com>2018-01-09 14:54:40 -0500
commit518a90253c8308231f032cc22b7da6241d5334b5 (patch)
treea4380639dc0deb6c6fb4c5a8e6e1dbd8bb702595
parentb713000887c5ef1d84d376038aacd0c6966d1692 (diff)
downloadopenshift-518a90253c8308231f032cc22b7da6241d5334b5.tar.gz
openshift-518a90253c8308231f032cc22b7da6241d5334b5.tar.bz2
openshift-518a90253c8308231f032cc22b7da6241d5334b5.tar.xz
openshift-518a90253c8308231f032cc22b7da6241d5334b5.zip
Setup master groups in order to use the master group's ansible_ssh_user to pull bootstrap kubeconfig.
-rw-r--r--roles/openshift_aws/tasks/provision_nodes.yml17
1 files changed, 2 insertions, 15 deletions
diff --git a/roles/openshift_aws/tasks/provision_nodes.yml b/roles/openshift_aws/tasks/provision_nodes.yml
index d82f18574..9105b5b4c 100644
--- a/roles/openshift_aws/tasks/provision_nodes.yml
+++ b/roles/openshift_aws/tasks/provision_nodes.yml
@@ -2,25 +2,12 @@
# Get bootstrap config token
# bootstrap should be created on first master
# need to fetch it and shove it into cloud data
-- name: fetch master instances
- ec2_instance_facts:
- region: "{{ openshift_aws_region }}"
- filters:
- "tag:clusterid": "{{ openshift_aws_clusterid }}"
- "tag:host-type": master
- instance-state-name: running
- register: instancesout
- retries: 20
- delay: 3
- until:
- - "'instances' in instancesout"
- - instancesout.instances|length > 0
+- include_tasks: setup_master_group.yml
- name: slurp down the bootstrap.kubeconfig
slurp:
src: /etc/origin/master/bootstrap.kubeconfig
- delegate_to: "{{ instancesout.instances[0].public_ip_address }}"
- remote_user: root
+ delegate_to: "{{ groups.masters.0 }}"
register: bootstrap
- name: set_fact for kubeconfig token