From 63ecca817c45242f3db0495d99b947ba0471789e Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Thu, 24 Aug 2017 22:13:07 -0400 Subject: Fixing variables and allowing custom ami. --- playbooks/aws/openshift-cluster/provision_nodes.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'playbooks/aws/openshift-cluster/provision_nodes.yml') diff --git a/playbooks/aws/openshift-cluster/provision_nodes.yml b/playbooks/aws/openshift-cluster/provision_nodes.yml index 5428fb307..87629e354 100644 --- a/playbooks/aws/openshift-cluster/provision_nodes.yml +++ b/playbooks/aws/openshift-cluster/provision_nodes.yml @@ -36,12 +36,27 @@ infra: "infra-{{ ansible_date_time.epoch }}" compute: "compute-{{ ansible_date_time.epoch }}" - - name: include build node group + - name: include build node group for infra include: build_node_group.yml vars: openshift_build_node_type: infra + openshift_clusterid: "{{ provision.clusterid }}" + openshift_region: "{{ provision.region }}" + openshift_use_custom_ami: "{{ proviion.use_custom_ami }}" + openshift_ami_name: "{{ provision.build.ami_name }}" + openshift_ami_tags: "{{ provision.build.openshift_ami_tags }}" + openshift_node_group_config: "{{ provision.node_group_config }}" + openshift_subnet_name: "{{ provision.vpc.subnets[provision.region][0].az }}" - - name: include build node group + + - name: include build node group for compute include: build_node_group.yml vars: openshift_build_node_type: compute + openshift_clusterid: "{{ provision.clusterid }}" + openshift_region: "{{ provision.region }}" + openshift_use_custom_ami: "{{ proviion.use_custom_ami }}" + openshift_ami_name: "{{ provision.build.ami_name }}" + openshift_ami_tags: "{{ provision.build.openshift_ami_tags }}" + openshift_node_group_config: "{{ provision.node_group_config }}" + openshift_subnet_name: "{{ provision.vpc.subnets[provision.region][0].az }}" -- cgit v1.2.3 From efe86b44bce679db38cca654818dc3837bb05f6a Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Wed, 30 Aug 2017 17:47:48 -0400 Subject: Consolidating AWS roles and variables underneath openshift_aws role. --- .../aws/openshift-cluster/provision_nodes.yml | 64 ++++------------------ 1 file changed, 10 insertions(+), 54 deletions(-) (limited to 'playbooks/aws/openshift-cluster/provision_nodes.yml') diff --git a/playbooks/aws/openshift-cluster/provision_nodes.yml b/playbooks/aws/openshift-cluster/provision_nodes.yml index 87629e354..44c686e08 100644 --- a/playbooks/aws/openshift-cluster/provision_nodes.yml +++ b/playbooks/aws/openshift-cluster/provision_nodes.yml @@ -1,62 +1,18 @@ --- -# Get bootstrap config token -# bootstrap should be created on first master -# need to fetch it and shove it into cloud data - name: create the node scale groups hosts: localhost connection: local gather_facts: yes tasks: - - name: get provisioning vars - include_vars: vars.yml + - name: Alert user to variables needed - clusterid + debug: + msg: "openshift_aws_clusterid={{ openshift_aws_clusterid | default('default') }}" - - name: fetch master instances - ec2_remote_facts: - region: "{{ provision.region }}" - filters: - "tag:clusterid": "{{ provision.clusterid }}" - "tag:host-type": master - instance-state-name: running - register: instancesout - retries: 20 - delay: 3 - until: instancesout.instances|length > 0 + - name: Alert user to variables needed - region + debug: + msg: "openshift_aws_region={{ openshift_aws_region | default('us-east-1') }}" - - name: slurp down the bootstrap.kubeconfig - slurp: - src: /etc/origin/master/bootstrap.kubeconfig - delegate_to: "{{ instancesout.instances[0].public_ip_address }}" - remote_user: root - register: bootstrap - - - name: set_fact on localhost for kubeconfig - set_fact: - local_bootstrap: "{{ bootstrap }}" - launch_config_name: - infra: "infra-{{ ansible_date_time.epoch }}" - compute: "compute-{{ ansible_date_time.epoch }}" - - - name: include build node group for infra - include: build_node_group.yml - vars: - openshift_build_node_type: infra - openshift_clusterid: "{{ provision.clusterid }}" - openshift_region: "{{ provision.region }}" - openshift_use_custom_ami: "{{ proviion.use_custom_ami }}" - openshift_ami_name: "{{ provision.build.ami_name }}" - openshift_ami_tags: "{{ provision.build.openshift_ami_tags }}" - openshift_node_group_config: "{{ provision.node_group_config }}" - openshift_subnet_name: "{{ provision.vpc.subnets[provision.region][0].az }}" - - - - name: include build node group for compute - include: build_node_group.yml - vars: - openshift_build_node_type: compute - openshift_clusterid: "{{ provision.clusterid }}" - openshift_region: "{{ provision.region }}" - openshift_use_custom_ami: "{{ proviion.use_custom_ami }}" - openshift_ami_name: "{{ provision.build.ami_name }}" - openshift_ami_tags: "{{ provision.build.openshift_ami_tags }}" - openshift_node_group_config: "{{ provision.node_group_config }}" - openshift_subnet_name: "{{ provision.vpc.subnets[provision.region][0].az }}" + - name: create the node groups + include_role: + name: openshift_aws + tasks_from: provision_nodes.yml -- cgit v1.2.3