]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Updated use of deprecated filter
authorabaird-rh <abaird@redhat.com>
Fri, 17 Apr 2020 16:34:32 +0000 (17:34 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 20 Apr 2020 17:37:42 +0000 (13:37 -0400)
This was removed in Ansible 2.9.

[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of
using `result|version_compare` use `result is version_compare`. This
feature will be removed in version 2.9. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.

Rename 'version_compare' to the function 'version'.

version_compose was renamed to version since ansible 2.5

Signed-off-by: abaird-rh <abaird@redhat.com>
(cherry picked from commit eb71244bfd2f3c59c8245a1cf45dc6b44fa442f8)

12 files changed:
roles/ceph-common/tasks/release-rhcs.yml
roles/ceph-container-common/tasks/release.yml
roles/ceph-iscsi-gw/templates/rbd-target-api.service.j2
roles/ceph-iscsi-gw/templates/rbd-target-gw.service.j2
roles/ceph-iscsi-gw/templates/tcmu-runner.service.j2
roles/ceph-mds/templates/ceph-mds.service.j2
roles/ceph-mgr/templates/ceph-mgr.service.j2
roles/ceph-mon/templates/ceph-mon.service.j2
roles/ceph-osd/templates/ceph-osd-run.sh.j2
roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2
roles/ceph-rgw/templates/ceph-radosgw.service.j2
roles/ceph-validate/tasks/check_system.yml

index eee58e0744a3ca514acd364f2f914895295ca047..6cd884c5e16ff045dcf49095df9a1df435b5d189 100644 (file)
@@ -2,24 +2,24 @@
 - name: set_fact ceph_release jewel
   set_fact:
     ceph_release: jewel
-  when: ceph_version.split('.')[0] is version_compare('10', '==')
+  when: ceph_version.split('.')[0] is version('10', '==')
 
 - name: set_fact ceph_release kraken
   set_fact:
     ceph_release: kraken
-  when: ceph_version.split('.')[0] is version_compare('11', '==')
+  when: ceph_version.split('.')[0] is version('11', '==')
 
 - name: set_fact ceph_release luminous
   set_fact:
     ceph_release: luminous
-  when: ceph_version.split('.')[0] is version_compare('12', '==')
+  when: ceph_version.split('.')[0] is version('12', '==')
 
 - name: set_fact ceph_release mimic
   set_fact:
     ceph_release: mimic
-  when: ceph_version.split('.')[0] is version_compare('13', '==')
+  when: ceph_version.split('.')[0] is version('13', '==')
 
 - name: set_fact ceph_release nautilus
   set_fact:
     ceph_release: nautilus
-  when: ceph_version.split('.')[0] is version_compare('14', '==')
+  when: ceph_version.split('.')[0] is version('14', '==')
index 0f0980668d041a4960c7e424fa1114b06512b48a..964b5273a6a2754f4fab5e6346cc462456313d2d 100644 (file)
@@ -2,25 +2,25 @@
 - name: set_fact ceph_release jewel
   set_fact:
     ceph_release: jewel
-  when: ceph_version.split('.')[0] is version_compare('10', '==')
+  when: ceph_version.split('.')[0] is version('10', '==')
 
 - name: set_fact ceph_release kraken
   set_fact:
     ceph_release: kraken
-  when: ceph_version.split('.')[0] is version_compare('11', '==')
+  when: ceph_version.split('.')[0] is version('11', '==')
 
 - name: set_fact ceph_release luminous
   set_fact:
     ceph_release: luminous
-  when: ceph_version.split('.')[0] is version_compare('12', '==')
+  when: ceph_version.split('.')[0] is version('12', '==')
 
 - name: set_fact ceph_release mimic
   set_fact:
     ceph_release: mimic
-  when: ceph_version.split('.')[0] is version_compare('13', '==')
+  when: ceph_version.split('.')[0] is version('13', '==')
 
 - name: set_fact ceph_release nautilus
   set_fact:
     ceph_release: nautilus
-  when: ceph_version.split('.')[0] is version_compare('14', '==')
+  when: ceph_version.split('.')[0] is version('14', '==')
 
index 92f20af4c71690a1c2a87f1cf8c66ce1c641d692..9e685ba65e115e49b6443530e053f985b36704ed 100644 (file)
@@ -12,7 +12,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop rbd-target-api
 ExecStartPre=-/usr/bin/{{ container_binary }} rm rbd-target-api
 ExecStart=/usr/bin/{{ container_binary }} run --rm \
   --memory={{ ceph_rbd_target_api_docker_memory_limit }} \
-  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version_compare('13', '>=')) or container_binary == 'podman' -%}
+  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version('13', '>=')) or container_binary == 'podman' -%}
   --cpus={{ ceph_rbd_target_api_docker_cpu_limit }} \
   {% else -%}
   --cpu-quota={{ ceph_rbd_target_api_docker_cpu_limit * 100000 }} \
