CI: Fix ansible_version comparison with ansible-core 2.19.0rc1

Note that tests/ansible/integration/ssh/templated_by_play_taskvar.yml was
previously erroniously being skipped with ansible-core 2.19.0a<N> and
2.19.0b<N>.

fixes #1293
refs #1175
pull/1289/head
Alex Willmer 5 months ago
parent 98ae5e2c32
commit 3cba11a126

@ -34,6 +34,8 @@ to strategy plugins under :gh:issue:`1278`.
* :gh:issue:`1285` CI: use `result_format = yaml` for Ansible test output, * :gh:issue:`1285` CI: use `result_format = yaml` for Ansible test output,
instead of deprecated `stdout_callback = yaml` instead of deprecated `stdout_callback = yaml`
* :gh:issue:`1293` CI: Fix ``ansible_version`` comparisons when an Ansible
release candidate is under test
v0.3.25a2 (2025-06-21) v0.3.25a2 (2025-06-21)

@ -1,4 +1,11 @@
--- ---
# Avoid `ansible_version.full is version(..., strict=True)` limitations.
# Pre-release info (alpha/beta/rc) is intentionally ignored.
# Behaviour that is present or expected in ansible-core 2.50.x should be
# tested even if ansible-core 2.50.0a1 or 2.50.0rc1 is under test.
ansible_version_major_minor: "{{ ansible_version.major }}.{{ ansible_version.minor }}"
ansible_version_major_minor_patch: "{{ ansible_version.major }}.{{ ansible_version.minor }}.{{ ansible_version.revision | regex_search('^[0-9]+') }}"
become_unpriv_available: >- become_unpriv_available: >-
{# {#
Vanilla Ansible >= 4 (ansible-core >= 2.11) can use `setfacl` for Vanilla Ansible >= 4 (ansible-core >= 2.11) can use `setfacl` for
@ -13,7 +20,7 @@ become_unpriv_available: >-
( (
not is_mitogen not is_mitogen
and is_macos_controller and is_macos_controller
and ansible_version.full is version("2.11", ">=", strict=True) and ansible_version_major_minor is version("2.11", ">=", strict=True)
) )
or ( or (
is_mitogen is_mitogen
@ -22,7 +29,7 @@ become_unpriv_available: >-
or ( or (
is_mitogen is_mitogen
and ansible_python_interpreter is not defined and ansible_python_interpreter is not defined
and ansible_version.full is version("2.18", "<", strict=True) and ansible_version_major_minor is version("2.18", "<", strict=True)
) )
-}} -}}

@ -11,8 +11,10 @@
- set_fact: - set_fact:
expected_ssh_port: null expected_ssh_port: null
when: ansible_version.full is version('2.11.1', '>=', strict=True) when:
- ansible_version_major_minor_patch is version('2.11.1', '>=', strict=True)
- set_fact: - set_fact:
expected_ssh_port: 22 expected_ssh_port: 22
when: ansible_version.full is version('2.11.1', '<', strict=True) when:
- ansible_version_major_minor_patch is version('2.11.1', '<', strict=True)

@ -6,7 +6,7 @@
when: when:
# Ansible >= 12 (ansible-core >= 2.19) only allows bytes|str through # Ansible >= 12 (ansible-core >= 2.19) only allows bytes|str through
# `ansible.plugins.action.ActionBase._transfer_data()`. # `ansible.plugins.action.ActionBase._transfer_data()`.
- ansible_version.full is version('2.18.999', '>', strict=True) - ansible_version_major_minor is version('2.19', '>=', strict=True)
- not is_mitogen - not is_mitogen
- name: Cleanup transfer data - name: Cleanup transfer data

