Przeglądaj źródła

Merge pull request #6064 from mtnbikenc/consolidate-init

Playbook Consolidation - Initialization
Scott Dodson 7 lat temu
rodzic
commit
7dcc6292e2
82 zmienionych plików z 88 dodań i 272 usunięć
  1. 2 5
      playbooks/aws/openshift-cluster/install.yml
  2. 1 3
      playbooks/byo/openshift-checks/adhoc.yml
  3. 1 3
      playbooks/byo/openshift-checks/health.yml
  4. 1 3
      playbooks/byo/openshift-checks/pre-install.yml
  5. 1 7
      playbooks/byo/openshift-cluster/config.yml
  6. 1 1
      playbooks/byo/openshift-cluster/enable_dnsmasq.yml
  7. 0 10
      playbooks/byo/openshift-cluster/initialize_groups.yml
  8. 1 3
      playbooks/byo/openshift-cluster/openshift-hosted.yml
  9. 1 7
      playbooks/byo/openshift-cluster/openshift-logging.yml
  10. 1 7
      playbooks/byo/openshift-cluster/openshift-metrics.yml
  11. 1 3
      playbooks/byo/openshift-cluster/openshift-prometheus.yml
  12. 1 3
      playbooks/byo/openshift-cluster/openshift-provisioners.yml
  13. 1 7
      playbooks/byo/openshift-cluster/redeploy-certificates.yml
  14. 1 7
      playbooks/byo/openshift-cluster/redeploy-etcd-ca.yml
  15. 1 7
      playbooks/byo/openshift-cluster/redeploy-etcd-certificates.yml
  16. 1 7
      playbooks/byo/openshift-cluster/redeploy-master-certificates.yml
  17. 1 7
      playbooks/byo/openshift-cluster/redeploy-node-certificates.yml
  18. 1 7
      playbooks/byo/openshift-cluster/redeploy-openshift-ca.yml
  19. 1 7
      playbooks/byo/openshift-cluster/redeploy-registry-certificates.yml
  20. 1 7
      playbooks/byo/openshift-cluster/redeploy-router-certificates.yml
  21. 1 7
      playbooks/byo/openshift-cluster/service-catalog.yml
  22. 1 1
      playbooks/byo/openshift-cluster/upgrades/docker/upgrade.yml
  23. 1 3
      playbooks/byo/openshift-cluster/upgrades/upgrade_etcd.yml
  24. 0 2
      playbooks/byo/openshift-cluster/upgrades/v3_6/upgrade.yml
  25. 0 2
      playbooks/byo/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml
  26. 0 2
      playbooks/byo/openshift-cluster/upgrades/v3_6/upgrade_nodes.yml
  27. 0 2
      playbooks/byo/openshift-cluster/upgrades/v3_7/upgrade.yml
  28. 0 2
      playbooks/byo/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml
  29. 0 2
      playbooks/byo/openshift-cluster/upgrades/v3_7/upgrade_nodes.yml
  30. 0 2
      playbooks/byo/openshift-cluster/upgrades/v3_8/upgrade.yml
  31. 0 2
      playbooks/byo/openshift-cluster/upgrades/v3_8/upgrade_control_plane.yml
  32. 0 2
      playbooks/byo/openshift-cluster/upgrades/v3_8/upgrade_nodes.yml
  33. 1 3
      playbooks/byo/openshift-etcd/certificates.yml
  34. 1 3
      playbooks/byo/openshift-etcd/config.yml
  35. 1 3
      playbooks/byo/openshift-etcd/embedded2external.yml
  36. 1 3
      playbooks/byo/openshift-etcd/migrate.yml
  37. 1 3
      playbooks/byo/openshift-etcd/restart.yml
  38. 1 3
      playbooks/byo/openshift-etcd/scaleup.yml
  39. 1 7
      playbooks/byo/openshift-glusterfs/config.yml
  40. 1 7
      playbooks/byo/openshift-glusterfs/registry.yml
  41. 1 3
      playbooks/byo/openshift-loadbalancer/config.yml
  42. 1 3
      playbooks/byo/openshift-management/add_container_provider.yml
  43. 1 3
      playbooks/byo/openshift-management/config.yml
  44. 1 3
      playbooks/byo/openshift-master/additional_config.yml
  45. 1 3
      playbooks/byo/openshift-master/certificates.yml
  46. 1 3
      playbooks/byo/openshift-master/config.yml
  47. 1 3
      playbooks/byo/openshift-master/restart.yml
  48. 6 3
      playbooks/byo/openshift-master/scaleup.yml
  49. 1 3
      playbooks/byo/openshift-nfs/config.yml
  50. 1 3
      playbooks/byo/openshift-node/certificates.yml
  51. 1 3
      playbooks/byo/openshift-node/config.yml
  52. 1 1
      playbooks/byo/openshift-node/network_manager.yml
  53. 1 3
      playbooks/byo/openshift-node/restart.yml
  54. 4 2
      playbooks/byo/openshift-node/scaleup.yml
  55. 4 10
      playbooks/byo/openshift_facts.yml
  56. 2 5
      playbooks/byo/rhel_subscribe.yml
  57. 0 2
      playbooks/common/openshift-cluster/enable_dnsmasq.yml
  58. 1 1
      playbooks/common/openshift-cluster/upgrades/docker/docker_upgrade.yml
  59. 2 2
      playbooks/common/openshift-cluster/upgrades/init.yml
  60. 1 1
      playbooks/common/openshift-cluster/upgrades/v3_6/upgrade.yml
  61. 1 1
      playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml
  62. 1 1
      playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_nodes.yml
  63. 1 1
      playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml
  64. 1 1
      playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml
  65. 1 1
      playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_nodes.yml
  66. 1 1
      playbooks/common/openshift-cluster/upgrades/v3_8/upgrade.yml
  67. 1 1
      playbooks/common/openshift-cluster/upgrades/v3_8/upgrade_control_plane.yml
  68. 1 1
      playbooks/common/openshift-cluster/upgrades/v3_8/upgrade_nodes.yml
  69. 3 6
      playbooks/common/openshift-node/image_prep.yml
  70. 1 1
      playbooks/common/openshift-node/network_manager.yml
  71. 2 5
      playbooks/gcp/openshift-cluster/provision.yml
  72. 3 0
      playbooks/common/openshift-cluster/evaluate_groups.yml
  73. 0 0
      playbooks/init/facts.yml
  74. 3 15
      playbooks/common/openshift-cluster/std_include.yml
  75. 0 0
      playbooks/init/repos.yml
  76. 1 0
      playbooks/init/roles
  77. 0 0
      playbooks/init/sanity_checks.yml
  78. 0 0
      playbooks/init/validate_hostnames.yml
  79. 0 0
      playbooks/init/vars/cluster_hosts.yml
  80. 0 0
      playbooks/init/version.yml
  81. 3 3
      roles/installer_checkpoint/README.md
  82. 1 2
      test/integration/openshift_health_checker/setup_container.yml

