From d9c87eaa322c3422d679bcd36422a613278f6345 Mon Sep 17 00:00:00 2001
From: Tomas Sedovic <tomas@sedovic.cz>
Date: Wed, 31 Jan 2018 14:42:58 +0100
Subject: Fix OpenStack playbooks

This shuffles a few playbooks around to fix the ordering between various
facts and prerequisites.
---
 playbooks/openstack/openshift-cluster/install.yml   |  4 ++--
 playbooks/openstack/openshift-cluster/provision.yml | 14 ++++++++++----
 roles/openshift_openstack/defaults/main.yml         | 11 +++++------
 3 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/playbooks/openstack/openshift-cluster/install.yml b/playbooks/openstack/openshift-cluster/install.yml
index 2ab7d14a0..0c70b5ce2 100644
--- a/playbooks/openstack/openshift-cluster/install.yml
+++ b/playbooks/openstack/openshift-cluster/install.yml
@@ -8,8 +8,8 @@
 # values here. We do it in the OSEv3 group vars. Do we need to add
 # some logic here?
 
-- name: run the cluster deploy
-  import_playbook: ../../prerequisites.yml
+- import_playbook: ../../prerequisites.yml
+- import_playbook: ../../init/cluster_facts.yml
 
 - name: run the cluster deploy
   import_playbook: ../../deploy_cluster.yml
diff --git a/playbooks/openstack/openshift-cluster/provision.yml b/playbooks/openstack/openshift-cluster/provision.yml
index 73c1926a0..44e3d00c0 100644
--- a/playbooks/openstack/openshift-cluster/provision.yml
+++ b/playbooks/openstack/openshift-cluster/provision.yml
@@ -26,9 +26,6 @@
   - name: Gather facts for the new nodes
     setup:
 
-- import_playbook: ../../init/basic_facts.yml
-- import_playbook: ../../init/cluster_facts.yml
-
 
 # TODO(shadower): consider splitting this up so people can stop here
 # and configure their DNS if they have to.
@@ -43,7 +40,10 @@
     - openshift_openstack_external_nsupdate_keys is defined
     - openshift_openstack_external_nsupdate_keys.private is defined or openshift_openstack_external_nsupdate_keys.public is defined
 
-- name: Prepare the Nodes in the cluster for installation
+
+- import_playbook: ../../init/basic_facts.yml
+
+- name: Optionally subscribe the RHEL nodes
   hosts: oo_all_hosts
   become: yes
   gather_facts: yes
@@ -63,6 +63,12 @@
     - ansible_distribution == "RedHat"
     - rh_subscribed is defined
 
+
+- name: Prepare the Nodes in the cluster for installation
+  hosts: oo_all_hosts
+  become: yes
+  gather_facts: yes
+  tasks:
   - name: Install dependencies
     import_role:
       name: openshift_openstack
diff --git a/roles/openshift_openstack/defaults/main.yml b/roles/openshift_openstack/defaults/main.yml
index 2bdb81632..30c49d517 100644
--- a/roles/openshift_openstack/defaults/main.yml
+++ b/roles/openshift_openstack/defaults/main.yml
@@ -21,16 +21,15 @@ openshift_openstack_cluster_node_labels:
 
 openshift_openstack_install_debug_packages: false
 openshift_openstack_required_packages:
-  - docker
   - NetworkManager
-  - wget
-  - git
-  - net-tools
-  - bind-utils
-  - bridge-utils
 openshift_openstack_debug_packages:
   - bash-completion
+  - bind-utils
+  - bridge-utils
+  - git
+  - net-tools
   - vim-enhanced
+  - wget
 
 # container-storage-setup
 openshift_openstack_container_storage_setup:
-- 
cgit v1.2.3


From abd62c5613d47a58ea3a5ef636eb79563d02b8f6 Mon Sep 17 00:00:00 2001
From: Tomas Sedovic <tomas@sedovic.cz>
Date: Mon, 12 Feb 2018 16:58:51 +0100
Subject: Remove cluster_facts.yml from the install.yml

It was moved there by accident. There's no reason to have it there
explicitly.
---
 playbooks/openstack/openshift-cluster/install.yml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/playbooks/openstack/openshift-cluster/install.yml b/playbooks/openstack/openshift-cluster/install.yml
index 0c70b5ce2..cb6bf4d11 100644
--- a/playbooks/openstack/openshift-cluster/install.yml
+++ b/playbooks/openstack/openshift-cluster/install.yml
@@ -9,7 +9,6 @@
 # some logic here?
 
 - import_playbook: ../../prerequisites.yml
-- import_playbook: ../../init/cluster_facts.yml
 
 - name: run the cluster deploy
   import_playbook: ../../deploy_cluster.yml
-- 
cgit v1.2.3