From 69ead0ba7864b1e7367eb9755b51d30ecc0da0d2 Mon Sep 17 00:00:00 2001 From: Brett Date: Wed, 12 Jun 2019 18:02:58 +1000 Subject: [PATCH] puppet: new arg to toggle no-/use_srv_records flag (#53095) --- lib/ansible/modules/system/puppet.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/ansible/modules/system/puppet.py b/lib/ansible/modules/system/puppet.py index 9f7e1df8d2..a856751b3c 100644 --- a/lib/ansible/modules/system/puppet.py +++ b/lib/ansible/modules/system/puppet.py @@ -82,6 +82,11 @@ options: - It has no effect with a puppetmaster. type: str version_added: "2.1" + use_srv_records: + description: + - Toggles use_srv_records flag + type: bool + version_added: "2.9" summarize: description: - Whether to print a transaction summary. @@ -192,6 +197,7 @@ def main(): summarize=dict(type='bool', default=False), debug=dict(type='bool', default=False), verbose=dict(type='bool', default=False), + use_srv_records=dict(type='bool'), ), supports_check_mode=True, mutually_exclusive=[ @@ -260,6 +266,11 @@ def main(): cmd += " --certname='%s'" % p['certname'] if module.check_mode: cmd += " --noop" + if p['use_srv_records'] is not None: + if not ['use_srv_records']: + cmd += " --no-use_srv_records" + else: + cmd += " --use_srv_records" elif 'noop' in p: if p['noop']: cmd += " --noop"