+ 2 - 5
playbooks/aws/openshift-cluster/install.yml

@@ -15,11 +15,8 @@
       name: openshift_aws
       tasks_from: master_facts.yml
 
-- name: normalize groups
-  include: ../../byo/openshift-cluster/initialize_groups.yml
-
-- name: run the std_include
-  include: ../../common/openshift-cluster/std_include.yml
+- name: run the init
+  include: ../../init/main.yml
 
 - name: perform the installer openshift-checks
   include: ../../common/openshift-checks/install.yml

+ 1 - 3
playbooks/byo/openshift-checks/adhoc.yml

@@ -20,8 +20,6 @@
     action: openshift_health_check
     when: openshift_checks is undefined or not openshift_checks
 
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-checks/adhoc.yml

+ 1 - 3
playbooks/byo/openshift-checks/health.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-checks/health.yml

+ 1 - 3
playbooks/byo/openshift-checks/pre-install.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-checks/pre-install.yml

+ 1 - 7
playbooks/byo/openshift-cluster/config.yml

@@ -1,10 +1,4 @@
 ---
-- include: initialize_groups.yml
-  tags:
-  - always
-
-- include: ../../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/config.yml

+ 1 - 1
playbooks/byo/openshift-cluster/enable_dnsmasq.yml

@@ -1,4 +1,4 @@
 ---
-- include: initialize_groups.yml
+- include: ../../init/evaluate_groups.yml
 
 - include: ../../common/openshift-cluster/enable_dnsmasq.yml

+ 0 - 10
playbooks/byo/openshift-cluster/initialize_groups.yml

