summaryrefslogtreecommitdiffstats
path: root/playbooks/aws/openshift-cluster
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-08-23 17:57:12 -0400
committerKenny Woodson <kwoodson@redhat.com>2017-08-29 10:26:27 -0400
commit3b3f160130f1465a3c40b6d9f9cf66c5de6f9ad6 (patch)
treeeda62eecedf4e4305f7c57f1f85d92e6014aa811 /playbooks/aws/openshift-cluster
parentf2ae4eeecb94d5194131a4c31c2beea5071d84b9 (diff)
downloadopenshift-3b3f160130f1465a3c40b6d9f9cf66c5de6f9ad6.tar.gz
openshift-3b3f160130f1465a3c40b6d9f9cf66c5de6f9ad6.tar.bz2
openshift-3b3f160130f1465a3c40b6d9f9cf66c5de6f9ad6.tar.xz
openshift-3b3f160130f1465a3c40b6d9f9cf66c5de6f9ad6.zip
Merging openshift_node with openshift bootstrap.
Diffstat (limited to 'playbooks/aws/openshift-cluster')
-rw-r--r--playbooks/aws/openshift-cluster/build_ami.yml34
-rw-r--r--playbooks/aws/openshift-cluster/vars.yml11
2 files changed, 25 insertions, 20 deletions
diff --git a/playbooks/aws/openshift-cluster/build_ami.yml b/playbooks/aws/openshift-cluster/build_ami.yml
index fa708ffa1..d27874200 100644
--- a/playbooks/aws/openshift-cluster/build_ami.yml
+++ b/playbooks/aws/openshift-cluster/build_ami.yml
@@ -60,24 +60,39 @@
timeout: 300
search_regex: OpenSSH
- - name: add host to group
+ - name: add host to nodes
add_host:
+ groups: nodes
name: "{{ amibase.tagged_instances.0.public_dns_name }}"
- groups: amibase
-- hosts: amibase
+ - name: set the user to perform installation
+ set_fact:
+ ansible_ssh_user: root
+
+- name: normalize groups
+ include: ../../byo/openshift-cluster/initialize_groups.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
+
+- hosts: nodes
remote_user: root
tasks:
- - name: included required variables
+ - name: get the necessary vars for ami building
include_vars: vars.yml
+ - set_fact:
+ openshift_node_bootstrap: True
+
- name: run openshift image preparation
include_role:
- name: openshift_ami_prep
- vars:
- r_openshift_ami_prep_yum_repositories: "{{ provision.build.yum_repositories }}"
- r_openshift_ami_prep_node: atomic-openshift-node
- r_openshift_ami_prep_master: atomic-openshift-master
+ name: openshift_node
- hosts: localhost
connection: local
@@ -90,6 +105,7 @@
state: present
description: "This was provisioned {{ ansible_date_time.iso8601 }}"
name: "{{ provision.build.ami_name }}{{ lookup('pipe', 'date +%Y%m%d%H%M')}}"
+ tags: "{{ provision.build.openshift_ami_tags }}"
wait: yes
register: amioutput
diff --git a/playbooks/aws/openshift-cluster/vars.yml b/playbooks/aws/openshift-cluster/vars.yml
index b2b0716be..7cfba59b7 100644
--- a/playbooks/aws/openshift-cluster/vars.yml
+++ b/playbooks/aws/openshift-cluster/vars.yml
@@ -42,17 +42,6 @@ provision:
build: # build specific variables here
ami_name: "openshift-gi-"
base_image: ami-bdd5d6ab # base image for AMI to build from
- yum_repositories: # this is an example repository but it requires sslclient info
- - name: openshift-repo
- file: openshift-repo
- description: OpenShift Builds
- baseurl: https://mirror.openshift.com/enterprise/online-int/latest/x86_64/os/
- enabled: yes
- gpgcheck: no
- sslverify: no
- sslclientcert: "/var/lib/yum/client-cert.pem"
- sslclientkey: "/var/lib/yum/client-key.pem"
- gpgkey: "https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-release https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-beta https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-openshifthosted"
# when creating an encrypted AMI please specify use_encryption
use_encryption: False