From 518a90253c8308231f032cc22b7da6241d5334b5 Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Tue, 19 Dec 2017 15:52:50 -0500 Subject: Setup master groups in order to use the master group's ansible_ssh_user to pull bootstrap kubeconfig. --- roles/openshift_aws/tasks/provision_nodes.yml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'roles/openshift_aws') 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 -- cgit v1.2.3