diff --git a/tasks/update.json b/tasks/update.json new file mode 100644 index 0000000..17be446 --- /dev/null +++ b/tasks/update.json @@ -0,0 +1,11 @@ +{ + "puppet_task_version": 1, + "supports_noop": false, + "description": "Run `equo update` on target nodes to refresh repository definitions", + "parameters": { + "repo": { + "description": "Restrict update to only this named repository", + "type": "Optional[Pattern[/^[a-zA-Z0-9._-]+$/]]" + } + } +} diff --git a/tasks/update.sh b/tasks/update.sh new file mode 100644 index 0000000..e3b7311 --- /dev/null +++ b/tasks/update.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ ! -z "${PT_repo}" ]; then + /usr/bin/equo update "${PT_repo}" +else + /usr/bin/equo update +fi