summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell Teague <rteague@redhat.com>2017-11-22 15:50:29 -0500
committerGitHub <noreply@github.com>2017-11-22 15:50:29 -0500
commit5874c9f21e750fa665937d629dad0c0d34839185 (patch)
treed7ccd405d5aae55e8ca107ea464331b98d04d67e
parent50637899d574cd1c47749eea96288085d0e68a27 (diff)
parentd32ab495ae636bb381b4e325ca4f4f913947187d (diff)
downloadopenshift-5874c9f21e750fa665937d629dad0c0d34839185.tar.gz
openshift-5874c9f21e750fa665937d629dad0c0d34839185.tar.bz2
openshift-5874c9f21e750fa665937d629dad0c0d34839185.tar.xz
openshift-5874c9f21e750fa665937d629dad0c0d34839185.zip
Merge pull request #6236 from mtnbikenc/consolidate-openshift-provisioners
Playbook Consolidation - openshift-provisioners
-rw-r--r--playbooks/byo/openshift-cluster/openshift-provisioners.yml4
-rw-r--r--playbooks/openshift-provisioners/config.yml4
-rw-r--r--playbooks/openshift-provisioners/private/config.yml (renamed from playbooks/common/openshift-cluster/openshift_provisioners.yml)0
l---------playbooks/openshift-provisioners/private/roles1
-rw-r--r--roles/openshift_provisioners/tasks/install_provisioners.yaml8
-rw-r--r--roles/openshift_provisioners/tasks/install_support.yaml6
-rw-r--r--roles/openshift_provisioners/tasks/main.yaml4
-rw-r--r--roles/openshift_provisioners/tasks/uninstall_provisioners.yaml2
8 files changed, 15 insertions, 14 deletions
diff --git a/playbooks/byo/openshift-cluster/openshift-provisioners.yml b/playbooks/byo/openshift-cluster/openshift-provisioners.yml
deleted file mode 100644
index 0949d33c9..000000000
--- a/playbooks/byo/openshift-cluster/openshift-provisioners.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-- include: ../../init/main.yml
-
-- include: ../../common/openshift-cluster/openshift_provisioners.yml
diff --git a/playbooks/openshift-provisioners/config.yml b/playbooks/openshift-provisioners/config.yml
new file mode 100644
index 000000000..c7814207c
--- /dev/null
+++ b/playbooks/openshift-provisioners/config.yml
@@ -0,0 +1,4 @@
+---
+- import_playbook: ../init/main.yml
+
+- import_playbook: private/config.yml
diff --git a/playbooks/common/openshift-cluster/openshift_provisioners.yml b/playbooks/openshift-provisioners/private/config.yml
index b1ca6f606..b1ca6f606 100644
--- a/playbooks/common/openshift-cluster/openshift_provisioners.yml
+++ b/playbooks/openshift-provisioners/private/config.yml
diff --git a/playbooks/openshift-provisioners/private/roles b/playbooks/openshift-provisioners/private/roles
new file mode 120000
index 000000000..20c4c58cf
--- /dev/null
+++ b/playbooks/openshift-provisioners/private/roles
@@ -0,0 +1 @@
+../../../roles \ No newline at end of file
diff --git a/roles/openshift_provisioners/tasks/install_provisioners.yaml b/roles/openshift_provisioners/tasks/install_provisioners.yaml
index 324fdcc82..2d1217c74 100644
--- a/roles/openshift_provisioners/tasks/install_provisioners.yaml
+++ b/roles/openshift_provisioners/tasks/install_provisioners.yaml
@@ -16,10 +16,10 @@
when: (openshift_provisioners_efs | bool) and openshift_provisioners_efs_aws_secret_access_key is not defined
- name: Install support
- include: install_support.yaml
+ include_tasks: install_support.yaml
- name: Install EFS
- include: install_efs.yaml
+ include_tasks: install_efs.yaml
when: openshift_provisioners_efs | bool
- find: paths={{ mktemp.stdout }}/templates patterns=*.yaml
@@ -32,7 +32,7 @@
changed_when: no
- name: Create objects
- include: oc_apply.yaml
+ include_tasks: oc_apply.yaml
vars:
- kubeconfig: "{{ mktemp.stdout }}/admin.kubeconfig"
- namespace: "{{ openshift_provisioners_project }}"
@@ -51,5 +51,5 @@
when: ansible_check_mode
- name: Scaling up cluster
- include: start_cluster.yaml
+ include_tasks: start_cluster.yaml
when: start_cluster | default(true) | bool
diff --git a/roles/openshift_provisioners/tasks/install_support.yaml b/roles/openshift_provisioners/tasks/install_support.yaml
index d6db81ab9..93c4c394d 100644
--- a/roles/openshift_provisioners/tasks/install_support.yaml
+++ b/roles/openshift_provisioners/tasks/install_support.yaml
@@ -10,8 +10,8 @@
changed_when: False
check_mode: no
-- include: generate_secrets.yaml
+- include_tasks: generate_secrets.yaml
-- include: generate_clusterrolebindings.yaml
+- include_tasks: generate_clusterrolebindings.yaml
-- include: generate_serviceaccounts.yaml
+- include_tasks: generate_serviceaccounts.yaml
diff --git a/roles/openshift_provisioners/tasks/main.yaml b/roles/openshift_provisioners/tasks/main.yaml
index a50c78c97..4ba26b2b8 100644
--- a/roles/openshift_provisioners/tasks/main.yaml
+++ b/roles/openshift_provisioners/tasks/main.yaml
@@ -12,10 +12,10 @@
check_mode: no
tags: provisioners_init
-- include: "{{ role_path }}/tasks/install_provisioners.yaml"
+- include_tasks: install_provisioners.yaml
when: openshift_provisioners_install_provisioners | default(false) | bool
-- include: "{{ role_path }}/tasks/uninstall_provisioners.yaml"
+- include_tasks: uninstall_provisioners.yaml
when: not openshift_provisioners_install_provisioners | default(false) | bool
- name: Delete temp directory
diff --git a/roles/openshift_provisioners/tasks/uninstall_provisioners.yaml b/roles/openshift_provisioners/tasks/uninstall_provisioners.yaml
index 0be4bc7d2..602dee773 100644
--- a/roles/openshift_provisioners/tasks/uninstall_provisioners.yaml
+++ b/roles/openshift_provisioners/tasks/uninstall_provisioners.yaml
@@ -1,6 +1,6 @@
---
- name: stop provisioners
- include: stop_cluster.yaml
+ include_tasks: stop_cluster.yaml
# delete the deployment objects that we had created
- name: delete provisioner api objects