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
6f05eb9b
Commit
6f05eb9b
authored
Oct 18, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1361 from lantins/devel
Copy module can replace symlink with a real file.
parents
731ef69e
08a6ac3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
library/copy
+5
-1
library/facter
+1
-1
No files found.
library/copy
View file @
6f05eb9b
...
...
@@ -100,11 +100,15 @@ def main():
module
.
fail_json
(
msg
=
"Destination
%
s not writable"
%
(
os
.
path
.
dirname
(
dest
)))
backup_file
=
None
if
md5sum_src
!=
md5sum_dest
:
if
md5sum_src
!=
md5sum_dest
or
os
.
path
.
islink
(
dest
)
:
try
:
if
backup
:
if
os
.
path
.
exists
(
dest
):
backup_file
=
module
.
backup_local
(
dest
)
# allow for conversion from symlink.
if
os
.
path
.
islink
(
dest
):
os
.
unlink
(
dest
)
open
(
dest
,
'w'
)
.
close
()
#TODO:pid + epoch should avoid most collisions, hostname/mac for those using nfs?
# might be an issue with exceeding path length
dest_tmp
=
"
%
s.
%
s.
%
s.tmp"
%
(
dest
,
os
.
getpid
(),
time
.
time
())
...
...
library/facter
View file @
6f05eb9b
...
...
@@ -31,7 +31,7 @@ description:
version_added: "0.2"
options: []
examples:
- code: ansible
www.example.net -m facter
- code: ansible www.example.net -m facter
description: "Example command-line invocation"
notes: []
requirements: [ "facter", "ruby-json" ]
...
...
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