Browse Source

Merge pull request #6231 from mtnbikenc/include-deprecation-openshift-master

Include Deprecation - openshift-master
Russell Teague 7 years ago
parent
commit
4e6df8801f

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

@@ -85,10 +85,10 @@
   - include: "{{ openshift_master_upgrade_hook }}"
     when: openshift_master_upgrade_hook is defined
 
-  - include: ../../../openshift-master/private/restart_hosts.yml
+  - include: ../../../openshift-master/private/tasks/restart_hosts.yml
     when: openshift.common.rolling_restart_mode == 'system'
 
-  - include: ../../../openshift-master/private/restart_services.yml
+  - include: ../../../openshift-master/private/tasks/restart_services.yml
     when: openshift.common.rolling_restart_mode == 'services'
 
   # Run the post-upgrade hook if defined:

+ 2 - 2
playbooks/openshift-master/additional_config.yml

@@ -1,4 +1,4 @@
 ---
-- include: ../init/main.yml
+- import_playbook: ../init/main.yml
 
-- include: private/additional_config.yml
+- import_playbook: private/additional_config.yml

+ 2 - 2
playbooks/openshift-master/certificates.yml

@@ -1,4 +1,4 @@
 ---
-- include: ../init/main.yml
+- import_playbook: ../init/main.yml
 
-- include: private/certificates.yml
+- import_playbook: private/certificates.yml

+ 2 - 2
playbooks/openshift-master/config.yml

@@ -1,4 +1,4 @@
 ---
-- include: ../init/main.yml
+- import_playbook: ../init/main.yml
 
-- include: private/config.yml
+- import_playbook: private/config.yml

+ 2 - 2
playbooks/openshift-master/private/config.yml

@@ -11,7 +11,7 @@
           status: "In Progress"
           start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
 
-- include: certificates.yml
+- import_playbook: certificates.yml
 
 - name: Disable excluders
   hosts: oo_masters_to_config
@@ -229,7 +229,7 @@
   hosts: oo_masters
   serial: 1
   tasks:
-  - include: tasks/wire_aggregator.yml
+  - include_tasks: tasks/wire_aggregator.yml
 
 - name: Re-enable excluder if it was previously enabled
   hosts: oo_masters_to_config

+ 4 - 5
playbooks/openshift-master/private/restart.yml

@@ -1,5 +1,5 @@
 ---
-- include: validate_restart.yml
+- import_playbook: validate_restart.yml
 
 - name: Restart masters
   hosts: oo_masters_to_config
@@ -7,13 +7,12 @@
     openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"
   serial: 1
   handlers:
-  - include: ../../../roles/openshift_master/handlers/main.yml
-    static: yes
+  - import_tasks: ../../../roles/openshift_master/handlers/main.yml
   roles:
   - openshift_facts
   post_tasks:
-  - include: restart_hosts.yml
+  - include_tasks: tasks/restart_hosts.yml
     when: openshift_rolling_restart_mode | default('services') == 'system'
 
-  - include: restart_services.yml
+  - include_tasks: tasks/restart_services.yml
     when: openshift_rolling_restart_mode | default('services') == 'services'

+ 6 - 6
playbooks/openshift-master/private/scaleup.yml

@@ -44,14 +44,14 @@
     delay: 1
     changed_when: false
 
-- include: set_network_facts.yml
+- import_playbook: set_network_facts.yml
 
-- include: ../../openshift-etcd/private/certificates.yml
+- import_playbook: ../../openshift-etcd/private/certificates.yml
 
-- include: config.yml
+- import_playbook: config.yml
 
-- include: ../../openshift-loadbalancer/private/config.yml
+- import_playbook: ../../openshift-loadbalancer/private/config.yml
 
-- include: ../../openshift-node/private/certificates.yml
+- import_playbook: ../../openshift-node/private/certificates.yml
 
-- include: ../../openshift-node/private/config.yml
+- import_playbook: ../../openshift-node/private/config.yml

playbooks/openshift-master/private/restart_hosts.yml → playbooks/openshift-master/private/tasks/restart_hosts.yml


playbooks/openshift-master/private/restart_services.yml → playbooks/openshift-master/private/tasks/restart_services.yml


+ 2 - 2
playbooks/openshift-master/restart.yml

@@ -1,4 +1,4 @@
 ---
-- include: ../init/main.yml
+- import_playbook: ../init/main.yml
 
-- include: private/restart.yml
+- import_playbook: private/restart.yml

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

@@ -1,5 +1,5 @@
 ---
-- include: ../init/evaluate_groups.yml
+- import_playbook: ../init/evaluate_groups.yml
 
 - name: Ensure there are new_masters or new_nodes
   hosts: localhost
@@ -18,6 +18,6 @@
 
 # Need a better way to do the above check for node without
 # running evaluate_groups and init/main.yml
-- include: ../init/main.yml
+- import_playbook: ../init/main.yml
 
-- include: private/scaleup.yml
+- import_playbook: private/scaleup.yml

+ 1 - 2
roles/cockpit/tasks/main.yml

@@ -1,7 +1,6 @@
 ---
 - name: setup firewall
