From b535146112cbd7964939ebef695fa22c59c87843 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Sat, 11 May 2019 20:06:47 +0100 Subject: [PATCH] Add equo update task --- tasks/update.json | 11 +++++++++++ tasks/update.sh | 7 +++++++ 2 files changed, 18 insertions(+) create mode 100644 tasks/update.json create mode 100644 tasks/update.sh 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