소스 검색

Fix package tasks ordering in OpenStack playbooks

The conditional in the `openshift_repos` include in provision.yml was wrong (the
`rh_subscribed` is defined even when the `rhel_subscribe` role is
skipped.

This removes it entirely, because it's called from the main
prerequisites import anyway.

We also moved any package-related tasks from provision to install,
because the OpenStack nodes may need additional configuration before
they're able to install them (e.g. a RHEL subscription or extra repos
that are not covered by our role.

So `provision.yml` now only creates the nodes and makes sure they're up
and ready for the installation. If the user wants to do anything before
we touch the nodes' contents, they can now do so.
Tomas Sedovic 7 년 전
부모
커밋
5480e62c2f
2개의 변경된 파일15개의 추가작업 그리고 23개의 파일을 삭제
  1. 15 0
      playbooks/openstack/openshift-cluster/install.yml
  2. 0 23
      playbooks/openstack/openshift-cluster/provision.yml

+ 15 - 0
playbooks/openstack/openshift-cluster/install.yml

@@ -10,5 +10,20 @@
 
 - import_playbook: ../../prerequisites.yml
 
+- 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
+      tasks_from: node-packages.yml
+
+  - name: Configure Node
+    import_role:
+      name: openshift_openstack
+      tasks_from: node-configuration.yml
+
 - name: run the cluster deploy
   import_playbook: ../../deploy_cluster.yml

+ 0 - 23
playbooks/openstack/openshift-cluster/provision.yml

@@ -55,26 +55,3 @@
     - ansible_distribution == "RedHat"
     - rhsub_user is defined
     - rhsub_pass is defined
-
-  - name: Enable required YUM repositories
-    import_role:
-      name: openshift_repos
-    when:
-    - 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
-      tasks_from: node-packages.yml
-
-  - name: Configure Node
-    import_role:
-      name: openshift_openstack
-      tasks_from: node-configuration.yml