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
cc6fc149
Commit
cc6fc149
authored
Jan 31, 2013
by
Yeukhon Wong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/devel' into devel
parents
980ffde1
fabb2a61
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
7 deletions
+11
-7
lib/ansible/utils/template.py
+2
-0
library/get_url
+6
-4
library/supervisorctl
+2
-2
plugins/inventory/ec2.py
+1
-1
No files found.
lib/ansible/utils/template.py
View file @
cc6fc149
...
@@ -170,6 +170,8 @@ def _varFind(basedir, text, vars, lookup_fatal, depth=0):
...
@@ -170,6 +170,8 @@ def _varFind(basedir, text, vars, lookup_fatal, depth=0):
except
errors
.
AnsibleError
:
except
errors
.
AnsibleError
:
if
not
lookup_fatal
:
if
not
lookup_fatal
:
replacement
=
None
replacement
=
None
else
:
raise
else
:
else
:
replacement
=
None
replacement
=
None
return
{
'replacement'
:
replacement
,
'start'
:
start
,
'end'
:
end
}
return
{
'replacement'
:
replacement
,
'start'
:
start
,
'end'
:
end
}
...
...
library/get_url
View file @
cc6fc149
...
@@ -101,11 +101,13 @@ def url_do_get(module, url, dest):
...
@@ -101,11 +101,13 @@ def url_do_get(module, url, dest):
info
=
dict
(
url
=
url
,
dest
=
dest
)
info
=
dict
(
url
=
url
,
dest
=
dest
)
r
=
None
r
=
None
parsed
=
urlparse
.
urlparse
(
url
)
parsed
=
urlparse
.
urlparse
(
url
)
if
'@'
in
parsed
.
netloc
:
if
'@'
in
parsed
[
1
]
:
credentials
=
parsed
.
netloc
.
split
(
'@'
)[
0
]
credentials
,
netloc
=
parsed
[
1
]
.
split
(
'@'
,
1
)
if
':'
in
credentials
:
if
':'
in
credentials
:
username
,
password
=
credentials
.
split
(
':'
)
username
,
password
=
credentials
.
split
(
':'
,
1
)
netloc
=
parsed
.
netloc
.
split
(
'@'
)[
1
]
else
:
username
=
credentials
password
=
''
parsed
=
list
(
parsed
)
parsed
=
list
(
parsed
)
parsed
[
1
]
=
netloc
parsed
[
1
]
=
netloc
...
...
library/supervisorctl
View file @
cc6fc149
...
@@ -58,7 +58,7 @@ def main():
...
@@ -58,7 +58,7 @@ def main():
SUPERVISORCTL
=
module
.
get_bin_path
(
'supervisorctl'
,
True
)
SUPERVISORCTL
=
module
.
get_bin_path
(
'supervisorctl'
,
True
)
rc
,
out
,
err
=
module
.
run_command
(
'
%
s status'
%
supervisorctl
)
rc
,
out
,
err
=
module
.
run_command
(
'
%
s status'
%
SUPERVISORCTL
)
present
=
name
in
out
present
=
name
in
out
if
state
==
'present'
:
if
state
==
'present'
:
...
@@ -73,7 +73,7 @@ def main():
...
@@ -73,7 +73,7 @@ def main():
module
.
exit_json
(
changed
=
False
,
name
=
name
,
state
=
state
)
module
.
exit_json
(
changed
=
False
,
name
=
name
,
state
=
state
)
rc
,
out
,
err
=
module
.
run_command
(
'
%
s status
%
s'
%
(
supervisorctl
,
name
))
rc
,
out
,
err
=
module
.
run_command
(
'
%
s status
%
s'
%
(
SUPERVISORCTL
,
name
))
running
=
'RUNNING'
in
out
running
=
'RUNNING'
in
out
if
running
and
state
==
'started'
:
if
running
and
state
==
'started'
:
...
...
plugins/inventory/ec2.py
View file @
cc6fc149
...
@@ -274,7 +274,7 @@ class Ec2Inventory(object):
...
@@ -274,7 +274,7 @@ class Ec2Inventory(object):
addressable '''
addressable '''
# Only want running instances
# Only want running instances
if
instance
.
state
==
'terminated
'
:
if
instance
.
state
!=
'running
'
:
return
return
# Select the best destination address
# Select the best destination address
...
...
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