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
This commit is contained in:
Monty Taylor 2016-01-21 18:05:50 -05:00
parent d0854ce5d5
commit e1c1430bd6

View File

@ -15,11 +15,20 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this software. If not, see <http://www.gnu.org/licenses/>. # along with this software. If not, see <http://www.gnu.org/licenses/>.
import json
import os import os
import pipes import pipes
import stat 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 = ''' DOCUMENTATION = '''
--- ---
module: puppet module: puppet
@ -43,14 +52,6 @@ options:
- Path to the manifest file to run puppet apply on. - Path to the manifest file to run puppet apply on.
required: false required: false
default: None 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: facts:
description: description:
- A dict of values to pass in as persistent external facter facts - A dict of values to pass in as persistent external facter facts
@ -111,7 +112,7 @@ def main():
puppetmaster=dict(required=False, default=None), puppetmaster=dict(required=False, default=None),
manifest=dict(required=False, default=None), manifest=dict(required=False, default=None),
show_diff=dict( 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), facts=dict(default=None),
facter_basename=dict(default='ansible'), facter_basename=dict(default='ansible'),
environment=dict(required=False, default=None), environment=dict(required=False, default=None),