From 8641144375f0c21c0b2e79a56fe50f3ab8238dc9 Mon Sep 17 00:00:00 2001 From: Steffen Scheib <37306894+sscheib@users.noreply.github.com> Date: Tue, 23 Jan 2024 22:00:44 +0100 Subject: [PATCH] Adding note about implicit groups (#82580) clarifying usage in conjunction with use_group_vars --- changelogs/fragments/82580_constructed.yml | 2 ++ lib/ansible/plugins/inventory/constructed.py | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 changelogs/fragments/82580_constructed.yml diff --git a/changelogs/fragments/82580_constructed.yml b/changelogs/fragments/82580_constructed.yml new file mode 100644 index 00000000000..22a57a7287e --- /dev/null +++ b/changelogs/fragments/82580_constructed.yml @@ -0,0 +1,2 @@ +minor_changes: + - "constructed inventory plugin - Adding a note that only group_vars of explicit groups are loaded (https://github.com/ansible/ansible/pull/82580)." diff --git a/lib/ansible/plugins/inventory/constructed.py b/lib/ansible/plugins/inventory/constructed.py index 6a7ec2c2190..98f6178594d 100644 --- a/lib/ansible/plugins/inventory/constructed.py +++ b/lib/ansible/plugins/inventory/constructed.py @@ -25,6 +25,8 @@ DOCUMENTATION = ''' - The host_group_vars (enabled by default) 'vars plugin' is the one responsible for reading host_vars/ and group_vars/ directories. - This will execute all vars plugins, even those that are not supposed to execute at the 'inventory' stage. See vars plugins docs for details on 'stage'. + - Implicit groups, such as 'all' or 'ungrouped', need to be explicitly defined in any previous inventory to apply the + corresponding group_vars required: false default: false type: boolean