index fe3d1f482367bed9c74133d7adf4d4d0d76e2bf9..87195754be8442d1151f9aede81d0dddd0cb7035 100644 (file)
@@ -12,7 +12,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop rbd-target-gw
 ExecStartPre=-/usr/bin/{{ container_binary }} rm rbd-target-gw
 ExecStart=/usr/bin/{{ container_binary }} run --rm \
   --memory={{ ceph_rbd_target_gw_docker_memory_limit }} \
-  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version_compare('13', '>=')) or container_binary == 'podman' -%}
+  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version('13', '>=')) or container_binary == 'podman' -%}
   --cpus={{ ceph_rbd_target_gw_docker_cpu_limit }} \
   {% else -%}
   --cpu-quota={{ ceph_rbd_target_gw_docker_cpu_limit * 100000 }} \
index 4fbad64cc4a10a74f2b718f03825c76171a8d11e..9ddbed488ce5e366cd2bc4d743976191ccf48822 100644 (file)
@@ -12,7 +12,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop tcmu-runner
 ExecStartPre=-/usr/bin/{{ container_binary }} rm tcmu-runner
 ExecStart=/usr/bin/{{ container_binary }} run --rm \
   --memory={{ ceph_tcmu_runner_docker_memory_limit }} \
-  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version_compare('13', '>=')) or container_binary == 'podman' -%}
+  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version('13', '>=')) or container_binary == 'podman' -%}
   --cpus={{ ceph_tcmu_runner_docker_cpu_limit }} \
   {% else -%}
   --cpu-quota={{ ceph_tcmu_runner_docker_cpu_limit * 100000 }} \
index 9a05c85508c3bc2b951bafe0ddbd54c4f386cf2d..e09f76638cfac77013b2b59f6ccd2c39a1c23c2c 100644 (file)
@@ -13,7 +13,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-mds-{{ ansible_hostname
 ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-mds-{{ ansible_hostname }}
 ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
   --memory={{ ceph_mds_docker_memory_limit }} \
-  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version_compare('13', '>=')) or container_binary == 'podman' -%}
+  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version('13', '>=')) or container_binary == 'podman' -%}
   --cpus={{ cpu_limit }} \
   {% else -%}
   --cpu-quota={{ cpu_limit * 100000 }} \
index ae5c832233f87ccbf462eba7c37c0bdda64d60af..f02e21c0f4f758b7ef329e7e4ed872314571948d 100644 (file)
@@ -12,7 +12,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-mgr-{{ ansible_hostname
 ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-mgr-{{ ansible_hostname }}
 ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
   --memory={{ ceph_mgr_docker_memory_limit }} \
-  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version_compare('13', '>=')) or container_binary == 'podman' -%}
+  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version('13', '>=')) or container_binary == 'podman' -%}
   --cpus={{ ceph_mgr_docker_cpu_limit }} \
   {% else -%}
   --cpu-quota={{ ceph_mgr_docker_cpu_limit * 100000 }} \
