]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
don't use "static" field while including tasks
authorRishabh Dave <ridave@redhat.com>
Fri, 10 Aug 2018 12:16:30 +0000 (08:16 -0400)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Thu, 4 Oct 2018 07:44:28 +0000 (07:44 +0000)
Instead used "import_tasks" and "include_tasks" to tell whether tasks
must be included statically or dynamically.

Fixes: https://github.com/ceph/ceph-ansible/issues/2998
Signed-off-by: Rishabh Dave <ridave@redhat.com>
infrastructure-playbooks/untested-by-ci/purge-multisite.yml
roles/ceph-common/tasks/main.yml
roles/ceph-mon/tasks/main.yml
roles/ceph-osd/tasks/main.yml
roles/ceph-rgw/tasks/main.yml
roles/ceph-rgw/tasks/multisite/main.yml

index c17500e52202492ca3097260698a750a5bd5a905..37608ea090e7aa3d12ffd1e4234947f346ea7c14 100644 (file)
@@ -6,6 +6,6 @@
   - include_tasks: roles/ceph-rgw/tasks/multisite/destroy.yml
 
   handlers:
-  - include: roles/ceph-rgw/handlers/main.yml
     # Ansible 2.1.0 bug will ignore included handlers without this
-    static: True
+  - name: import_tasks roles/ceph-rgw/handlers/main.yml
+    import_tasks: roles/ceph-rgw/handlers/main.yml
index 9a024246f822b1a1f556afbfea3d578c8a5b9e46..049cacf45c8df0761612bd8c983e1d74f90addb7 100644 (file)
@@ -1,55 +1,39 @@
 ---
-- name: include installs/install_on_redhat.yml
-  include: installs/install_on_redhat.yml
-  when:
-    - ansible_os_family == 'RedHat'
+- name: include_tasks installs/install_on_redhat.yml
+  include_tasks: installs/install_on_redhat.yml
+  when: ansible_os_family == 'RedHat'
   tags:
     - package-install
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
-- name: include installs/install_on_suse.yml
-  include: installs/install_on_suse.yml
-  when:
-    - ansible_os_family == 'Suse'
+- name: include_tasks installs/install_on_suse.yml
+  include_tasks: installs/install_on_suse.yml
+  when: ansible_os_family == 'Suse'
   tags:
     - package-install
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
-- name: include installs/install_on_debian.yml
-  include: installs/install_on_debian.yml
-  when:
-    - ansible_os_family == 'Debian'
+- name: include_tasks installs/install_on_debian.yml
+  include_tasks: installs/install_on_debian.yml
+  when: ansible_os_family == 'Debian'
   tags:
     - package-install
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
-- name: include installs/install_on_clear.yml
-  include: installs/install_on_clear.yml
-  when:
-    - ansible_os_family == 'ClearLinux'
+- name: include_tasks installs/install_on_clear.yml
+  include_tasks: installs/install_on_clear.yml
+  when: ansible_os_family == 'ClearLinux'
   tags:
     - package-install
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
-- name: include ntp debian setup tasks
-  include: "misc/ntp_debian.yml"
+- name: include_tasks "misc/ntp_debian.yml"
+  include_tasks: "misc/ntp_debian.yml"
   when:
     - ansible_os_family == 'Debian'
     - ntp_service_enabled
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
-- name: include ntp rpm setup tasks
-  include: "misc/ntp_rpm.yml"
+- name: include_tasks "misc/ntp_rpm.yml"
+  include_tasks: "misc/ntp_rpm.yml"
   when:
     - ansible_os_family in ['RedHat', 'Suse']
     - ntp_service_enabled
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
 - name: get ceph version
   command: ceph --version
   tags:
     - always
 
-- name: include checks/check_firewall.yml
-  include: checks/check_firewall.yml
+- name: include_tasks checks/check_firewall.yml
+  include_tasks: checks/check_firewall.yml
   when:
     - check_firewall
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
-- name: include misc/configure_firewall_rpm.yml
-  include: misc/configure_firewall_rpm.yml
+- name: include_tasks misc/configure_firewall_rpm.yml
+  include_tasks: misc/configure_firewall_rpm.yml
   when:
     - configure_firewall
     - ansible_os_family in ['RedHat', 'Suse']
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
 - name: include facts_mon_fsid.yml
   include_tasks: facts_mon_fsid.yml
index 3cf192d09dc47a4c2a527ba435f597f99ccad2b1..ef6eb621188d64de0f50fa9f4981b4eec110f032 100644 (file)
   import_tasks: start_monitor.yml
   when: not containerized_deployment
 
-- name: include ceph_keys.yml
-  include: ceph_keys.yml
+- name: include_tasks ceph_keys.yml
+  include_tasks: ceph_keys.yml
   when: not containerized_deployment
-  # this avoids the bug mentioned here: https://github.com/ansible/ansible/issues/18206
-  static: no
 
 - name: include secure_cluster.yml
   include_tasks: secure_cluster.yml
index 15399c72a429a04e8db688fd53fc10c65c142cf1..d7ed8e83a53d9e421931fadc1cfebec950f5697a 100644 (file)
@@ -1,8 +1,6 @@
 ---