@@ -1,10 +0,0 @@
----
-- name: Create initial host groups for localhost
-  hosts: localhost
-  connection: local
-  become: no
-  gather_facts: no
-  tags:
-  - always
-  tasks:
-  - include_vars: cluster_hosts.yml

+ 1 - 3
playbooks/byo/openshift-cluster/openshift-hosted.yml

@@ -1,6 +1,4 @@
 ---
-- include: initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/openshift_hosted.yml

+ 1 - 7
playbooks/byo/openshift-cluster/openshift-logging.yml

@@ -4,12 +4,6 @@
 # Hosted logging on.  See inventory/byo/hosts.*.example for the
 # currently supported method.
 #
-- include: initialize_groups.yml
-  tags:
-  - always
-
-- include: ../../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/openshift_logging.yml

+ 1 - 7
playbooks/byo/openshift-cluster/openshift-metrics.yml

@@ -1,10 +1,4 @@
 ---
-- include: initialize_groups.yml
-  tags:
-  - always
-
-- include: ../../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/openshift_metrics.yml

+ 1 - 3
playbooks/byo/openshift-cluster/openshift-prometheus.yml

@@ -1,6 +1,4 @@
 ---
-- include: initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/openshift_prometheus.yml

+ 1 - 3
playbooks/byo/openshift-cluster/openshift-provisioners.yml

@@ -1,6 +1,4 @@
 ---
-- include: initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/openshift_provisioners.yml

+ 1 - 7
playbooks/byo/openshift-cluster/redeploy-certificates.yml

@@ -1,11 +1,5 @@
 ---
-- include: initialize_groups.yml
-  tags:
-  - always
-
-- include: ../../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/redeploy-certificates/check-expiry.yml
   vars:

+ 1 - 7
playbooks/byo/openshift-cluster/redeploy-etcd-ca.yml

@@ -1,10 +1,4 @@
 ---
-- include: initialize_groups.yml
-  tags:
-  - always
-
-- include: ../../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/redeploy-certificates/etcd-ca.yml

+ 1 - 7
playbooks/byo/openshift-cluster/redeploy-etcd-certificates.yml

@@ -1,11 +1,5 @@
 ---
-- include: initialize_groups.yml
-  tags:
-  - always
-
-- include: ../../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/redeploy-certificates/check-expiry.yml
   vars:

+ 1 - 7
playbooks/byo/openshift-cluster/redeploy-master-certificates.yml

@@ -1,11 +1,5 @@
 ---
-- include: initialize_groups.yml
-  tags:
-  - always
-
-- include: ../../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/redeploy-certificates/masters-backup.yml
 

+ 1 - 7
playbooks/byo/openshift-cluster/redeploy-node-certificates.yml

@@ -1,11 +1,5 @@
 ---
-- include: initialize_groups.yml
-  tags:
-  - always
-
-- include: ../../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/redeploy-certificates/nodes-backup.yml
 

+ 1 - 7
playbooks/byo/openshift-cluster/redeploy-openshift-ca.yml

@@ -1,10 +1,4 @@
 ---
-- include: initialize_groups.yml
-  tags:
-  - always
-
-- include: ../../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/redeploy-certificates/openshift-ca.yml

+ 1 - 7
playbooks/byo/openshift-cluster/redeploy-registry-certificates.yml

@@ -1,10 +1,4 @@
 ---
-- include: initialize_groups.yml
-  tags:
-  - always
-
-- include: ../../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/redeploy-certificates/registry.yml

+ 1 - 7
playbooks/byo/openshift-cluster/redeploy-router-certificates.yml

@@ -1,10 +1,4 @@
 ---
-- include: initialize_groups.yml
-  tags:
-  - always
-
-- include: ../../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/redeploy-certificates/router.yml

+ 1 - 7
playbooks/byo/openshift-cluster/service-catalog.yml

@@ -4,12 +4,6 @@
 # Hosted logging on.  See inventory/byo/hosts.*.example for the
 # currently supported method.
 #
-- include: initialize_groups.yml
-  tags:
-  - always
-
-- include: ../../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-cluster/service_catalog.yml

+ 1 - 1
playbooks/byo/openshift-cluster/upgrades/docker/upgrade.yml

@@ -1,5 +1,5 @@
 ---
 # Playbook to upgrade Docker to the max allowable version for an OpenShift cluster.
-- include: ../../initialize_groups.yml
+- include: ../../../../init/evaluate_groups.yml
 
 - include: ../../../../common/openshift-cluster/upgrades/docker/docker_upgrade.yml

+ 1 - 3
playbooks/byo/openshift-cluster/upgrades/upgrade_etcd.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../initialize_groups.yml
-
-- include: ../../../common/openshift-cluster/evaluate_groups.yml
+- include: ../../../init/evaluate_groups.yml
 
 - include: ../../../common/openshift-cluster/upgrades/etcd/main.yml

+ 0 - 2
playbooks/byo/openshift-cluster/upgrades/v3_6/upgrade.yml

@@ -2,6 +2,4 @@
 #
 # Full Control Plane + Nodes Upgrade
 #
-- include: ../../initialize_groups.yml
-
 - include: ../../../../common/openshift-cluster/upgrades/v3_6/upgrade.yml

+ 0 - 2
playbooks/byo/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml

@@ -11,6 +11,4 @@
 #
 # You can run the upgrade_nodes.yml playbook after this to upgrade these components separately.
 #
-- include: ../../initialize_groups.yml
-
 - include: ../../../../common/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml

+ 0 - 2
playbooks/byo/openshift-cluster/upgrades/v3_6/upgrade_nodes.yml

@@ -4,6 +4,4 @@
 #
 # Upgrades nodes only, but requires the control plane to have already been upgraded.
 #
-- include: ../../initialize_groups.yml
-
 - include: ../../../../common/openshift-cluster/upgrades/v3_6/upgrade_nodes.yml

+ 0 - 2
playbooks/byo/openshift-cluster/upgrades/v3_7/upgrade.yml

@@ -2,6 +2,4 @@
 #
 # Full Control Plane + Nodes Upgrade
 #
-- include: ../../initialize_groups.yml
-
 - include: ../../../../common/openshift-cluster/upgrades/v3_7/upgrade.yml

+ 0 - 2
playbooks/byo/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml

@@ -11,6 +11,4 @@
 #
 # You can run the upgrade_nodes.yml playbook after this to upgrade these components separately.
 #
-- include: ../../initialize_groups.yml
-
 - include: ../../../../common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml

+ 0 - 2
playbooks/byo/openshift-cluster/upgrades/v3_7/upgrade_nodes.yml

@@ -4,6 +4,4 @@
 #
 # Upgrades nodes only, but requires the control plane to have already been upgraded.
 #
-- include: ../../initialize_groups.yml
-
 - include: ../../../../common/openshift-cluster/upgrades/v3_7/upgrade_nodes.yml

+ 0 - 2
playbooks/byo/openshift-cluster/upgrades/v3_8/upgrade.yml

@@ -2,6 +2,4 @@
 #
 # Full Control Plane + Nodes Upgrade
 #
-- include: ../../initialize_groups.yml
-
 - include: ../../../../common/openshift-cluster/upgrades/v3_8/upgrade.yml

+ 0 - 2
playbooks/byo/openshift-cluster/upgrades/v3_8/upgrade_control_plane.yml

@@ -11,6 +11,4 @@
 #
 # You can run the upgrade_nodes.yml playbook after this to upgrade these components separately.
 #
-- include: ../../initialize_groups.yml
-
 - include: ../../../../common/openshift-cluster/upgrades/v3_8/upgrade_control_plane.yml

+ 0 - 2
playbooks/byo/openshift-cluster/upgrades/v3_8/upgrade_nodes.yml

@@ -4,6 +4,4 @@
 #
 # Upgrades nodes only, but requires the control plane to have already been upgraded.
 #
-- include: ../../initialize_groups.yml
-
 - include: ../../../../common/openshift-cluster/upgrades/v3_8/upgrade_nodes.yml

+ 1 - 3
playbooks/byo/openshift-etcd/certificates.yml

@@ -1,7 +1,5 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-etcd/ca.yml
 

+ 1 - 3
playbooks/byo/openshift-etcd/config.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-etcd/config.yml

+ 1 - 3
playbooks/byo/openshift-etcd/embedded2external.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-etcd/embedded2external.yml

+ 1 - 3
playbooks/byo/openshift-etcd/migrate.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-etcd/migrate.yml

+ 1 - 3
playbooks/byo/openshift-etcd/restart.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-etcd/restart.yml

+ 1 - 3
playbooks/byo/openshift-etcd/scaleup.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-etcd/scaleup.yml