@ -35,8 +35,8 @@
# | Ansible <= 3 | ansible-core <= 2.10 | present | True | # | Ansible <= 3 | ansible-core <= 2.10 | present | True |
# | Ansible 4 - 6 | ansible-core 2.11 - 2.13 | deprecated | False | # | Ansible 4 - 6 | ansible-core 2.11 - 2.13 | deprecated | False |
# | Ansible >= 7 | ansible-core >= 2.14 | absent | n/a | # | Ansible >= 7 | ansible-core >= 2.14 | absent | n/a |
- (ansible_version.full is version("2.14", ">=", strict=True) and async_out.invocation.module_args.warn is not defined) - (ansible_version_major_minor is version("2.14", ">=", strict=True) and async_out.invocation.module_args.warn is not defined)
or (ansible_version.full is version("2.11", ">=", strict=True) and async_out.invocation.module_args.warn == False) or (ansible_version_major_minor is version("2.11", ">=", strict=True) and async_out.invocation.module_args.warn == False)
or (async_out.invocation.module_args.warn == True) or (async_out.invocation.module_args.warn == True)
- async_out.rc == 0 - async_out.rc == 0
- async_out.start.startswith("20") - async_out.start.startswith("20")
@ -53,7 +53,7 @@
fail_msg: | fail_msg: |
async_out={{ async_out }} async_out={{ async_out }}
when: when:
- ansible_version.full is version('2.4', '>=', strict=True) - ansible_version_major_minor is version('2.4', '>=', strict=True)
vars: vars:
async_out: "{{result.content|b64decode|from_json}}" async_out: "{{result.content|b64decode|from_json}}"
tags: tags:

@ -41,9 +41,9 @@
- result1.changed == True - result1.changed == True
# ansible/b72e989e1837ccad8dcdc926c43ccbc4d8cdfe44 # ansible/b72e989e1837ccad8dcdc926c43ccbc4d8cdfe44
- | - |
(ansible_version.full is version('2.8', ">=", strict=True) and (ansible_version_major_minor is version('2.8', ">=", strict=True) and
result1.cmd == "echo alldone;\nsleep 1;\n") or result1.cmd == "echo alldone;\nsleep 1;\n") or
(ansible_version.full is version('2.8', '<', strict=True) and (ansible_version_major_minor is version('2.8', '<', strict=True) and
result1.cmd == "echo alldone;\n sleep 1;") result1.cmd == "echo alldone;\n sleep 1;")
- result1.delta|length == 14 - result1.delta|length == 14
- result1.start|length == 26 - result1.start|length == 26
@ -61,7 +61,7 @@
fail_msg: | fail_msg: |
result1={{ result1 }} result1={{ result1 }}
when: when:
- ansible_version.full is version('2.8', '>', strict=True) # ansible#51393 - ansible_version_major_minor is version('2.8', '>', strict=True) # ansible#51393
- assert: - assert:
that: that:
@ -69,6 +69,6 @@
fail_msg: | fail_msg: |
result1={{ result1 }} result1={{ result1 }}
when: when:
- ansible_version.full is version('2.4', '>', strict=True) - ansible_version_major_minor is version('2.4', '>', strict=True)
tags: tags:
- runner_one_job - runner_one_job

@ -66,6 +66,6 @@
fail_msg: | fail_msg: |
result2={{ result2 }} result2={{ result2 }}
when: when:
- ansible_version.full is version('2.8', '>=', strict=True) # ansible#51393 - ansible_version_major_minor is version('2.8', '>=', strict=True) # ansible#51393
tags: tags:
- runner_two_simultaneous_jobs - runner_two_simultaneous_jobs

@ -10,11 +10,11 @@
- debug: msg="reset.yml skipped on Ansible<2.5.6" - debug: msg="reset.yml skipped on Ansible<2.5.6"
when: when:
- ansible_version.full is version('2.5.6', '<', strict=True) - ansible_version_major_minor_patch is version('2.5.6', '<', strict=True)
- meta: end_play - meta: end_play
when: when:
- ansible_version.full is version('2.5.6', '<', strict=True) - ansible_version_major_minor_patch is version('2.5.6', '<', strict=True)
- custom_python_detect_environment: - custom_python_detect_environment:
register: out register: out