-  include: firewall.yml
-  static: yes
+  import_tasks: firewall.yml
 
 - name: Install cockpit-ws
   package: name={{ item }} state=present

+ 2 - 2
roles/kuryr/tasks/master.yaml

@@ -1,6 +1,6 @@
 ---
-- name: Perform OpenShit ServiceAccount config
-  include: serviceaccount.yaml
+- name: Perform OpenShift ServiceAccount config
+  include_tasks: serviceaccount.yaml
 
 - name: Create kuryr manifests tempdir
   command: mktemp -d

+ 3 - 4
roles/nuage_master/tasks/main.yaml

@@ -1,7 +1,6 @@
 ---
 - name: setup firewall
-  include: firewall.yml
-  static: yes
+  import_tasks: firewall.yml
 
 - name: Set the Nuage certificate directory fact for Atomic hosts
   set_fact:
@@ -62,7 +61,7 @@
   become: yes
   file: path={{ nuage_mon_rest_server_logdir }} state=directory
 
-- include: serviceaccount.yml
+- include_tasks: serviceaccount.yml
 
 - name: Download the certs and keys
   become: yes
@@ -82,7 +81,7 @@
     - nuage.key
     - nuage.kubeconfig
 
-- include: certificates.yml
+- include_tasks: certificates.yml
 
 - name: Install Nuage VSD user certificate
   become: yes

+ 8 - 9
roles/openshift_master/tasks/main.yml

@@ -31,8 +31,7 @@
   - openshift.common.is_containerized | bool
 
 - name: Open up firewall ports
-  include: firewall.yml
-  static: yes
+  import_tasks: firewall.yml
 
 - name: Install Master package
   package:
@@ -172,13 +171,13 @@
       no_proxy_etcd_host_ips: "{{ openshift_no_proxy_etcd_host_ips }}"
 
 - name: Update journald config
-  include: journald.yml
+  include_tasks: journald.yml
 
 - name: Install the systemd units
-  include: systemd_units.yml
+  include_tasks: systemd_units.yml
 
 - name: Install Master system container
-  include: system_container.yml
+  include_tasks: system_container.yml
   when:
   - openshift.common.is_containerized | bool
   - openshift.common.is_master_system_container | bool
@@ -212,10 +211,10 @@
   - restart master api
   - restart master controllers
 
-- include: bootstrap_settings.yml
+- include_tasks: bootstrap_settings.yml
   when: openshift_master_bootstrap_enabled | default(False)
 
-- include: set_loopback_context.yml
+- include_tasks: set_loopback_context.yml
 
 - name: Start and enable master api on first master
   systemd:
@@ -273,7 +272,7 @@
 
 # A separate wait is required here for native HA since notifies will
 # be resolved after all tasks in the role.
-- include: check_master_api_is_ready.yml
+- include_tasks: check_master_api_is_ready.yml
   when:
   - openshift.master.cluster_method == 'native'
   - master_api_service_status_changed | bool
@@ -323,5 +322,5 @@
   - l_install_result | changed
 
 - name: node bootstrap settings
-  include: bootstrap.yml
+  include_tasks: bootstrap.yml
   when: openshift_master_bootstrap_enabled | default(False)

+ 1 - 1
roles/openshift_master/tasks/systemd_units.yml

@@ -9,7 +9,7 @@
   when:
   - openshift.common.is_containerized | bool
 
-- include: registry_auth.yml
+- include_tasks: registry_auth.yml
 
 - name: Disable the legacy master service if it exists
   systemd:

+ 5 - 5
roles/openshift_master/tasks/upgrade.yml

@@ -1,16 +1,16 @@
 ---
-- include: upgrade/rpm_upgrade.yml
+- include_tasks: upgrade/rpm_upgrade.yml
   when: not openshift.common.is_containerized | bool
 
-- include: upgrade/upgrade_scheduler.yml
+- include_tasks: upgrade/upgrade_scheduler.yml
 
 # master_config_hook is passed in from upgrade play.
-- include: "upgrade/{{ master_config_hook }}"
+- include_tasks: "upgrade/{{ master_config_hook }}"
   when: master_config_hook is defined
 
-- include: journald.yml
+- include_tasks: journald.yml
 
-- include: systemd_units.yml
+- include_tasks: systemd_units.yml
 
 - name: Check for ca-bundle.crt
   stat:

+ 1 - 1
roles/openshift_master_cluster/tasks/main.yml

@@ -10,5 +10,5 @@
   failed_when: false
   when: openshift.master.cluster_method == "pacemaker"
 
-- include: configure.yml
+- include_tasks: configure.yml
   when: "pcs_status | failed and 'Error: cluster is not currently running on this node' in pcs_status.stderr"

+ 1 - 1
roles/openshift_node_group/tasks/main.yml

@@ -1,6 +1,6 @@
 ---
 - name: Build node config maps
-  include: create_config.yml
+  include_tasks: create_config.yml
   vars:
     openshift_node_group_name: "{{ node_group.name }}"
     openshift_node_group_edits: "{{ node_group.edits | default([]) }}"