Browse Source

Merge pull request #6064 from mtnbikenc/consolidate-init

Playbook Consolidation - Initialization
Scott Dodson 7 years ago
parent
commit
7dcc6292e2
82 changed files with 88 additions and 272 deletions
  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
       name: openshift_aws
       tasks_from: master_facts.yml
       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
 - name: perform the installer openshift-checks
   include: ../../common/openshift-checks/install.yml
   include: ../../common/openshift-checks/install.yml

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

@@ -20,8 +20,6 @@
     action: openshift_health_check
     action: openshift_health_check
     when: openshift_checks is undefined or not openshift_checks
     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
 - 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
 - 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
 - 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
 - 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
 - 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
 - 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
 # Hosted logging on.  See inventory/byo/hosts.*.example for the
 # currently supported method.
 # 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
 - 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
 - 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
 - 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
 - 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
 - include: ../../common/openshift-cluster/redeploy-certificates/check-expiry.yml
   vars:
   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
 - 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
 - include: ../../common/openshift-cluster/redeploy-certificates/check-expiry.yml
   vars:
   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
 - 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
 - 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
 - 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
 - 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
 - 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
 # Hosted logging on.  See inventory/byo/hosts.*.example for the
 # currently supported method.
 # 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
 - 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.
 # 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
 - 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
 - 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
 # Full Control Plane + Nodes Upgrade
 #
 #
-- include: ../../initialize_groups.yml
-
 - include: ../../../../common/openshift-cluster/upgrades/v3_6/upgrade.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.
 # 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
 - 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.
 # 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
 - 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
 # Full Control Plane + Nodes Upgrade
 #
 #
-- include: ../../initialize_groups.yml
-
 - include: ../../../../common/openshift-cluster/upgrades/v3_7/upgrade.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.
 # 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
 - 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.
 # 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
 - 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
 # Full Control Plane + Nodes Upgrade
 #
 #
-- include: ../../initialize_groups.yml
-
 - include: ../../../../common/openshift-cluster/upgrades/v3_8/upgrade.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.
 # 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
 - 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.
 # 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
 - 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
 - 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
 - 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
 - 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
 - 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
 - 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
 - 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
 - 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
 - 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
 - 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
 - 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
 - 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
 - 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
 - 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
 - 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
 - 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
 - name: Ensure there are new_masters or new_nodes
   hosts: localhost
   hosts: localhost
@@ -13,8 +13,11 @@
         add hosts to the new_masters and new_nodes host groups to add
         add hosts to the new_masters and new_nodes host groups to add
         masters.
         masters.
     when:
     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
 - 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
 - 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
 - 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
 - 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
 - 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
 - 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
 - name: Ensure there are new_nodes
   hosts: localhost
   hosts: localhost
@@ -14,6 +14,8 @@
     when:
     when:
     - g_new_node_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-node/config.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
 - name: Gather Cluster facts
-  # Temporarily reverting to OSEv3 until group standardization is complete
-  hosts: OSEv3
+  hosts: oo_all_hosts
   roles:
   roles:
   - openshift_facts
   - openshift_facts
   tasks:
   tasks:
   - openshift_facts:
   - openshift_facts:
       openshift_env: "{{ hostvars[inventory_hostname] | oo_openshift_env }}"
       openshift_env: "{{ hostvars[inventory_hostname] | oo_openshift_env }}"
     register: result
     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
 - 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:
   roles:
   - role: rhel_subscribe
   - role: rhel_subscribe
     when:
     when:

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

@@ -1,6 +1,4 @@
 ---
 ---
-- include: evaluate_groups.yml
-
 - name: Load openshift_facts
 - name: Load openshift_facts
   hosts: oo_masters_to_config:oo_nodes_to_config
   hosts: oo_masters_to_config:oo_nodes_to_config
   roles:
   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:
   vars:
     # Do not allow adding hosts during upgrade.
     # Do not allow adding hosts during upgrade.
     g_new_master_hosts: []
     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:
   vars:
     # Do not allow adding hosts during upgrade.
     # Do not allow adding hosts during upgrade.
     g_new_master_hosts: []
     g_new_master_hosts: []
     g_new_node_hosts: []
     g_new_node_hosts: []
 
 
-- include: ../initialize_facts.yml
+- include: ../../../init/facts.yml
 
 
 - name: Ensure firewall is not switched during upgrade
 - name: Ensure firewall is not switched during upgrade
   hosts: oo_all_hosts
   hosts: oo_all_hosts

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -1,15 +1,12 @@
 ---
 ---
 - name: normalize groups
 - 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
 - name: initialize the facts
-  include: ../openshift-cluster/initialize_facts.yml
+  include: ../../init/facts.yml
 
 
 - name: initialize the repositories
 - name: initialize the repositories
-  include: ../openshift-cluster/initialize_openshift_repos.yml
+  include: ../../init/repos.yml
 
 
 - name: run node config setup
 - name: run node config setup
   include: setup.yml
   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
 - name: Install and configure NetworkManager
   hosts: oo_all_hosts
   hosts: oo_all_hosts

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

@@ -9,11 +9,8 @@
     include_role:
     include_role:
       name: openshift_gcp
       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
 - name: run the config
   include: ../../common/openshift-cluster/config.yml
   include: ../../common/openshift-cluster/config.yml

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

@@ -5,6 +5,9 @@
   become: no
   become: no
   gather_facts: no
   gather_facts: no
   tasks:
   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
   - name: Evaluate groups - g_etcd_hosts or g_new_etcd_hosts required
     fail:
     fail:
       msg: This playbook requires g_etcd_hosts or g_new_etcd_hosts to be set
       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') }}"
           start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
 
 
 - include: evaluate_groups.yml
 - include: evaluate_groups.yml
-  tags:
-  - always
 
 
-- include: initialize_facts.yml
-  tags:
-  - always
+- include: facts.yml
 
 
 - include: sanity_checks.yml
 - include: sanity_checks.yml
-  tags:
-  - always
 
 
 - include: validate_hostnames.yml
 - 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
 - name: Initialization Checkpoint End
   hosts: all
   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
 To ensure the callback plugin is loaded, regardless of ansible.cfg file
 configuration, the plugin has been placed inside the installer_checkpoint role
 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
 is run first for all entry point playbooks, therefore, the initialization of the
 checkpoint plugin has been placed at the beginning of that file.
 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".
 "Complete".
 
 
 ```yaml
 ```yaml
-# common/openshift-cluster/std_include.yml
+# init/main.yml
 ---
 ---
 - name: Initialization Checkpoint Start
 - name: Initialization Checkpoint Start
   hosts: all
   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
 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
 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
 place the 'In Progress' and 'Complete' plays as the first and last plays of the
 phase or component.
 phase or component.
  
  

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

@@ -51,8 +51,7 @@
     - include: preflight/playbooks/tasks/enable_repo.yml
     - include: preflight/playbooks/tasks/enable_repo.yml
       vars: { repo_name: "ose-3.2" }
       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
 - hosts: all
   tasks:
   tasks: