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
c5720092
Commit
c5720092
authored
Oct 14, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made syslog import optional as intel's edison custom compiles python w/o it
parent
2963bba9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
lib/ansible/module_utils/basic.py
+10
-4
No files found.
lib/ansible/module_utils/basic.py
View file @
c5720092
...
@@ -54,7 +54,6 @@ import pipes
...
@@ -54,7 +54,6 @@ import pipes
import
shlex
import
shlex
import
subprocess
import
subprocess
import
sys
import
sys
import
syslog
import
types
import
types
import
time
import
time
import
select
import
select
...
@@ -69,6 +68,12 @@ import errno
...
@@ -69,6 +68,12 @@ import errno
from
itertools
import
repeat
from
itertools
import
repeat
try
:
try
:
import
syslog
HAS_SYSLOG
=
True
except
ImportError
:
HAS_SYSLOG
=
False
try
:
# Python 2
# Python 2
from
itertools
import
imap
from
itertools
import
imap
except
ImportError
:
except
ImportError
:
...
@@ -1246,9 +1251,10 @@ class AnsibleModule(object):
...
@@ -1246,9 +1251,10 @@ class AnsibleModule(object):
return
params
return
params
def
_log_to_syslog
(
self
,
msg
):
def
_log_to_syslog
(
self
,
msg
):
module
=
'ansible-
%
s'
%
os
.
path
.
basename
(
__file__
)
if
HAS_SYSLOG
:
syslog
.
openlog
(
str
(
module
),
0
,
syslog
.
LOG_USER
)
module
=
'ansible-
%
s'
%
os
.
path
.
basename
(
__file__
)
syslog
.
syslog
(
syslog
.
LOG_INFO
,
msg
)
syslog
.
openlog
(
str
(
module
),
0
,
syslog
.
LOG_USER
)
syslog
.
syslog
(
syslog
.
LOG_INFO
,
msg
)
def
debug
(
self
,
msg
):
def
debug
(
self
,
msg
):
if
self
.
_debug
:
if
self
.
_debug
:
...
...
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