mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
Add skip_tags option to Puppet module (#6293)
* Add Puppet skip_tags option * Include changelog fragment * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
14b19afc9a
commit
ea8720f572
4 changed files with 39 additions and 2 deletions
|
@ -81,6 +81,12 @@ options:
|
|||
- A list of puppet tags to be used.
|
||||
type: list
|
||||
elements: str
|
||||
skip_tags:
|
||||
description:
|
||||
- A list of puppet tags to be excluded.
|
||||
type: list
|
||||
elements: str
|
||||
version_added: 6.6.0
|
||||
execute:
|
||||
description:
|
||||
- Execute a specific piece of Puppet code.
|
||||
|
@ -143,6 +149,8 @@ EXAMPLES = r'''
|
|||
tags:
|
||||
- update
|
||||
- nginx
|
||||
skip_tags:
|
||||
- service
|
||||
|
||||
- name: Run puppet agent in noop mode
|
||||
community.general.puppet:
|
||||
|
@ -198,6 +206,7 @@ def main():
|
|||
environment=dict(type='str'),
|
||||
certname=dict(type='str'),
|
||||
tags=dict(type='list', elements='str'),
|
||||
skip_tags=dict(type='list', elements='str'),
|
||||
execute=dict(type='str'),
|
||||
summarize=dict(type='bool', default=False),
|
||||
debug=dict(type='bool', default=False),
|
||||
|
@ -232,11 +241,11 @@ def main():
|
|||
runner = puppet_utils.puppet_runner(module)
|
||||
|
||||
if not p['manifest'] and not p['execute']:
|
||||
args_order = "_agent_fixed puppetmaster show_diff confdir environment tags certname noop use_srv_records"
|
||||
args_order = "_agent_fixed puppetmaster show_diff confdir environment tags skip_tags certname noop use_srv_records"
|
||||
with runner(args_order) as ctx:
|
||||
rc, stdout, stderr = ctx.run()
|
||||
else:
|
||||
args_order = "_apply_fixed logdest modulepath environment certname tags noop _execute summarize debug verbose"
|
||||
args_order = "_apply_fixed logdest modulepath environment certname tags skip_tags noop _execute summarize debug verbose"
|
||||
with runner(args_order) as ctx:
|
||||
rc, stdout, stderr = ctx.run(_execute=[p['execute'], p['manifest']])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue