From 6d8a54a1b5140dec906379c0c943f68c36e93aee Mon Sep 17 00:00:00 2001 From: elf Date: Sat, 9 May 2020 02:59:33 +0900 Subject: [PATCH] [cdist #3] create __colourful_file type --- kjg/dot-cdist/manifest/init | 3 ++- kjg/dot-cdist/type/__colourful_file/manifest | 10 ++++++++++ kjg/dot-cdist/type/__colourful_file/parameter/optional | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 kjg/dot-cdist/type/__colourful_file/manifest create mode 100644 kjg/dot-cdist/type/__colourful_file/parameter/optional diff --git a/kjg/dot-cdist/manifest/init b/kjg/dot-cdist/manifest/init index 3f3a6db..99b61dc 100644 --- a/kjg/dot-cdist/manifest/init +++ b/kjg/dot-cdist/manifest/init @@ -1,6 +1,7 @@ case "$__target_host" in # Everybody has this localhost) - __my_computer + #__my_computer + __colourful_file ;; esac diff --git a/kjg/dot-cdist/type/__colourful_file/manifest b/kjg/dot-cdist/type/__colourful_file/manifest new file mode 100644 index 0000000..31d52a6 --- /dev/null +++ b/kjg/dot-cdist/type/__colourful_file/manifest @@ -0,0 +1,10 @@ +#!/bin/sh + +DOMAIN_NAME="$__object_id" + +COLOUR=$(cat "$__object/parameter/colour") + +__file ~/colourful \ + --mode 0644 --source - <