index 2091cb8536cca0c4886570536fa9efccc6530515..f2226d84448cbbb2a8990eff7202b512cd238f5c 100644 (file)
@@ -12,7 +12,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-mon-%i
 ExecStartPre=/bin/sh -c '"$(command -v mkdir)" -p /etc/ceph /var/lib/ceph/mon'
 ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-mon-%i \
   --memory={{ ceph_mon_docker_memory_limit }} \
-{% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version_compare('13', '>=')) or container_binary == 'podman' -%}
+{% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version('13', '>=')) or container_binary == 'podman' -%}
   --cpus={{ ceph_mon_docker_cpu_limit }} \
 {% else -%}
   --cpu-quota={{ ceph_mon_docker_cpu_limit * 100000 }} \
index c12ffb29947d9d40e5c3c80cb6a04258b9c04417..31b2ac37d3489514a1c40ed951c28f5583424ed3 100644 (file)
@@ -20,7 +20,7 @@ numactl \
   {% if osd_objectstore == 'filestore' -%}
   --memory={{ ceph_osd_docker_memory_limit }} \
   {% endif -%}
-  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version_compare('13', '>=')) or container_binary == 'podman' -%}
+  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version('13', '>=')) or container_binary == 'podman' -%}
   --cpus={{ cpu_limit }} \
   {% else -%}
   --cpu-quota={{ cpu_limit * 100000 }} \
index 3322955b9dd9ee1d3b109418c784d88703fc1a56..dcfca07e1f1b9c893d10769c2f25e2b0c58f3971 100644 (file)
@@ -12,7 +12,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-rbd-mirror-{{ ansible_ho
 ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-rbd-mirror-{{ ansible_hostname }}
 ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
   --memory={{ ceph_rbd_mirror_docker_memory_limit }} \
-  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version_compare('13', '>=')) or container_binary == 'podman' -%}
+  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version('13', '>=')) or container_binary == 'podman' -%}
   --cpus={{ ceph_rbd_mirror_docker_cpu_limit }} \
   {% else -%}
   --cpu-quota={{ ceph_rbd_mirror_docker_cpu_limit * 100000 }} \
index 93a253c29099b18cc536ce1f713b229b410ea405..d7bafd9b9bbe7998f6b5f6743268a0fb1f478e8f 100644 (file)
@@ -13,7 +13,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-rgw-{{ ansible_hostname
 ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-rgw-{{ ansible_hostname }}-${INST_NAME}
 ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
   --memory={{ ceph_rgw_docker_memory_limit }} \
-  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version_compare('13', '>=')) or container_binary == 'podman' -%}
+  {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version('13', '>=')) or container_binary == 'podman' -%}
   --cpus={{ cpu_limit }} \
   {% else -%}
   --cpu-quota={{ cpu_limit * 100000 }} \
index db3920b75b19ff2a5cc5b86331b3f5de34111f58..cf7de8ab9b9b69959b53fbec16259c29a1dc9b35 100644 (file)
@@ -34,8 +34,8 @@
     - name: fail on unsupported distribution for red hat ceph storage
       fail:
         msg: "Distribution not supported {{ ansible_distribution_version }} by Red Hat Ceph Storage, only RHEL 8 (>= 8.1) or RHEL 7 (>= 7.7)"
-      when: (ansible_distribution_major_version | int == 8 and ansible_distribution_version | version_compare('8.1', '<')) or
-            (ansible_distribution_major_version | int == 7 and ansible_distribution_version | version_compare('7.7', '<'))
+      when: (ansible_distribution_major_version | int == 8 and ansible_distribution_version is version('8.1', '<')) or
+            (ansible_distribution_major_version | int == 7 and ansible_distribution_version is version('7.7', '<'))
 
     - name: subscription manager related tasks
       when: ceph_repository_type == 'cdn'