-- name: include system_tuning.yml
-  include: system_tuning.yml
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
+- name: include_tasks system_tuning.yml
+  include_tasks: system_tuning.yml
 
 - name: install dependencies
   package:
     - not containerized_deployment
     - ansible_os_family != 'ClearLinux'
 
-- name: include common.yml
-  include: common.yml
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
+- name: include_tasks common.yml
+  include_tasks: common.yml
 
 - name: include ceph_disk_cli_options_facts.yml
   include_tasks: ceph_disk_cli_options_facts.yml
   when:
     - osd_scenario != 'lvm'
 
-- name: include scenarios/collocated.yml
-  include: scenarios/collocated.yml
+- name: include_tasks scenarios/collocated.yml
+  include_tasks: scenarios/collocated.yml
   when:
     - osd_scenario == 'collocated'
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
-- name: include scenarios/non-collocated.yml
-  include: scenarios/non-collocated.yml
+- name: include_tasks scenarios/non-collocated.yml
+  include_tasks: scenarios/non-collocated.yml
   when:
     - not osd_auto_discovery
     - osd_scenario == 'non-collocated'
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
-- name: include scenarios/lvm.yml
-  include: scenarios/lvm.yml
+- name: include_tasks scenarios/lvm.yml
+  include_tasks: scenarios/lvm.yml
   when:
     - osd_scenario == 'lvm'
     - lvm_volumes|length > 0
     - not containerized_deployment
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
-- name: include scenarios/lvm-batch.yml
-  include: scenarios/lvm-batch.yml
+- name: include_tasks scenarios/lvm-batch.yml
+  include_tasks: scenarios/lvm-batch.yml
   when:
     - osd_scenario == 'lvm'
     - devices|length > 0
     - not containerized_deployment
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
-- name: include activate_osds.yml
-  include: activate_osds.yml
+- name: include_tasks activate_osds.yml
+  include_tasks: activate_osds.yml
   when:
     - not containerized_deployment
     - osd_scenario != 'lvm'
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
-- name: include start_osds.yml
-  include: start_osds.yml
+- name: include_tasks start_osds.yml
+  include_tasks: start_osds.yml
   when:
     - not containerized_deployment
     - osd_scenario != 'lvm'
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
-- name: include docker/main.yml
-  include: docker/main.yml
+- name: include_tasks docker/main.yml
+  include_tasks: docker/main.yml
   when:
     - containerized_deployment
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
 - name: set_fact openstack_keys_tmp - preserve backward compatibility after the introduction of the ceph_keys module
   set_fact:
index 9abb84424f5c28dec9dda01fae588eac487f8fcc..9d86b1c566e8bce7710afa50f05628e3b75633a0 100644 (file)
@@ -2,42 +2,28 @@
 - name: include common.yml
   include_tasks: common.yml
 
-- name: include pre_requisite.yml
-  include: pre_requisite.yml
-  when:
-    - not containerized_deployment
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
+- name: include_tasks pre_requisite.yml
+  include_tasks: pre_requisite.yml
+  when: not containerized_deployment
 
-- name: include openstack-keystone.yml
-  include: openstack-keystone.yml
-  when:
-    - radosgw_keystone_ssl|bool
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
+- name: include_tasks openstack-keystone.yml
+  include_tasks: openstack-keystone.yml
+  when: radosgw_keystone_ssl|bool
 
-- name: include start_radosgw.yml
-  include: start_radosgw.yml
-  when:
-    - not containerized_deployment
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
+- name: include_tasks start_radosgw.yml
+  include_tasks: start_radosgw.yml
+  when: not containerized_deployment
 
-- name: include multisite/main.yml
-  include: multisite/main.yml
+- name: include_tasks multisite/main.yml
+  include_tasks: multisite/main.yml
   when:
     - rgw_zone != ""
     - rgw_multisite
     - ceph_release_num[ceph_release] >= ceph_release_num.jewel
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
-- name: include docker/main.yml
-  include: docker/main.yml
-  when:
-    - containerized_deployment
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
+- name: include_tasks docker/main.yml
+  include_tasks: docker/main.yml
+  when: containerized_deployment
 
 - name: create rgw pools if rgw_create_pools is defined
   command: "{{ docker_exec_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} osd pool create {{ item.key }} {{ item.value.pg_num }}"
index 1f1b1a6fb3e947e2fba16ea055cb85a65cc2d251..dd8ac4ea69874da147ddf2b04c950f01227a1b44 100644 (file)
@@ -3,21 +3,17 @@
   include_tasks: checks.yml
 
 # Include the tasks depending on the zone type
-- name: include master multisite tasks
-  include: master.yml
+- name: include_tasks master.yml
+  include_tasks: master.yml
   when:
     - rgw_zonemaster is defined
     - rgw_zonemaster
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
-- name: include secondary multisite tasks
-  include: secondary.yml
+- name: include_tasks secondary.yml
+  include_tasks: secondary.yml
   when:
     - rgw_zonesecondary is defined
     - rgw_zonesecondary
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
 
 # Continue with common tasks
 - name: add zone to rgw stanza in ceph.conf