summaryrefslogtreecommitdiffstats
path: root/playbooks/aws/openshift-cluster/build_ami.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/build_ami.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/build_ami.yml')
-rw-r--r--playbooks/aws/openshift-cluster/build_ami.yml70
1 files changed, 14 insertions, 56 deletions
diff --git a/playbooks/aws/openshift-cluster/build_ami.yml b/playbooks/aws/openshift-cluster/build_ami.yml
index 1e54f0467..1ab1e8041 100644
--- a/playbooks/aws/openshift-cluster/build_ami.yml
+++ b/playbooks/aws/openshift-cluster/build_ami.yml
@@ -17,35 +17,17 @@
- name: openshift_aws_region
msg: "openshift_aws_region={{ openshift_aws_region | default('us-east-1') }}"
- - name: create an instance and prepare for ami
- include_role:
- name: openshift_aws
- tasks_from: build_ami.yml
- vars:
- openshift_aws_node_group_type: compute
+- include: provision_vpc.yml
- - name: fetch newly created instances
- ec2_remote_facts:
- region: "{{ openshift_aws_region | default('us-east-1') }}"
- filters:
- "tag:Name": "{{ openshift_aws_base_ami_name | default('ami_base') }}"
- instance-state-name: running
- register: instancesout
- retries: 20
- delay: 3
- until: instancesout.instances|length > 0
+- include: provision_ssh_keypair.yml
- - name: wait for ssh to become available
- wait_for:
- port: 22
- host: "{{ instancesout.instances[0].public_ip_address }}"
- timeout: 300
- search_regex: OpenSSH
+- include: provision_sec_group.yml
+ vars:
+ openshift_aws_node_group_type: compute
- - name: add host to nodes
- add_host:
- groups: nodes
- name: "{{ instancesout.instances[0].public_dns_name }}"
+- include: provision_instance.yml
+ vars:
+ openshift_aws_node_group_type: compute
- hosts: nodes
gather_facts: False
@@ -54,34 +36,10 @@
set_fact:
ansible_ssh_user: "{{ openshift_aws_build_ami_ssh_user | default('root') }}"
-- name: normalize groups
- include: ../../byo/openshift-cluster/initialize_groups.yml
+# This is the part that installs all of the software and configs for the instance
+# to become a node.
+- include: ../../common/openshift-node/image_prep.yml
-- name: run the std_include
- include: ../../common/openshift-cluster/evaluate_groups.yml
-
-- name: run the std_include
- include: ../../common/openshift-cluster/initialize_facts.yml
-
-- name: run the std_include
- include: ../../common/openshift-cluster/initialize_openshift_repos.yml
-
-- name: run node config setup
- include: ../../common/openshift-node/setup.yml
-
-- name: run node config
- include: ../../common/openshift-node/configure_nodes.yml
-
-- name: Re-enable excluders
- include: ../../common/openshift-node/enable_excluders.yml
-
-- hosts: localhost
- connection: local
- become: no
- tasks:
- - name: seal the ami
- include_role:
- name: openshift_aws
- tasks_from: seal_ami.yml
- vars:
- openshift_aws_ami_name: "openshift-gi-{{ lookup('pipe', 'date +%Y%m%d%H%M')}}"
+- include: seal_ami.yml
+ vars:
+ openshift_aws_ami_name: "openshift-gi-{{ lookup('pipe', 'date +%Y%m%d%H%M')}}"