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
b75b9681
Commit
b75b9681
authored
Feb 23, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more places to use yaml.safe_load
parent
a9ea3136
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
lib/ansible/runner/filter_plugins/core.py
+1
-1
lib/ansible/utils/module_docs.py
+1
-1
library/git
+1
-1
plugins/inventory/yaml.py
+1
-1
No files found.
lib/ansible/runner/filter_plugins/core.py
View file @
b75b9681
...
...
@@ -26,6 +26,6 @@ class FilterModule(object):
'to_json'
:
json
.
dumps
,
'from_json'
:
json
.
loads
,
'to_yaml'
:
yaml
.
safe_dump
,
'from_yaml'
:
yaml
.
load
,
'from_yaml'
:
yaml
.
safe_
load
,
}
lib/ansible/utils/module_docs.py
View file @
b75b9681
...
...
@@ -45,7 +45,7 @@ def get_docstring(filename, verbose=False):
for
child
in
M
.
body
:
if
isinstance
(
child
,
ast
.
Assign
):
if
'DOCUMENTATION'
in
(
t
.
id
for
t
in
child
.
targets
):
doc
=
yaml
.
load
(
child
.
value
.
s
)
doc
=
yaml
.
safe_
load
(
child
.
value
.
s
)
if
'EXAMPLES'
in
(
t
.
id
for
t
in
child
.
targets
):
plainexamples
=
child
.
value
.
s
[
1
:]
# Skip first empty line
except
:
...
...
library/git
View file @
b75b9681
...
...
@@ -160,7 +160,7 @@ def get_head_branch(module, dest, remote):
# Check if the .git is a file. If it is a file, it means that we are in a submodule structure.
if
os
.
path
.
isfile
(
repo_path
):
try
:
gitdir
=
yaml
.
load
(
open
(
repo_path
))
.
get
(
'gitdir'
)
gitdir
=
yaml
.
safe_
load
(
open
(
repo_path
))
.
get
(
'gitdir'
)
# There is a posibility the .git file to have an absolute path.
if
os
.
path
.
isabs
(
gitdir
):
repo_path
=
gitdir
...
...
plugins/inventory/yaml.py
View file @
b75b9681
...
...
@@ -226,7 +226,7 @@ base_dir = os.path.dirname(os.path.realpath(__file__))
hosts_file
=
os
.
path
.
join
(
base_dir
,
'hosts.yml'
)
with
open
(
hosts_file
)
as
f
:
yaml_hosts
=
yaml
.
load
(
f
.
read
()
)
yaml_hosts
=
yaml
.
safe_
load
(
f
.
read
()
)
groups
,
all_hosts
=
parse_yaml
(
yaml_hosts
)
...
...
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