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
7a5076c8
Commit
7a5076c8
authored
Jul 30, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catching shlex splitting error in fact gathering get_cmdline call
Fixes #8352
parent
80df2135
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
lib/ansible/module_utils/facts.py
+9
-6
No files found.
lib/ansible/module_utils/facts.py
View file @
7a5076c8
...
...
@@ -327,12 +327,15 @@ class Facts(object):
data
=
get_file_content
(
'/proc/cmdline'
)
if
data
:
self
.
facts
[
'cmdline'
]
=
{}
for
piece
in
shlex
.
split
(
data
):
item
=
piece
.
split
(
'='
,
1
)
if
len
(
item
)
==
1
:
self
.
facts
[
'cmdline'
][
item
[
0
]]
=
True
else
:
self
.
facts
[
'cmdline'
][
item
[
0
]]
=
item
[
1
]
try
:
for
piece
in
shlex
.
split
(
data
):
item
=
piece
.
split
(
'='
,
1
)
if
len
(
item
)
==
1
:
self
.
facts
[
'cmdline'
][
item
[
0
]]
=
True
else
:
self
.
facts
[
'cmdline'
][
item
[
0
]]
=
item
[
1
]
except
ValueError
,
e
:
pass
def
get_public_ssh_host_keys
(
self
):
dsa_filename
=
'/etc/ssh/ssh_host_dsa_key.pub'
...
...
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