@ -8,11 +8,11 @@
tasks: tasks:
- debug: msg="reset_become.yml skipped on Ansible<2.5.6" - debug: msg="reset_become.yml skipped on Ansible<2.5.6"
when: when:
- ansible_version.full is version('2.5.6', '<', strict=True) - ansible_version_major_minor_patch is version('2.5.6', '<', strict=True)
- meta: end_play - meta: end_play
when: when:
- ansible_version.full is version('2.5.6', '<', strict=True) - ansible_version_major_minor_patch is version('2.5.6', '<', strict=True)
- name: save pid of the become acct - name: save pid of the become acct
custom_python_detect_environment: custom_python_detect_environment:

@ -19,7 +19,7 @@
- meta: end_play - meta: end_play
when: when:
- ansible_version.full is version('2.4', '<', strict=True) - ansible_version_major_minor is version('2.4', '<', strict=True)
- mitogen_get_stack: - mitogen_get_stack:
delegate_to: "{{ physical_host }}" delegate_to: "{{ physical_host }}"

@ -8,7 +8,7 @@
- meta: end_play - meta: end_play
when: when:
- ansible_version.full is version('2.5.6', '<', strict=True) - ansible_version_major_minor_patch is version('2.5.6', '<', strict=True)
# Start with a clean slate. # Start with a clean slate.
- mitogen_shutdown_all: - mitogen_shutdown_all:

@ -46,9 +46,9 @@
'20': /usr/bin/python3.8 '20': /usr/bin/python3.8
discovered_interpreter_expected: >- discovered_interpreter_expected: >-
{%- if ansible_version.full is version('2.12', '<', strict=True) -%} {%- if ansible_version_major_minor is version('2.12', '<', strict=True) -%}
{{ DISCOVERED_INTERPRETER_EXPECTED_MAP__ANSIBLE_lt_2_12[distro][distro_major] }} {{ DISCOVERED_INTERPRETER_EXPECTED_MAP__ANSIBLE_lt_2_12[distro][distro_major] }}
{%- elif ansible_version.full is version('2.17', '<', strict=True) -%} {%- elif ansible_version_major_minor is version('2.17', '<', strict=True) -%}
{{ DISCOVERED_INTERPRETER_EXPECTED_MAP__ANSIBLE_2_12_to_2_16[distro][distro_major] }} {{ DISCOVERED_INTERPRETER_EXPECTED_MAP__ANSIBLE_2_12_to_2_16[distro][distro_major] }}
{%- else -%} {%- else -%}
{{ DISCOVERED_INTERPRETER_EXPECTED_MAP__ANSIBLE_ge_2_17[distro][distro_major] }} {{ DISCOVERED_INTERPRETER_EXPECTED_MAP__ANSIBLE_ge_2_17[distro][distro_major] }}
@ -141,7 +141,7 @@
when: when:
- legacy.ansible_facts.discovered_interpreter_python == '/usr/bin/python' - legacy.ansible_facts.discovered_interpreter_python == '/usr/bin/python'
- auto_out.ansible_facts.discovered_interpreter_python != '/usr/bin/python' - auto_out.ansible_facts.discovered_interpreter_python != '/usr/bin/python'
- ansible_version.full is version_compare('2.12.0', '<', strict=True) - ansible_version_major_minor is version('2.12', '<', strict=True)
- name: check for warning (only on platforms where auto result is not /usr/bin/python and legacy is) from ansible 2.12 on - name: check for warning (only on platforms where auto result is not /usr/bin/python and legacy is) from ansible 2.12 on
assert: assert:
@ -153,7 +153,7 @@
when: when:
- legacy.ansible_facts.discovered_interpreter_python == '/usr/bin/python' - legacy.ansible_facts.discovered_interpreter_python == '/usr/bin/python'
- auto_out.ansible_facts.discovered_interpreter_python != '/usr/bin/python' - auto_out.ansible_facts.discovered_interpreter_python != '/usr/bin/python'
- ansible_version.full is version_compare('2.12.0', '>=', strict=True) - ansible_version_major_minor is version('2.12', '>=', strict=True)
- name: test that auto_silent never warns and got the same answer as auto - name: test that auto_silent never warns and got the same answer as auto
block: block:
@ -229,6 +229,6 @@
always: always:
- meta: clear_facts - meta: clear_facts
when: when:
- ansible_version.full is version_compare('2.8.0', '>=', strict=True) - ansible_version_major_minor is version('2.8', '>=', strict=True)
tags: tags:
- ansible_2_8_tests - ansible_2_8_tests

