From 3141840cf4b07e54cb53a4929b971a1ff120682e Mon Sep 17 00:00:00 2001 From: llnu Date: Mon, 11 May 2020 09:26:05 +0200 Subject: [PATCH] Reverted testing the requirement changes, added messaging, and gencode remote to reload nginx after the configuration gets writte Modified-by: llnu --- balazs/dot-cdist/manifest/init | 8 +++----- balazs/dot-cdist/type/__my_nginx_site/gencode-remote | 3 +++ balazs/dot-cdist/type/__my_nginx_site/manifest | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 balazs/dot-cdist/type/__my_nginx_site/gencode-remote diff --git a/balazs/dot-cdist/manifest/init b/balazs/dot-cdist/manifest/init index 0a4061b..9fd9bdc 100644 --- a/balazs/dot-cdist/manifest/init +++ b/balazs/dot-cdist/manifest/init @@ -6,16 +6,14 @@ case "$__target_host" in # Copy a cool motd from the type's file directory __motd --source "$__files/motd" -# __package emacs --state present - __timezone Europe/Zurich __my_computer -# __my_nginx + __my_nginx - __my_nginx_site woo.com - __my_nginx_site chee.se + require="__my_nginx" __my_nginx_site woo.com + require="__my_nginx" __my_nginx_site chee.se ;; esac diff --git a/balazs/dot-cdist/type/__my_nginx_site/gencode-remote b/balazs/dot-cdist/type/__my_nginx_site/gencode-remote new file mode 100644 index 0000000..c9eed7a --- /dev/null +++ b/balazs/dot-cdist/type/__my_nginx_site/gencode-remote @@ -0,0 +1,3 @@ +if grep -q "^__your_type/object/id:conf_file_changed" "$__messages_in"; then + echo "service nginx reload" +fi \ No newline at end of file diff --git a/balazs/dot-cdist/type/__my_nginx_site/manifest b/balazs/dot-cdist/type/__my_nginx_site/manifest index 7bdad79..d7bbca2 100644 --- a/balazs/dot-cdist/type/__my_nginx_site/manifest +++ b/balazs/dot-cdist/type/__my_nginx_site/manifest @@ -15,3 +15,4 @@ server { } EOF +echo "conf_file_changed" >> "$__messages_out" \ No newline at end of file