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
c0747b7b
Commit
c0747b7b
authored
Oct 30, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pep8 fixes
parent
27e518a0
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
7 additions
and
3 deletions
+7
-3
lib/ansible/inventory/__init__.py
+0
-0
lib/ansible/playbook/play.py
+0
-0
lib/ansible/playbook/task.py
+0
-0
lib/ansible/runner/__init__.py
+1
-1
lib/ansible/utils.py
+3
-0
library/cron
+1
-1
library/fireball
+0
-0
library/lineinfile
+2
-0
library/mysql_user
+0
-1
library/postgresql_db
+0
-0
library/postgresql_user
+0
-0
library/setup
+0
-0
No files found.
lib/ansible/inventory/__init__.py
View file @
c0747b7b
lib/ansible/playbook/play.py
View file @
c0747b7b
lib/ansible/playbook/task.py
View file @
c0747b7b
lib/ansible/runner/__init__.py
View file @
c0747b7b
...
...
@@ -369,7 +369,7 @@ class Runner(object):
conn
=
None
actual_host
=
inject
.
get
(
'ansible_ssh_host'
,
host
)
actual_port
=
port
if
self
.
transport
in
[
'paramiko'
,
'ssh'
]:
if
self
.
transport
in
[
'paramiko'
,
'ssh'
]:
actual_port
=
inject
.
get
(
'ansible_ssh_port'
,
port
)
# the delegated host may have different SSH port configured, etc
...
...
lib/ansible/utils.py
View file @
c0747b7b
...
...
@@ -142,10 +142,13 @@ def is_failed(result):
return
((
result
.
get
(
'rc'
,
0
)
!=
0
)
or
(
result
.
get
(
'failed'
,
False
)
in
[
True
,
'True'
,
'true'
]))
def
check_conditional
(
conditional
):
def
is_set
(
var
):
return
not
var
.
startswith
(
"$"
)
def
is_unset
(
var
):
return
var
.
startswith
(
"$"
)
return
eval
(
conditional
.
replace
(
"
\n
"
,
"
\\
n"
))
def
is_executable
(
path
):
...
...
library/cron
View file @
c0747b7b
...
...
@@ -154,7 +154,7 @@ def add_job(name,job,tmpfile):
def
update_job
(
name
,
job
,
tmpfile
):
return
_update_job
(
name
,
job
,
tmpfile
,
do_add_job
)
def
do_add_job
(
lines
,
comment
,
job
):
def
do_add_job
(
lines
,
comment
,
job
):
lines
.
append
(
comment
)
lines
.
append
(
job
)
...
...
library/fireball
View file @
c0747b7b
library/lineinfile
View file @
c0747b7b
...
...
@@ -157,12 +157,14 @@ def absent(module, dest, regexp, backup):
f
.
close
()
cre
=
re
.
compile
(
regexp
)
found
=
[]
def
matcher
(
line
):
if
cre
.
search
(
line
):
found
.
append
(
line
)
return
False
else
:
return
True
lines
=
filter
(
matcher
,
lines
)
changed
=
len
(
found
)
>
0
if
changed
:
...
...
library/mysql_user
View file @
c0747b7b
...
...
@@ -214,7 +214,6 @@ def privileges_grant(cursor, user,host,db_table,priv):
query
=
"GRANT
%
s ON
%
s TO '
%
s'@'
%
s'"
%
(
priv_string
,
db_table
,
user
,
host
)
if
'GRANT'
in
priv
:
query
=
query
+
" WITH GRANT OPTION"
cursor
.
execute
(
query
)
def
load_mycnf
():
...
...
library/postgresql_db
View file @
c0747b7b
library/postgresql_user
View file @
c0747b7b
library/setup
View file @
c0747b7b
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