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
abac7202
Commit
abac7202
authored
Aug 22, 2013
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'command-relpath' of
https://github.com/j2sol/ansible
into j2sol-command-relpath
parents
d9d49cf1
36ca7098
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
library/commands/command
+3
-6
No files found.
library/commands/command
View file @
abac7202
...
...
@@ -33,8 +33,7 @@ description:
- The M(command) module takes the command name followed by a list of space-delimited arguments.
- The given command will be executed on all selected nodes. It will not be
processed through the shell, so variables like C($HOME) and operations
like C("<"), C(">"), C("|"), and C("&") will not work. As such, all
paths to commands must be fully qualified
like C("<"), C(">"), C("|"), and C("&") will not work.
options:
free_form:
description:
...
...
@@ -192,17 +191,15 @@ class CommandModule(AnsibleModule):
params
[
'removes'
]
=
v
elif
m
.
group
(
2
)
==
"chdir"
:
v
=
os
.
path
.
expanduser
(
v
)
v
=
os
.
path
.
abspath
(
v
)
if
not
(
os
.
path
.
exists
(
v
)
and
os
.
path
.
isdir
(
v
)):
self
.
fail_json
(
rc
=
258
,
msg
=
"cannot change to directory '
%
s': path does not exist"
%
v
)
elif
v
[
0
]
!=
os
.
sep
:
self
.
fail_json
(
rc
=
259
,
msg
=
"the path for 'chdir' argument must be fully qualified"
)
params
[
'chdir'
]
=
v
elif
m
.
group
(
2
)
==
"executable"
:
v
=
os
.
path
.
expanduser
(
v
)
v
=
os
.
path
.
abspath
(
v
)
if
not
(
os
.
path
.
exists
(
v
)):
self
.
fail_json
(
rc
=
258
,
msg
=
"cannot use executable '
%
s': file does not exist"
%
v
)
elif
v
[
0
]
!=
'/'
:
self
.
fail_json
(
rc
=
259
,
msg
=
"the path for 'executable' argument must be fully qualified"
)
params
[
'executable'
]
=
v
args
=
r
.
sub
(
""
,
args
)
params
[
'args'
]
=
args
...
...
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