@ -14,7 +14,7 @@
- meta: end_play - meta: end_play
when: when:
- not is_mitogen - not is_mitogen
- ansible_version.full is version('2.17.1', '>=', strict=True) - ansible_version_major_minor_patch is version('2.17.1', '>=', strict=True)
- name: create temp file to source - name: create temp file to source
file: file:

@ -7,7 +7,7 @@
- meta: end_play - meta: end_play
when: when:
- not is_mitogen - not is_mitogen
- ansible_version.full is version('2.17.1', '>=', strict=True) - ansible_version_major_minor_patch is version('2.17.1', '>=', strict=True)
- custom_bash_old_style_module: - custom_bash_old_style_module:
foo: true foo: true

@ -20,6 +20,6 @@
fail_msg: | fail_msg: |
out={{ out }} out={{ out }}
when: when:
- ansible_version.full is version('2.4', '>=', strict=True) - ansible_version_major_minor is version('2.4', '>=', strict=True)
tags: tags:
- custom_perl_json_args_module - custom_perl_json_args_module

@ -20,6 +20,6 @@
fail_msg: | fail_msg: |
out={{ out }} out={{ out }}
when: when:
- ansible_version.full is version('2.4', '>=', strict=True) - ansible_version_major_minor is version('2.4', '>=', strict=True)
tags: tags:
- custom_perl_want_json_module - custom_perl_want_json_module

@ -32,7 +32,7 @@
when: when:
# https://github.com/ansible/ansible/issues/84238 # https://github.com/ansible/ansible/issues/84238
- not is_mitogen - not is_mitogen
- ansible_version.full is version('2.19', '<', strict=True) - ansible_version_major_minor is version('2.19', '<', strict=True)
- meta: reset_connection - meta: reset_connection
- name: Templated variables in play, key authentication - name: Templated variables in play, key authentication
ping: ping:

@ -9,7 +9,7 @@
- command: sudo -n whoami - command: sudo -n whoami
args: args:
warn: "{{ False if ansible_version.full is version('2.10', '<=', strict=True) else omit }}" warn: "{{ False if ansible_version_major_minor is version('2.10', '<=', strict=True) else omit }}"
ignore_errors: true ignore_errors: true
register: sudo_available register: sudo_available

@ -7,7 +7,7 @@
- meta: end_play - meta: end_play
when: when:
- ansible_version.full is version('2.5', '<', strict=True) - ansible_version_major_minor is version('2.5', '<', strict=True)
- custom_python_detect_environment: - custom_python_detect_environment:
vars: vars:

@ -32,7 +32,7 @@
localhost localhost
args: args:
chdir: ../.. chdir: ../..
warn: "{{ False if ansible_version.full is version('2.10', '<=', strict=True) else omit }}" warn: "{{ False if ansible_version_major_minor is version('2.10', '<=', strict=True) else omit }}"
register: result register: result
- assert: - assert:

@ -32,7 +32,7 @@
localhost localhost
args: args:
chdir: ../.. chdir: ../..
warn: "{{ False if ansible_version.full is version('2.10', '<=', strict=True) else omit }}" warn: "{{ False if ansible_version_major_minor is version('2.10', '<=', strict=True) else omit }}"
register: result register: result
- assert: - assert:

@ -11,11 +11,13 @@
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
right: null right: null
when: ansible_version.full is version('2.18.999', '>=', strict=True) when:
- ansible_version_major_minor is version('2.19', '>=', strict=True)
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
right: "" # actually null, but assert_equal limitation right: "" # actually null, but assert_equal limitation
when: ansible_version.full is version('2.18.999', '<', strict=True) when:
- ansible_version_major_minor is version('2.19', '<', strict=True)
tags: tags:
- mitogen_only - mitogen_only
@ -31,11 +33,13 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.password left: out.result[1].kwargs.password
right: null right: null
when: ansible_version.full is version('2.18.999', '>=', strict=True) when:
- ansible_version_major_minor is version('2.19', '>=', strict=True)
- assert_equal: - assert_equal:
left: out.result[1].kwargs.password left: out.result[1].kwargs.password
right: "" right: ""
when: ansible_version.full is version('2.18.999', '<', strict=True) when:
- ansible_version_major_minor is version('2.19', '<', strict=True)
tags: tags:
- mitogen_only - mitogen_only
@ -61,11 +65,13 @@
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
right: null right: null
when: ansible_version.full is version('2.18.999', '>=', strict=True) when:
- ansible_version_major_minor is version('2.19', '>=', strict=True)
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
right: "" right: ""
when: ansible_version.full is version('2.18.999', '<', strict=True) when:
- ansible_version_major_minor is version('2.19', '<', strict=True)
- assert_equal: - assert_equal:
left: out.result[1].kwargs.password left: out.result[1].kwargs.password
right: "ansi-ssh-pass" right: "ansi-ssh-pass"
@ -94,11 +100,13 @@
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
right: null right: null
when: ansible_version.full is version('2.18.999', '>=', strict=True) when:
- ansible_version_major_minor is version('2.19', '>=', strict=True)
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
right: "" right: ""
when: ansible_version.full is version('2.18.999', '<', strict=True) when:
- ansible_version_major_minor is version('2.19', '<', strict=True)
- assert_equal: - assert_equal:
left: out.result[1].kwargs.password left: out.result[1].kwargs.password
right: "ansi-pass" right: "ansi-pass"
@ -127,11 +135,13 @@
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
right: null right: null
when: ansible_version.full is version('2.18.999', '>=', strict=True) when:
- ansible_version_major_minor is version('2.19', '>=', strict=True)
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
right: "" right: ""
when: ansible_version.full is version('2.18.999', '<', strict=True) when:
- ansible_version_major_minor is version('2.19', '<', strict=True)
- assert_equal: - assert_equal:
left: out.result[1].kwargs.password left: out.result[1].kwargs.password
right: "c.b.a" right: "c.b.a"

@ -12,7 +12,7 @@
- include_tasks: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- meta: end_play - meta: end_play
when: when:
- ansible_version.full is version('2.17', '>=', strict=True) - ansible_version_major_minor is version('2.17', '>=', strict=True)
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.python_path left: out.result[0].kwargs.python_path
@ -27,7 +27,7 @@
- include_tasks: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- meta: end_play - meta: end_play
when: when:
- ansible_version.full is version('2.17', '>=', strict=True) - ansible_version_major_minor is version('2.17', '>=', strict=True)
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.python_path left: out.result[0].kwargs.python_path
@ -57,7 +57,7 @@
- include_tasks: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- meta: end_play - meta: end_play
when: when:
- ansible_version.full is version('2.17', '>=', strict=True) - ansible_version_major_minor is version('2.17', '>=', strict=True)
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.python_path left: out.result[0].kwargs.python_path
@ -87,7 +87,7 @@
- include_tasks: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- meta: end_play - meta: end_play
when: when:
- ansible_version.full is version('2.17', '>=', strict=True) - ansible_version_major_minor is version('2.17', '>=', strict=True)
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.python_path left: out.result[0].kwargs.python_path

@ -31,7 +31,7 @@
# FIXME https://github.com/mitogen-hq/mitogen/issues/1096 # FIXME https://github.com/mitogen-hq/mitogen/issues/1096
- meta: end_play - meta: end_play
when: when:
- ansible_version.full is version('2.17', '>=', strict=True) - ansible_version_major_minor is version('2.17', '>=', strict=True)
- meta: reset_connection - meta: reset_connection
# The host key might be in ~/.ssh/known_hosts. If it's removed then no # The host key might be in ~/.ssh/known_hosts. If it's removed then no
@ -65,7 +65,7 @@
# ansible_host_key_checking don't work on Vanilla Ansible 2.10, even for # ansible_host_key_checking don't work on Vanilla Ansible 2.10, even for
# static inventory hosts (ansible/ansible#49254, ansible/ansible#73708). # static inventory hosts (ansible/ansible#49254, ansible/ansible#73708).
when: when:
- ansible_version.full is version('2.11', '>=', strict=True) - ansible_version_major_minor is version('2.11', '>=', strict=True)
or is_mitogen or is_mitogen
tags: tags:
- issue_1066 - issue_1066

@ -7,7 +7,7 @@
tasks: tasks:
- meta: end_play - meta: end_play
when: when:
- ansible_version.full is version('2.6', '<', strict=True) - ansible_version_major_minor is version('2.6', '<', strict=True)
- name: Copy the naughty ansible into place - name: Copy the naughty ansible into place
copy: copy:

@ -3,7 +3,7 @@
tasks: tasks:
- meta: end_play - meta: end_play
when: when:
- ansible_version.full is version('2.8', '<', strict=True) - ansible_version_major_minor is version('2.8', '<', strict=True)
- custom_python_uses_distro: - custom_python_uses_distro:
register: out register: out

@ -22,7 +22,7 @@
when: when:
# Ansible 10 (ansible-core 2.17+) require Python 3.7+ on targets. # Ansible 10 (ansible-core 2.17+) require Python 3.7+ on targets.
# On CentOS 8 /usr/libexec/platform-python is Python 3.6 # On CentOS 8 /usr/libexec/platform-python is Python 3.6
- ansible_version.full is version('2.17', '>=', strict=True) - ansible_version_major_minor is version('2.17', '>=', strict=True)
- name: set up test container and run tests inside it - name: set up test container and run tests inside it
block: block:

@ -25,15 +25,15 @@
# with Ansible 4 (ansible-core 2.11) & associated collections. # with Ansible 4 (ansible-core 2.11) & associated collections.
# ansible.module_utils.connection.ConnectionError: Method not found # ansible.module_utils.connection.ConnectionError: Method not found
# https://github.com/mitogen-hq/mitogen/actions/runs/12854359099/job/35838635886 # https://github.com/mitogen-hq/mitogen/actions/runs/12854359099/job/35838635886
- ansible_version.full is version('2.11', '>=', strict=True) - ansible_version_major_minor is version('2.11', '>=', strict=True)
- ansible_version.full is version('2.12', '<', strict=True) - ansible_version_major_minor is version('2.12', '<', strict=True)
- meta: end_play - meta: end_play
when: when:
# TASK [Get running configuration and state data ] # TASK [Get running configuration and state data ]
# Error: : Task failed: ActionBase._parse_returned_data() missing 1 required positional argument: 'profile' # Error: : Task failed: ActionBase._parse_returned_data() missing 1 required positional argument: 'profile'
# https://github.com/ansible-collections/ansible.netcommon/issues/698#issuecomment-2910082548 # https://github.com/ansible-collections/ansible.netcommon/issues/698#issuecomment-2910082548
- ansible_version.full is version('2.18.999', '>=', strict=True) - ansible_version_major_minor is version('2.19', '>=', strict=True)
- block: - block:
- name: Start container - name: Start container

@ -17,7 +17,7 @@
# support Python 2.x on targets. # support Python 2.x on targets.
- meta: end_play - meta: end_play
when: when:
- ansible_version.full is version('2.17', '>=', strict=True) - ansible_version_major_minor is version('2.17', '>=', strict=True)
roles: roles:
- role: package_manager - role: package_manager

@ -66,7 +66,7 @@
dnf: dnf clean all dnf: dnf clean all
command: "{{ clean_command[ansible_pkg_mgr] }}" command: "{{ clean_command[ansible_pkg_mgr] }}"
args: args:
warn: "{{ False if ansible_version.full is version('2.10', '<=', strict=True) else omit }}" warn: "{{ False if ansible_version_major_minor is version('2.10', '<=', strict=True) else omit }}"
- name: Clean up apt package lists - name: Clean up apt package lists
shell: rm -rf {{item}}/* shell: rm -rf {{item}}/*

@ -1,3 +1,5 @@
ansible_version_major_minor: "{{ ansible_version.major }}.{{ ansible_version.minor }}"
common_packages: common_packages:
- openssh-server - openssh-server
- rsync - rsync

Loading…
Cancel
Save