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
deb71da9
Commit
deb71da9
authored
Feb 26, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trim md5sum string so it does not contain the filename
also fix a bug/typo in the reporting from playbook
parent
bfd93081
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
lib/ansible/playbook.py
+1
-1
library/copy
+2
-2
library/template
+2
-2
No files found.
lib/ansible/playbook.py
View file @
deb71da9
...
...
@@ -183,7 +183,7 @@ class PlayBook(object):
if
not
self
.
changed
.
has_key
(
host
):
self
.
changed
[
host
]
=
1
else
:
self
.
change
s
[
host
]
=
self
.
changed
[
host
]
+
1
self
.
change
d
[
host
]
=
self
.
changed
[
host
]
+
1
# flag which notify handlers need to be run
...
...
library/copy
View file @
deb71da9
...
...
@@ -22,11 +22,11 @@ if not os.path.exists(source):
md5sum
=
None
changed
=
False
if
os
.
path
.
exists
(
dest
):
md5sum
=
os
.
popen
(
"md5sum
%
s"
%
dest
)
.
read
()
md5sum
=
os
.
popen
(
"md5sum
%
s"
%
dest
)
.
read
()
.
split
()[
0
]
os
.
system
(
"cp
%
s
%
s"
%
(
source
,
dest
))
md5sum2
=
os
.
popen
(
"md5sum
%
s"
%
dest
)
.
read
()
md5sum2
=
os
.
popen
(
"md5sum
%
s"
%
dest
)
.
read
()
.
split
()[
0
]
if
md5sum
!=
md5sum2
:
changed
=
True
...
...
library/template
View file @
deb71da9
...
...
@@ -45,7 +45,7 @@ source = file(source).read()
changed
=
False
md5sum
=
None
if
os
.
path
.
exists
(
dest
):
md5sum
=
os
.
popen
(
"md5sum
%
s"
%
dest
)
.
read
()
md5sum
=
os
.
popen
(
"md5sum
%
s"
%
dest
)
.
read
()
.
split
()[
0
]
# call Jinja2 here and save the new template file
template
=
jinja2
.
Template
(
source
)
...
...
@@ -58,7 +58,7 @@ f.close()
# other end unless things were successful
# record m5sum and return success and whether things have changed
md5sum2
=
os
.
popen
(
"md5sum
%
s"
%
dest
)
.
read
()
md5sum2
=
os
.
popen
(
"md5sum
%
s"
%
dest
)
.
read
()
.
split
()[
0
]
if
md5sum
!=
md5sum2
:
changed
=
True
...
...
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