summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn T Skarbek <jtslear@gmail.com>2015-12-03 22:37:33 -0500
committerJohn T Skarbek <jtslear@gmail.com>2015-12-09 18:27:58 -0500
commit9fc1e7ac3e066add840be7691a9647f6157afe27 (patch)
treeac48f00fe5602dc3e9ea12b85431560057dc4aac
parentbc10731cb98eb4169c430de24044783c7c5183cd (diff)
downloadopenshift-9fc1e7ac3e066add840be7691a9647f6157afe27.tar.gz
openshift-9fc1e7ac3e066add840be7691a9647f6157afe27.tar.bz2
openshift-9fc1e7ac3e066add840be7691a9647f6157afe27.tar.xz
openshift-9fc1e7ac3e066add840be7691a9647f6157afe27.zip
Make the install of openshift_examples optional
* Allows us to make it optional to run the role `openshift_examples` * Defaults to true
-rw-r--r--inventory/byo/hosts.aep.example3
-rw-r--r--inventory/byo/hosts.origin.example3
-rw-r--r--inventory/byo/hosts.ose.example3
-rw-r--r--playbooks/common/openshift-master/config.yml3
-rw-r--r--roles/openshift_common/tasks/main.yml1
-rw-r--r--roles/openshift_examples/README.md9
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py1
7 files changed, 21 insertions, 2 deletions
diff --git a/inventory/byo/hosts.aep.example b/inventory/byo/hosts.aep.example
index d5b872e06..096d806a3 100644
--- a/inventory/byo/hosts.aep.example
+++ b/inventory/byo/hosts.aep.example
@@ -21,6 +21,9 @@ ansible_ssh_user=root
# deployment type valid values are origin, online, atomic-enterprise, and openshift-enterprise
deployment_type=atomic-enterprise
+# Install the openshift examples
+#openshift_install_examples=true
+
# Enable cluster metrics
#use_cluster_metrics=true
diff --git a/inventory/byo/hosts.origin.example b/inventory/byo/hosts.origin.example
index 77a3a04b4..6f015c404 100644
--- a/inventory/byo/hosts.origin.example
+++ b/inventory/byo/hosts.origin.example
@@ -21,6 +21,9 @@ ansible_ssh_user=root
# deployment type valid values are origin, online, atomic-enterprise and openshift-enterprise
deployment_type=origin
+# Install the openshift examples
+#openshift_install_examples=true
+
# Enable cluster metrics
#use_cluster_metrics=true
diff --git a/inventory/byo/hosts.ose.example b/inventory/byo/hosts.ose.example
index 5a4310298..778bbfb3a 100644
--- a/inventory/byo/hosts.ose.example
+++ b/inventory/byo/hosts.ose.example
@@ -21,6 +21,9 @@ ansible_ssh_user=root
# deployment type valid values are origin, online, atomic-enterprise, and openshift-enterprise
deployment_type=openshift-enterprise
+# Install the openshift examples
+#openshift_install_examples=true
+
# Enable cluster metrics
#use_cluster_metrics=true
diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml
index becd68dbe..a537797b6 100644
--- a/playbooks/common/openshift-master/config.yml
+++ b/playbooks/common/openshift-master/config.yml
@@ -349,7 +349,8 @@
roles:
- role: openshift_master_cluster
when: openshift_master_ha | bool and openshift.master.cluster_method == "pacemaker"
- - openshift_examples
+ - role: openshift_examples
+ when: openshift.common.install_examples | bool
- role: openshift_cluster_metrics
when: openshift.common.use_cluster_metrics | bool
- role: openshift_manageiq
diff --git a/roles/openshift_common/tasks/main.yml b/roles/openshift_common/tasks/main.yml
index c0982290d..07664b9ec 100644
--- a/roles/openshift_common/tasks/main.yml
+++ b/roles/openshift_common/tasks/main.yml
@@ -14,6 +14,7 @@
cluster_id: "{{ openshift_cluster_id | default('default') }}"
debug_level: "{{ openshift_debug_level | default(2) }}"
hostname: "{{ openshift_hostname | default(None) }}"
+ install_examples: "{{ openshift_install_examples | default(True) }}"
ip: "{{ openshift_ip | default(None) }}"
public_hostname: "{{ openshift_public_hostname | default(None) }}"
public_ip: "{{ openshift_public_ip | default(None) }}"
diff --git a/roles/openshift_examples/README.md b/roles/openshift_examples/README.md
index 7d8735a0a..6ddbe7017 100644
--- a/roles/openshift_examples/README.md
+++ b/roles/openshift_examples/README.md
@@ -11,6 +11,13 @@ ansible.
Requirements
------------
+Facts
+-----
+
+| Name | Default Value | Description |
+-----------------------------|---------------|----------------------------------------|
+| openshift_install_examples | true | Runs the role with the below variables |
+
Role Variables
--------------
@@ -32,7 +39,7 @@ Example Playbook
TODO
----
Currently we use `oc create -f` against various files and we accept non zero return code as a success
-if (and only iff) stderr also contains the string 'already exists'. This means that if one object in the file exists already
+if (and only if) stderr also contains the string 'already exists'. This means that if one object in the file exists already
but others fail to create you won't be aware of the failure. This also means that we do not currently support
updating existing objects.
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 8b3402729..e557853b1 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1057,6 +1057,7 @@ class OpenShiftFacts(object):
common['client_binary'] = 'oc' if os.path.isfile('/usr/bin/oc') else 'osc'
common['admin_binary'] = 'oadm' if os.path.isfile('/usr/bin/oadm') else 'osadm'
common['dns_domain'] = 'cluster.local'
+ common['install_examples'] = True
defaults['common'] = common
if 'master' in roles: