Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
cd32597a
Commit
cd32597a
authored
Feb 17, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the file module work as expected in check mode
parent
931b9f41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
lib/ansible/module_common.py
+7
-1
No files found.
lib/ansible/module_common.py
View file @
cd32597a
...
...
@@ -159,6 +159,7 @@ class AnsibleModule(object):
if check_invalid_arguments:
self._check_invalid_arguments()
self._check_for_check_mode()
self._set_defaults(pre=True)
...
...
@@ -462,13 +463,18 @@ class AnsibleModule(object):
if alias in self.params:
self.params[k] = self.params[alias]
def _check_
invalid_arguments
(self):
def _check_
for_check_mode
(self):
for (k,v) in self.params.iteritems():
if k == 'CHECKMODE':
if not self.supports_check_mode:
self.exit_json(skipped=True, msg="remote module does not support check mode")
if self.supports_check_mode:
self.check_mode = True
def _check_invalid_arguments(self):
for (k,v) in self.params.iteritems():
if k == 'CHECKMODE':
continue
if k not in self._legal_inputs:
self.fail_json(msg="unsupported parameter for module:
%
s"
%
k)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment