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
81953754
Commit
81953754
authored
Jul 20, 2012
by
Stephen Fromm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sanitize possible password argument when logging invocation; taken from user module
parent
baf07659
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
lib/ansible/module_common.py
+4
-1
No files found.
lib/ansible/module_common.py
View file @
81953754
...
...
@@ -33,6 +33,7 @@ try:
except ImportError:
import simplejson as json
import os
import re
import shlex
import subprocess
import sys
...
...
@@ -118,7 +119,9 @@ class AnsibleModule(object):
def _log_invocation(self):
''' log that ansible ran the module '''
syslog.openlog('ansible-
%
s'
%
os.path.basename(__file__))
syslog.syslog(syslog.LOG_NOTICE, 'Invoked with
%
s'
%
self.args)
# Sanitize possible password argument when logging
log_args = re.sub(r'password=.+ (.*)', r"password=NOT_LOGGING_PASSWORD
\1
", self.args)
syslog.syslog(syslog.LOG_NOTICE, 'Invoked with
%
s'
%
log_args)
def exit_json(self, **kwargs):
''' return from the module, without error '''
...
...
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