Skip to content

Commit e91d466

Browse files
authored
Merge pull request #86 from puppetlabs/mv
Provide mv wrapper task
2 parents 2913ef8 + 7c51e2d commit e91d466

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

tasks/mv.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"description": "Wrapper task for mv command",
3+
"parameters": {
4+
"source": {
5+
"type": "String",
6+
"description": "Current path of file"
7+
},
8+
"target": {
9+
"type": "String",
10+
"description": "New path of file"
11+
}
12+
},
13+
"input_method": "environment",
14+
"implementations": [
15+
{"name": "mv.sh"}
16+
]
17+
}

tasks/mv.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
# This task exists as a convenience for users who need predictable sudo
4+
# commands without variance to write into their sudoers rules. The only real
5+
# variable in commands used by peadm is the filename of the PE installer
6+
# tarball. This task can be used in a pre-plan to homogenize calls to sudo.
7+
# Rather than literally calling "mv" with a variable filename, the mv.sh task
8+
# can be called. Inputs come as environment variables so the call doesn't
9+
# change.
10+
11+
mv "$PT_source" "$PT_target"

0 commit comments

Comments
 (0)