diff options
Diffstat (limited to 'playbooks/aws/openshift-cluster/provision.yml')
-rw-r--r-- | playbooks/aws/openshift-cluster/provision.yml | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/playbooks/aws/openshift-cluster/provision.yml b/playbooks/aws/openshift-cluster/provision.yml index dfbf61cc7..88ab0ecb1 100644 --- a/playbooks/aws/openshift-cluster/provision.yml +++ b/playbooks/aws/openshift-cluster/provision.yml @@ -16,6 +16,27 @@ r_openshift_aws_vpc_tags: "{{ provision.vpc.tags }}" r_openshift_aws_vpc_name: "{{ provision.vpc.name | default(provision.clusterid) }}" + - name: bring iam_cert23 into scope + include_role: + name: lib_utils + + - name: upload certificates to AWS IAM + iam_cert23: + state: present + name: "{{ provision.clusterid }}-master-external" + cert: "{{ provision.iam_cert_ca.cert_path }}" + key: "{{ provision.iam_cert_ca.key_path }}" + cert_chain: "{{ provision.iam_cert_ca.chain_path | default(omit) }}" + register: elb_cert_chain + failed_when: + - "'failed' in elb_cert_chain" + - elb_cert_chain.failed + - "'msg' in elb_cert_chain" + - "'already exists' not in elb_cert_chain.msg" + when: provision.iam_cert_ca is defined + + - debug: var=elb_cert_chain + - name: create aws ssh keypair include_role: name: openshift_aws_ssh_keys @@ -36,6 +57,13 @@ include: build_node_group.yml vars: openshift_build_node_type: master + openshift_clusterid: "{{ provision.clusterid }}" + openshift_region: "{{ provision.region }}" + openshift_use_custom_ami: "{{ provision.use_custom_ami }}" + openshift_ami_name: "{{ provision.build.ami_name }}" + openshift_ami_tags: "{{ provision.build.ami_tags }}" + openshift_node_group_config: "{{ provision.node_group_config }}" + openshift_subnet_name: "{{ provision.vpc.subnets[provision.region][0].az }}" - name: fetch new master instances ec2_remote_facts: @@ -49,27 +77,6 @@ delay: 3 until: instancesout.instances|length > 0 - - name: bring iam_cert23 into scope - include_role: - name: lib_utils - - - name: upload certificates to AWS IAM - iam_cert23: - state: present - name: "{{ provision.clusterid }}-master-external" - cert: "{{ provision.iam_cert_ca.cert_path }}" - key: "{{ provision.iam_cert_ca.key_path }}" - cert_chain: "{{ provision.iam_cert_ca.chain_path | default(omit) }}" - register: elb_cert_chain - failed_when: - - "'failed' in elb_cert_chain" - - elb_cert_chain.failed - - "'msg' in elb_cert_chain" - - "'already exists' not in elb_cert_chain.msg" - when: provision.iam_cert_ca is defined - - - debug: var=elb_cert_chain - - name: create our master external and internal load balancers include_role: name: openshift_aws_elb |