diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:26:57 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:26:57 +0000 |
commit | d4dfa10cd25391c61bd21fa7c3e08d1ba955b52a (patch) | |
tree | 3492abc44856eb055528b4163280c0e4a4d0e7cc /test | |
parent | Releasing progress-linux version 2.17.1-1~progress7.99u1. (diff) | |
download | ansible-core-d4dfa10cd25391c61bd21fa7c3e08d1ba955b52a.tar.xz ansible-core-d4dfa10cd25391c61bd21fa7c3e08d1ba955b52a.zip |
Merging upstream version 2.17.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test')
6 files changed, 44 insertions, 1 deletions
diff --git a/test/integration/targets/dnf/tasks/repo.yml b/test/integration/targets/dnf/tasks/repo.yml index 7e34aed..d50535b 100644 --- a/test/integration/targets/dnf/tasks/repo.yml +++ b/test/integration/targets/dnf/tasks/repo.yml @@ -520,3 +520,25 @@ dnf: name: epochone state: absent + +# https://github.com/ansible/ansible/issues/83373 +- name: test installing a set of packages by specifying them using a wildcard character + block: + - dnf: + name: provides_foo_a + state: present + + - dnf: + name: provides_foo* + state: present + register: dnf_results + + - assert: + that: + - dnf_results is changed + - "'Installed: provides_foo_b' in dnf_results['results'][0]" + always: + - name: Clean up + dnf: + name: provides_foo* + state: absent diff --git a/test/integration/targets/dnf5/playbook.yml b/test/integration/targets/dnf5/playbook.yml index 16dfd22..78b5f4d 100644 --- a/test/integration/targets/dnf5/playbook.yml +++ b/test/integration/targets/dnf5/playbook.yml @@ -2,7 +2,7 @@ tasks: - block: - command: "dnf install -y 'dnf-command(copr)'" - - command: dnf copr enable -y rpmsoftwaremanagement/dnf5-unstable + - command: dnf copr enable -y rpmsoftwaremanagement/dnf-nightly - command: dnf install -y python3-libdnf5 - include_role: diff --git a/test/integration/targets/package_facts/tasks/main.yml b/test/integration/targets/package_facts/tasks/main.yml index 12dfcf0..6d4b04d 100644 --- a/test/integration/targets/package_facts/tasks/main.yml +++ b/test/integration/targets/package_facts/tasks/main.yml @@ -65,6 +65,19 @@ that: ansible_facts.packages is defined when: (ansible_os_family == "openSUSE Leap") or (ansible_os_family == "Suse") +- name: Same as those above, but based on pkg_mgr + block: + - name: Gather package facts + package_facts: + manager: '{{ ansible_facts["pkg_mgr"] }}' + + - name: check for ansible_facts.packages exists + assert: + that: + - ansible_facts.packages is defined + - ansible_facts.packages | length > 1 + when: ansible_facts['os_family'] in ["openSUSE Leap", "Suse", "Debian"] + # Check that auto detection works also - name: Gather package facts package_facts: diff --git a/test/integration/targets/retry_task_name_in_callback/runme.sh b/test/integration/targets/retry_task_name_in_callback/runme.sh index 5f636cd..415a018 100755 --- a/test/integration/targets/retry_task_name_in_callback/runme.sh +++ b/test/integration/targets/retry_task_name_in_callback/runme.sh @@ -11,3 +11,8 @@ EXPECTED_REGEX="^.*TASK.*18236 callback task template fix OUTPUT 2" ansible-playbook "$@" -i ../../inventory test.yml | tee "${OUTFILE}" echo "Grepping for ${EXPECTED_REGEX} in stdout." grep -e "${EXPECTED_REGEX}" "${OUTFILE}" + +# check variables are interpolated in 'started' +UNTEMPLATED_STARTED="^.*\[started .*{{.*}}.*$" +echo "Checking we dont have untemplated started in stdout." +grep -e "${UNTEMPLATED_STARTED}" "${OUTFILE}" || exit 0 diff --git a/test/integration/targets/shell/tasks/command-building.yml b/test/integration/targets/shell/tasks/command-building.yml index bd45261..d22f674 100644 --- a/test/integration/targets/shell/tasks/command-building.yml +++ b/test/integration/targets/shell/tasks/command-building.yml @@ -28,6 +28,7 @@ ANSIBLE_REMOTE_TMP: '{{ atd }}' ANSIBLE_NOCOLOR: "1" ANSIBLE_FORCE_COLOR: "0" + TEST: "foo%D" register: command_building delegate_to: localhost diff --git a/test/integration/targets/template/runme.sh b/test/integration/targets/template/runme.sh index e814110..b37467a 100755 --- a/test/integration/targets/template/runme.sh +++ b/test/integration/targets/template/runme.sh @@ -55,3 +55,5 @@ do ANSIBLE_CONFIG="./${badcfg}.cfg" ansible-config dump --only-changed done +# ensure we picle hostvarscorrectly with native https://github.com/ansible/ansible/issues/83503 +ANSIBLE_JINJA2_NATIVE=1 ansible -m debug -a "msg={{ groups.all | map('extract', hostvars) }}" -i testhost, all -c local -v "$@" |