mirror of https://github.com/ceph/ceph-ansible.git
Updated use of deprecated filter
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 eb71244bfd
)
pull/5298/head
parent
e4c24f3407
commit
6878aab0f9
|
@ -2,24 +2,24 @@
|
||||||
- name: set_fact ceph_release jewel
|
- name: set_fact ceph_release jewel
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_release: jewel
|
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
|
- name: set_fact ceph_release kraken
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_release: kraken
|
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
|
- name: set_fact ceph_release luminous
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_release: luminous
|
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
|
- name: set_fact ceph_release mimic
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_release: mimic
|
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
|
- name: set_fact ceph_release nautilus
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_release: nautilus
|
ceph_release: nautilus
|
||||||
when: ceph_version.split('.')[0] is version_compare('14', '==')
|
when: ceph_version.split('.')[0] is version('14', '==')
|
||||||
|
|
|
@ -2,25 +2,25 @@
|
||||||
- name: set_fact ceph_release jewel
|
- name: set_fact ceph_release jewel
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_release: jewel
|
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
|
- name: set_fact ceph_release kraken
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_release: kraken
|
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
|
- name: set_fact ceph_release luminous
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_release: luminous
|
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
|
- name: set_fact ceph_release mimic
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_release: mimic
|
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
|
- name: set_fact ceph_release nautilus
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_release: nautilus
|
ceph_release: nautilus
|
||||||
when: ceph_version.split('.')[0] is version_compare('14', '==')
|
when: ceph_version.split('.')[0] is version('14', '==')
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop rbd-target-api
|
||||||
ExecStartPre=-/usr/bin/{{ container_binary }} rm rbd-target-api
|
ExecStartPre=-/usr/bin/{{ container_binary }} rm rbd-target-api
|
||||||
ExecStart=/usr/bin/{{ container_binary }} run --rm \
|
ExecStart=/usr/bin/{{ container_binary }} run --rm \
|
||||||
--memory={{ ceph_rbd_target_api_docker_memory_limit }} \
|
--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 }} \
|
--cpus={{ ceph_rbd_target_api_docker_cpu_limit }} \
|
||||||
{% else -%}
|
{% else -%}
|
||||||
--cpu-quota={{ ceph_rbd_target_api_docker_cpu_limit * 100000 }} \
|
--cpu-quota={{ ceph_rbd_target_api_docker_cpu_limit * 100000 }} \
|
||||||
|
|
|
@ -12,7 +12,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop rbd-target-gw
|
||||||
ExecStartPre=-/usr/bin/{{ container_binary }} rm rbd-target-gw
|
ExecStartPre=-/usr/bin/{{ container_binary }} rm rbd-target-gw
|
||||||
ExecStart=/usr/bin/{{ container_binary }} run --rm \
|
ExecStart=/usr/bin/{{ container_binary }} run --rm \
|
||||||
--memory={{ ceph_rbd_target_gw_docker_memory_limit }} \
|
--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 }} \
|
--cpus={{ ceph_rbd_target_gw_docker_cpu_limit }} \
|
||||||
{% else -%}
|
{% else -%}
|
||||||
--cpu-quota={{ ceph_rbd_target_gw_docker_cpu_limit * 100000 }} \
|
--cpu-quota={{ ceph_rbd_target_gw_docker_cpu_limit * 100000 }} \
|
||||||
|
|
|
@ -12,7 +12,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop tcmu-runner
|
||||||
ExecStartPre=-/usr/bin/{{ container_binary }} rm tcmu-runner
|
ExecStartPre=-/usr/bin/{{ container_binary }} rm tcmu-runner
|
||||||
ExecStart=/usr/bin/{{ container_binary }} run --rm \
|
ExecStart=/usr/bin/{{ container_binary }} run --rm \
|
||||||
--memory={{ ceph_tcmu_runner_docker_memory_limit }} \
|
--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 }} \
|
--cpus={{ ceph_tcmu_runner_docker_cpu_limit }} \
|
||||||
{% else -%}
|
{% else -%}
|
||||||
--cpu-quota={{ ceph_tcmu_runner_docker_cpu_limit * 100000 }} \
|
--cpu-quota={{ ceph_tcmu_runner_docker_cpu_limit * 100000 }} \
|
||||||
|
|
|
@ -13,7 +13,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-mds-{{ ansible_hostname
|
||||||
ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-mds-{{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-mds-{{ ansible_hostname }}
|
||||||
ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
|
ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
|
||||||
--memory={{ ceph_mds_docker_memory_limit }} \
|
--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 }} \
|
--cpus={{ cpu_limit }} \
|
||||||
{% else -%}
|
{% else -%}
|
||||||
--cpu-quota={{ cpu_limit * 100000 }} \
|
--cpu-quota={{ cpu_limit * 100000 }} \
|
||||||
|
|
|
@ -12,7 +12,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-mgr-{{ ansible_hostname
|
||||||
ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-mgr-{{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-mgr-{{ ansible_hostname }}
|
||||||
ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
|
ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
|
||||||
--memory={{ ceph_mgr_docker_memory_limit }} \
|
--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 }} \
|
--cpus={{ ceph_mgr_docker_cpu_limit }} \
|
||||||
{% else -%}
|
{% else -%}
|
||||||
--cpu-quota={{ ceph_mgr_docker_cpu_limit * 100000 }} \
|
--cpu-quota={{ ceph_mgr_docker_cpu_limit * 100000 }} \
|
||||||
|
|
|
@ -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'
|
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 \
|
ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-mon-%i \
|
||||||
--memory={{ ceph_mon_docker_memory_limit }} \
|
--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 }} \
|
--cpus={{ ceph_mon_docker_cpu_limit }} \
|
||||||
{% else -%}
|
{% else -%}
|
||||||
--cpu-quota={{ ceph_mon_docker_cpu_limit * 100000 }} \
|
--cpu-quota={{ ceph_mon_docker_cpu_limit * 100000 }} \
|
||||||
|
|
|
@ -20,7 +20,7 @@ numactl \
|
||||||
{% if osd_objectstore == 'filestore' -%}
|
{% if osd_objectstore == 'filestore' -%}
|
||||||
--memory={{ ceph_osd_docker_memory_limit }} \
|
--memory={{ ceph_osd_docker_memory_limit }} \
|
||||||
{% endif -%}
|
{% 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 }} \
|
--cpus={{ cpu_limit }} \
|
||||||
{% else -%}
|
{% else -%}
|
||||||
--cpu-quota={{ cpu_limit * 100000 }} \
|
--cpu-quota={{ cpu_limit * 100000 }} \
|
||||||
|
|
|
@ -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 }}
|
ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-rbd-mirror-{{ ansible_hostname }}
|
||||||
ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
|
ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
|
||||||
--memory={{ ceph_rbd_mirror_docker_memory_limit }} \
|
--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 }} \
|
--cpus={{ ceph_rbd_mirror_docker_cpu_limit }} \
|
||||||
{% else -%}
|
{% else -%}
|
||||||
--cpu-quota={{ ceph_rbd_mirror_docker_cpu_limit * 100000 }} \
|
--cpu-quota={{ ceph_rbd_mirror_docker_cpu_limit * 100000 }} \
|
||||||
|
|
|
@ -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}
|
ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-rgw-{{ ansible_hostname }}-${INST_NAME}
|
||||||
ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
|
ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
|
||||||
--memory={{ ceph_rgw_docker_memory_limit }} \
|
--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 }} \
|
--cpus={{ cpu_limit }} \
|
||||||
{% else -%}
|
{% else -%}
|
||||||
--cpu-quota={{ cpu_limit * 100000 }} \
|
--cpu-quota={{ cpu_limit * 100000 }} \
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
- name: fail on unsupported distribution for red hat ceph storage
|
- name: fail on unsupported distribution for red hat ceph storage
|
||||||
fail:
|
fail:
|
||||||
msg: "Distribution not supported {{ ansible_distribution_version }} by Red Hat Ceph Storage, only RHEL 8 (>= 8.1) or RHEL 7 (>= 7.7)"
|
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
|
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 | version_compare('7.7', '<'))
|
(ansible_distribution_major_version | int == 7 and ansible_distribution_version is version('7.7', '<'))
|
||||||
|
|
||||||
- name: subscription manager related tasks
|
- name: subscription manager related tasks
|
||||||
when: ceph_repository_type == 'cdn'
|
when: ceph_repository_type == 'cdn'
|
||||||
|
|
Loading…
Reference in New Issue