Skip to content

Commit

Permalink
Merge pull request #86 from puppetlabs/mv
Browse files Browse the repository at this point in the history
Provide mv wrapper task
  • Loading branch information
reidmv committed Apr 2, 2020
2 parents 2913ef8 + 7c51e2d commit e91d466
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tasks/mv.json
@@ -0,0 +1,17 @@
{
"description": "Wrapper task for mv command",
"parameters": {
"source": {
"type": "String",
"description": "Current path of file"
},
"target": {
"type": "String",
"description": "New path of file"
}
},
"input_method": "environment",
"implementations": [
{"name": "mv.sh"}
]
}
11 changes: 11 additions & 0 deletions tasks/mv.sh
@@ -0,0 +1,11 @@
#!/bin/bash

# This task exists as a convenience for users who need predictable sudo
# commands without variance to write into their sudoers rules. The only real
# variable in commands used by peadm is the filename of the PE installer
# tarball. This task can be used in a pre-plan to homogenize calls to sudo.
# Rather than literally calling "mv" with a variable filename, the mv.sh task
# can be called. Inputs come as environment variables so the call doesn't
# change.

mv "$PT_source" "$PT_target"

0 comments on commit e91d466

Please sign in to comment.