1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/tests/integration/targets/lookup_merge_variables/runme.sh
Alexander Petrenz 136419c5c0
bug(lookup/merge_variables): Fix rendering foreign variables (#8303)
* manually prepare variables of foreign host including hostvars property

* render variables from context of current host

* add integration test for cross host merge

* lint fixes

* adjust cross host merge unit tests to provide a tiny bit of the HostVars Class API

* add license information

* lint

* add changelog fragment

* Update tests/integration/targets/lookup_merge_variables/test_cross_host_merge_play.yml

Okay

Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>

* Update tests/integration/targets/lookup_merge_variables/test_cross_host_merge_play.yml

Okay

Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>

* Update tests/integration/targets/lookup_merge_variables/test_cross_host_merge_play.yml

Okay

Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>

* rename _HostVars to HostVarsMock

* removing unnecessary task

---------

Co-authored-by: Gitlab CI <alexander.petrenz@posteo.de>
Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>
2024-05-11 16:51:51 +02:00

19 lines
781 B
Bash
Executable file

#!/usr/bin/env bash
# Copyright (c) 2020, Thales Netherlands
# Copyright (c) 2021, Ansible project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
set -eux
ANSIBLE_LOG_PATH=/tmp/ansible-test-merge-variables \
ansible-playbook test.yml "$@"
ANSIBLE_LOG_PATH=/tmp/ansible-test-merge-variables \
ANSIBLE_MERGE_VARIABLES_PATTERN_TYPE=suffix \
ansible-playbook test_with_env.yml "$@"
ANSIBLE_LOG_PATH=/tmp/ansible-test-merge-variables \
ansible-playbook -i test_inventory_all_hosts.yml test_all_hosts.yml "$@"
ANSIBLE_LOG_PATH=/tmp/ansible-test-merge-variables \
ansible-playbook -i test_cross_host_merge_inventory.yml test_cross_host_merge_play.yml "$@"