From e1c1430bd617bb340e969744ad7ad1cc4dd1fa8c Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 21 Jan 2016 18:05:50 -0500 Subject: [PATCH] Sync with upstream ansible The show_diff option is superseeded by a new built-in option in ansible so does not need to be kept in the docs here. Also, upstream needs the simplejson fallback. We do not, but keeping in sync is easier. Change-Id: I45a34614d08f4518f031c652915dae97cc3ccbed --- library/puppet | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/library/puppet b/library/puppet index 1c925d0..d4f69b1 100644 --- a/library/puppet +++ b/library/puppet @@ -15,11 +15,20 @@ # You should have received a copy of the GNU General Public License # along with this software. If not, see . -import json import os import pipes import stat +try: + import json +except ImportError: + try: + import simplejson as json + except ImportError: + # Let snippet from module_utils/basic.py return a proper error in this case + pass + + DOCUMENTATION = ''' --- module: puppet @@ -43,14 +52,6 @@ options: - Path to the manifest file to run puppet apply on. required: false default: None - show_diff: - description: - - > - Should puppet return diffs of changes applied. Defaults to off to - avoid leaking secret changes by default. - required: false - default: no - choices: [ "yes", "no" ] facts: description: - A dict of values to pass in as persistent external facter facts @@ -111,7 +112,7 @@ def main(): puppetmaster=dict(required=False, default=None), manifest=dict(required=False, default=None), show_diff=dict( - default=False, aliases=['show-diff'], type='bool'), + default=False, aliases=['show-diff'], type='bool'), # internal code to work with --diff, do not use facts=dict(default=None), facter_basename=dict(default='ansible'), environment=dict(required=False, default=None),