+ 1 - 7
playbooks/byo/openshift-glusterfs/config.yml

@@ -1,10 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-  tags:
-  - always
-
-- include: ../../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-glusterfs/config.yml

+ 1 - 7
playbooks/byo/openshift-glusterfs/registry.yml

@@ -1,10 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-  tags:
-  - always
-
-- include: ../../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-glusterfs/registry.yml

+ 1 - 3
playbooks/byo/openshift-loadbalancer/config.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-loadbalancer/config.yml

+ 1 - 3
playbooks/byo/openshift-management/add_container_provider.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/evaluate_groups.yml
+- include: ../../init/evaluate_groups.yml
 
 - include: ../../common/openshift-management/add_container_provider.yml

+ 1 - 3
playbooks/byo/openshift-management/config.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-management/config.yml

+ 1 - 3
playbooks/byo/openshift-master/additional_config.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-master/additional_config.yml

+ 1 - 3
playbooks/byo/openshift-master/certificates.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-master/certificates.yml

+ 1 - 3
playbooks/byo/openshift-master/config.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-master/config.yml

+ 1 - 3
playbooks/byo/openshift-master/restart.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-master/restart.yml

+ 6 - 3
playbooks/byo/openshift-master/scaleup.yml

@@ -1,5 +1,5 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
+- include: ../../init/evaluate_groups.yml
 
 - name: Ensure there are new_masters or new_nodes
   hosts: localhost
@@ -13,8 +13,11 @@
         add hosts to the new_masters and new_nodes host groups to add
         masters.
     when:
-    - (g_new_master_hosts | default([]) | length == 0) and (g_new_node_hosts | default([]) | length == 0)
+    - g_new_master_hosts | default([]) | length == 0
+    - g_new_node_hosts | default([]) | length == 0
 
-- include: ../../common/openshift-cluster/std_include.yml
+# Need a better way to do the above check for node without
+# running evaluate_groups and init/main.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-master/scaleup.yml

+ 1 - 3
playbooks/byo/openshift-nfs/config.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-nfs/config.yml

+ 1 - 3
playbooks/byo/openshift-node/certificates.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-node/certificates.yml

+ 1 - 3
playbooks/byo/openshift-node/config.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-node/config.yml

+ 1 - 1
playbooks/byo/openshift-node/network_manager.yml

@@ -1,4 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
+- include: ../../init/evaluate_groups.yml
 
 - include: ../../common/openshift-node/network_manager.yml

+ 1 - 3
playbooks/byo/openshift-node/restart.yml

@@ -1,6 +1,4 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
-
-- include: ../../common/openshift-cluster/std_include.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-node/restart.yml

+ 4 - 2
playbooks/byo/openshift-node/scaleup.yml

@@ -1,5 +1,5 @@
 ---
-- include: ../openshift-cluster/initialize_groups.yml
+- include: ../../init/evaluate_groups.yml
 
 - name: Ensure there are new_nodes
   hosts: localhost
@@ -14,6 +14,8 @@
     when:
     - g_new_node_hosts | default([]) | length == 0
 
-- include: ../../common/openshift-cluster/std_include.yml
+# Need a better way to do the above check for node without
+# running evaluate_groups and init/main.yml
+- include: ../../init/main.yml
 
 - include: ../../common/openshift-node/config.yml

+ 4 - 10
playbooks/byo/openshift_facts.yml

@@ -1,19 +1,13 @@
 ---
-- include: openshift-cluster/initialize_groups.yml
-  tags:
-  - always
-
-- include: ../common/openshift-cluster/std_include.yml
-  tags:
-  - always
+- include: ../init/main.yml
 
 - name: Gather Cluster facts
-  # Temporarily reverting to OSEv3 until group standardization is complete
-  hosts: OSEv3
+  hosts: oo_all_hosts
   roles:
   - openshift_facts
   tasks:
   - openshift_facts:
       openshift_env: "{{ hostvars[inventory_hostname] | oo_openshift_env }}"
     register: result
-  - debug: var=result
+  - debug:
+      var: result

+ 2 - 5
playbooks/byo/rhel_subscribe.yml

@@ -1,11 +1,8 @@
 ---
-- include: openshift-cluster/initialize_groups.yml
-  tags:
-  - always
+- include: ../init/evaluate_groups.yml
 
 - name: Subscribe hosts, update repos and update OS packages
-  # Temporarily reverting to OSEv3 until group standardization is complete
-  hosts: OSEv3
+  hosts: oo_all_hosts
   roles:
   - role: rhel_subscribe
     when:

+ 0 - 2
playbooks/common/openshift-cluster/enable_dnsmasq.yml

@@ -1,6 +1,4 @@
 ---
-- include: evaluate_groups.yml
-
 - name: Load openshift_facts
   hosts: oo_masters_to_config:oo_nodes_to_config
   roles:

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/docker/docker_upgrade.yml

@@ -1,5 +1,5 @@
 ---
-- include: ../../evaluate_groups.yml
+- include: ../../../../init/evaluate_groups.yml
   vars:
     # Do not allow adding hosts during upgrade.
     g_new_master_hosts: []

+ 2 - 2
playbooks/common/openshift-cluster/upgrades/init.yml

@@ -1,11 +1,11 @@
 ---
-- include: ../evaluate_groups.yml
+- include: ../../../init/evaluate_groups.yml
   vars:
     # Do not allow adding hosts during upgrade.
     g_new_master_hosts: []
     g_new_node_hosts: []
 
-- include: ../initialize_facts.yml
+- include: ../../../init/facts.yml
 
 - name: Ensure firewall is not switched during upgrade
   hosts: oo_all_hosts

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/v3_6/upgrade.yml

@@ -63,7 +63,7 @@
   tags:
   - pre_upgrade
 
-- include: ../../initialize_openshift_version.yml
+- include: ../../../../init/version.yml
   tags:
   - pre_upgrade
   vars:

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml

@@ -67,7 +67,7 @@
   tags:
   - pre_upgrade
 
-- include: ../../initialize_openshift_version.yml
+- include: ../../../../init/version.yml
   tags:
   - pre_upgrade
   vars:

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_nodes.yml

@@ -56,7 +56,7 @@
   tags:
   - pre_upgrade
 
-- include: ../../initialize_openshift_version.yml
+- include: ../../../../init/version.yml
   tags:
   - pre_upgrade
   vars:

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml

@@ -67,7 +67,7 @@
   tags:
   - pre_upgrade
 
-- include: ../../initialize_openshift_version.yml
+- include: ../../../../init/version.yml
   tags:
   - pre_upgrade
   vars:

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml

@@ -71,7 +71,7 @@
   tags:
   - pre_upgrade
 
-- include: ../../initialize_openshift_version.yml
+- include: ../../../../init/version.yml
   tags:
   - pre_upgrade
   vars:

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_nodes.yml

@@ -56,7 +56,7 @@
   tags:
   - pre_upgrade
 
-- include: ../../initialize_openshift_version.yml
+- include: ../../../../init/version.yml
   tags:
   - pre_upgrade
   vars:

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/v3_8/upgrade.yml

@@ -67,7 +67,7 @@
   tags:
   - pre_upgrade
 
-- include: ../../initialize_openshift_version.yml
+- include: ../../../../init/version.yml
   tags:
   - pre_upgrade
   vars:

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/v3_8/upgrade_control_plane.yml

@@ -71,7 +71,7 @@
   tags:
   - pre_upgrade
 
-- include: ../../initialize_openshift_version.yml
+- include: ../../../../init/version.yml
   tags:
   - pre_upgrade
   vars:

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/v3_8/upgrade_nodes.yml

@@ -56,7 +56,7 @@
   tags:
   - pre_upgrade
 
-- include: ../../initialize_openshift_version.yml
+- include: ../../../../init/version.yml
   tags:
   - pre_upgrade
   vars:

+ 3 - 6
playbooks/common/openshift-node/image_prep.yml

@@ -1,15 +1,12 @@
 ---
 - name: normalize groups
-  include: ../../byo/openshift-cluster/initialize_groups.yml
-
-- name: evaluate the groups
-  include: ../openshift-cluster/evaluate_groups.yml
+  include: ../../init/evaluate_groups.yml
 
 - name: initialize the facts
-  include: ../openshift-cluster/initialize_facts.yml
+  include: ../../init/facts.yml
 
 - name: initialize the repositories
-  include: ../openshift-cluster/initialize_openshift_repos.yml
+  include: ../../init/repos.yml
 
 - name: run node config setup
   include: setup.yml

+ 1 - 1
playbooks/common/openshift-node/network_manager.yml

@@ -1,5 +1,5 @@
 ---
-- include: ../openshift-cluster/evaluate_groups.yml
+- include: ../../init/evaluate_groups.yml
 
 - name: Install and configure NetworkManager
   hosts: oo_all_hosts

+ 2 - 5
playbooks/gcp/openshift-cluster/provision.yml

@@ -9,11 +9,8 @@
     include_role:
       name: openshift_gcp
 
-- name: normalize groups
-  include: ../../byo/openshift-cluster/initialize_groups.yml
-
-- name: run the std_include
-  include: ../../common/openshift-cluster/std_include.yml
+- name: run the init
+  include: ../../init/main.yml
 
 - name: run the config
   include: ../../common/openshift-cluster/config.yml

+ 3 - 0
playbooks/common/openshift-cluster/evaluate_groups.yml

@@ -5,6 +5,9 @@
   become: no
   gather_facts: no
   tasks:
+  - name: Load group name mapping variables
+    include_vars: vars/cluster_hosts.yml
+
   - name: Evaluate groups - g_etcd_hosts or g_new_etcd_hosts required
     fail:
       msg: This playbook requires g_etcd_hosts or g_new_etcd_hosts to be set

playbooks/common/openshift-cluster/initialize_facts.yml → playbooks/init/facts.yml


+ 3 - 15
playbooks/common/openshift-cluster/std_include.yml

@@ -14,28 +14,16 @@
           start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
 
 - include: evaluate_groups.yml
-  tags:
-  - always
 
-- include: initialize_facts.yml
-  tags:
-  - always
+- include: facts.yml
 
 - include: sanity_checks.yml
-  tags:
-  - always
 
 - include: validate_hostnames.yml
-  tags:
-  - node
 
-- include: initialize_openshift_repos.yml
-  tags:
-  - always
+- include: repos.yml
 
-- include: initialize_openshift_version.yml
-  tags:
-  - always
+- include: version.yml
 
 - name: Initialization Checkpoint End
   hosts: all

playbooks/common/openshift-cluster/initialize_openshift_repos.yml → playbooks/init/repos.yml


+ 1 - 0
playbooks/init/roles

@@ -0,0 +1 @@
+../../roles

playbooks/common/openshift-cluster/sanity_checks.yml → playbooks/init/sanity_checks.yml


playbooks/common/openshift-cluster/validate_hostnames.yml → playbooks/init/validate_hostnames.yml


playbooks/byo/openshift-cluster/cluster_hosts.yml → playbooks/init/vars/cluster_hosts.yml


playbooks/common/openshift-cluster/initialize_openshift_version.yml → playbooks/init/version.yml


+ 3 - 3
roles/installer_checkpoint/README.md

@@ -16,7 +16,7 @@ displaying and logging of the installer status at the end of a playbook run.
 
 To ensure the callback plugin is loaded, regardless of ansible.cfg file
 configuration, the plugin has been placed inside the installer_checkpoint role
-which must be called early in playbook execution. The `std_include.yml` playbook
+which must be called early in playbook execution. The `init/main.yml` playbook
 is run first for all entry point playbooks, therefore, the initialization of the
 checkpoint plugin has been placed at the beginning of that file.
 
@@ -89,7 +89,7 @@ phase/component and then a final play for setting `installer_hase_initialize` to
 "Complete".
 
 ```yaml
-# common/openshift-cluster/std_include.yml
+# init/main.yml
 ---
 - name: Initialization Checkpoint Start
   hosts: all
@@ -124,7 +124,7 @@ phase/component and then a final play for setting `installer_hase_initialize` to
 
 Each phase or component of the installer will follow a similar pattern, with the
 exception that the `installer_checkpoint` role does not need to be called since
-it was already loaded by the play in `std_include.yml`.  It is important to
+it was already loaded by the play in `init/main.yml`.  It is important to
 place the 'In Progress' and 'Complete' plays as the first and last plays of the
 phase or component.
  

+ 1 - 2
test/integration/openshift_health_checker/setup_container.yml

@@ -51,8 +51,7 @@
     - include: preflight/playbooks/tasks/enable_repo.yml
       vars: { repo_name: "ose-3.2" }
 
-- include: ../../../playbooks/byo/openshift-cluster/initialize_groups.yml
-- include: ../../../playbooks/common/openshift-cluster/std_include.yml
+- include: ../../../playbooks/init/main.yml
 
 - hosts: all
   tasks: