1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

3 commits

Author SHA1 Message Date
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
Alexander Petrenz
0ded1109fe
feat(lookup/merge_variables): Add all hosts mode to collect configuration across multiple hosts (#7999)
* Add Feature to collect variables accross different hosts

* fix merging lists

* adjust unit tests

* lint fixes

* adjusting integration tests

* remove white spaces

* Update plugins/lookup/merge_variables.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/lookup/merge_variables.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/lookup/merge_variables.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* apply suggested changes to correctly handling the initial_value parameter, incl. additional test

* whitespace

---------

Co-authored-by: Alexander Petrenz <alexander.petrenz@posteo.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-03-08 07:25:39 +01:00
Roy Lenferink
f52dd194f9
Add new merge_variables lookup plugin (#5533)
* Add new merge_variables lookup plugin

* Add changelog fragment

* Process bot feedback

* Refactor override options and add pattern_type option

* Fix unit tests

* Changed default pattern_type and simplified plugin based on feedback

* Processed feedback for merge_variables lookup plugin

* Adjust version_added.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-26 11:27:30 +02:00