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
68a9adc1
Commit
68a9adc1
authored
Jul 15, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Indentation cleanup (partial)
parent
7b177e8e
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
6 additions
and
13 deletions
+6
-13
lib/ansible/callbacks.py
+0
-0
lib/ansible/inventory/__init__.py
+0
-1
lib/ansible/inventory/group.py
+0
-0
lib/ansible/inventory/host.py
+1
-1
lib/ansible/inventory/ini.py
+0
-0
lib/ansible/inventory/yaml.py
+0
-0
lib/ansible/playbook/__init__.py
+3
-9
lib/ansible/runner/__init__.py
+0
-0
lib/ansible/utils.py
+2
-2
No files found.
lib/ansible/callbacks.py
View file @
68a9adc1
lib/ansible/inventory/__init__.py
View file @
68a9adc1
...
@@ -161,7 +161,6 @@ class Inventory(object):
...
@@ -161,7 +161,6 @@ class Inventory(object):
def
restrict_to
(
self
,
restriction
,
append_missing
=
False
):
def
restrict_to
(
self
,
restriction
,
append_missing
=
False
):
""" Restrict list operations to the hosts given in restriction """
""" Restrict list operations to the hosts given in restriction """
if
type
(
restriction
)
!=
list
:
if
type
(
restriction
)
!=
list
:
restriction
=
[
restriction
]
restriction
=
[
restriction
]
self
.
_restriction
=
restriction
self
.
_restriction
=
restriction
...
...
lib/ansible/inventory/group.py
View file @
68a9adc1
lib/ansible/inventory/host.py
View file @
68a9adc1
...
@@ -39,7 +39,7 @@ class Host(object):
...
@@ -39,7 +39,7 @@ class Host(object):
self
.
groups
.
append
(
group
)
self
.
groups
.
append
(
group
)
def
set_variable
(
self
,
key
,
value
):
def
set_variable
(
self
,
key
,
value
):
self
.
vars
[
key
]
=
value
;
self
.
vars
[
key
]
=
value
def
get_groups
(
self
):
def
get_groups
(
self
):
groups
=
{}
groups
=
{}
...
...
lib/ansible/inventory/ini.py
View file @
68a9adc1
lib/ansible/inventory/yaml.py
View file @
68a9adc1
lib/ansible/playbook/__init__.py
View file @
68a9adc1
...
@@ -133,23 +133,17 @@ class PlayBook(object):
...
@@ -133,23 +133,17 @@ class PlayBook(object):
accumulated_plays
=
[]
accumulated_plays
=
[]
if
type
(
playbook_data
)
!=
list
:
if
type
(
playbook_data
)
!=
list
:
raise
errors
.
AnsibleError
(
raise
errors
.
AnsibleError
(
"parse error: playbooks must be formatted as a YAML list"
)
"parse error: playbooks must be formatted as a YAML list"
)
for
play
in
playbook_data
:
for
play
in
playbook_data
:
if
type
(
play
)
!=
dict
:
if
type
(
play
)
!=
dict
:
raise
errors
.
AnsibleError
(
raise
errors
.
AnsibleError
(
"parse error: each play in a playbook must a YAML dictionary (hash), recieved:
%
s"
%
play
)
"parse error: each play in a playbook must a YAML dictionary (hash), recieved:
%
s"
%
play
)
if
'include'
in
play
:
if
'include'
in
play
:
if
len
(
play
.
keys
())
==
1
:
if
len
(
play
.
keys
())
==
1
:
included_path
=
utils
.
path_dwim
(
self
.
basedir
,
play
[
'include'
])
included_path
=
utils
.
path_dwim
(
self
.
basedir
,
play
[
'include'
])
accumulated_plays
.
extend
(
self
.
_load_playbook_from_file
(
included_path
))
accumulated_plays
.
extend
(
self
.
_load_playbook_from_file
(
included_path
))
else
:
else
:
raise
errors
.
AnsibleError
(
raise
errors
.
AnsibleError
(
"parse error: top level includes cannot be used with other directives:
%
s"
%
play
)
"parse error: top level includes cannot be used with other directives:
%
s"
%
play
)
else
:
else
:
accumulated_plays
.
append
(
play
)
accumulated_plays
.
append
(
play
)
...
...
lib/ansible/runner/__init__.py
View file @
68a9adc1
lib/ansible/utils.py
View file @
68a9adc1
...
@@ -177,11 +177,11 @@ def parse_json(data):
...
@@ -177,11 +177,11 @@ def parse_json(data):
# not JSON, but try "Baby JSON" which allows many of our modules to not
# not JSON, but try "Baby JSON" which allows many of our modules to not
# require JSON and makes writing modules in bash much simpler
# require JSON and makes writing modules in bash much simpler
results
=
{}
results
=
{}
try
:
try
:
tokens
=
shlex
.
split
(
data
)
tokens
=
shlex
.
split
(
data
)
except
:
except
:
print
"failed to parse json: "
+
data
print
"failed to parse json: "
+
data
raise
;
raise
for
t
in
tokens
:
for
t
in
tokens
:
if
t
.
find
(
"="
)
==
-
1
:
if
t
.
find
(
"="
)
==
-
1
:
...
...
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