@@ -88,6 +88,71 @@ Parameters
8888 NTLM authentication is ``not `` supported even if the GSSAPI mech for NTLM has been installed.
8989
9090
91+ strict (optional, bool, False)
92+ If ``yes `` make invalid entries a fatal error, otherwise skip and continue.
93+
94+ Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.
95+
96+
97+ compose (optional, dict, {})
98+ Create vars from jinja2 expressions.
99+
100+
101+ groups (optional, dict, {})
102+ Add hosts to group based on Jinja2 conditionals.
103+
104+
105+ keyed_groups (optional, list, [])
106+ Add hosts to group based on the values of a variable.
107+
108+
109+ parent_group (optional, str, None)
110+ parent group for keyed group
111+
112+
113+ prefix (optional, str, )
114+ A keyed group name will start with this prefix
115+
116+
117+ separator (optional, str, _)
118+ separator used to build the keyed group name
119+
120+
121+ key (optional, str, None)
122+ The key from input dictionary used to generate groups
123+
124+
125+ default_value (optional, str, None)
126+ The default value when the host variable's value is an empty string.
127+
128+ This option is mutually exclusive with ``trailing_separator ``.
129+
130+
131+ trailing_separator (optional, bool, True)
132+ Set this option to *False * to omit the ``separator `` after the host variable when the value is an empty string.
133+
134+ This option is mutually exclusive with ``default_value ``.
135+
136+
137+
138+ use_extra_vars (optional, bool, False)
139+ Merge extra vars into the available variables for composition (highest precedence).
140+
141+
142+ leading_separator (optional, boolean, True)
143+ Use in conjunction with keyed_groups.
144+
145+ By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.
146+
147+ This is because the default prefix is "" and the default separator is "_".
148+
149+ Set this option to False to omit the leading underscore (or other separator) if no prefix is given.
150+
151+ If the group name is derived from a mapping the separator is still used to concatenate the items.
152+
153+ To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead.
154+
155+
91156
92157
93158
@@ -106,6 +171,21 @@ Examples
106171 url_username: foo
107172 url_password: bar
108173 force_basic_auth: False
174+ strict: False
175+
176+ # use the object_name you defined as hostname
177+ compose:
178+ hostname: object_name
179+
180+ # create a group based on the operating system defined in a custom variable
181+ keyed_groups:
182+ - prefix: os
183+ key: vars.HostOS
184+
185+ # create groups based on jinja templates
186+ # here we create a group called "rb" if the host variable "check_period" is "24/7"
187+ groups:
188+ rb: check_period == "24/7"
109189
110190
111191
0 commit comments