diff -r a2342f26c9de -r b0b56e0f8c7f dev/provisioning/modules/puppi/templates/todo.erb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dev/provisioning/modules/puppi/templates/todo.erb Fri Jan 15 15:35:00 2016 +0100 @@ -0,0 +1,42 @@ +#!/bin/bash +# Script generated by Puppet. It's executed when you run: +# puppi todo <%= @name %> +# +# Sources common header for Puppi scripts +. <%= scope.lookupvar('puppi::params::scriptsdir') %>/header || exit 10 + +echo_title "$HOSTNAME - <%= @name %>" + +<% if @description != "" -%> +cat < +EOF +<% end -%> + +<% if @notes != "" -%> +cat < +EOF +<% end -%> + +<% if @run != "" -%> +<% @array_run.each do |cmd| %>show_command "<%= cmd -%>" +<% end -%> +<% end -%> + +<% if @check_command != "" -%> +<%= @check_command %> +if [ "x$?" = "x0" ] ; then + echo_success + result="OK" +else + echo_failure + result="CRITICAL" + EXITCRIT="1" +fi +<% else -%> +echo_warning +result="WARNING" +EXITWARN="1" +<% end -%> +