<div dir="ltr">Hello Friends, good morning<div><br></div><div>Agree with you Jens, independent you can put this script a little bit "smart" to attend your necessity or in fact implement with puppet.</div><div><br></div><div>Different ways to answer the question and we have point's that we are not talking about, for example:</div><div><br></div><div>- Is it possible install puppet in prod environment !?</div><div>- The SW admin knows puppet !?</div><div>- etc</div><div><br></div><div>So, let's moving forward. :)</div><div><br></div><div>Take Care</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div>______________<br>Atenciosamente<br>Waldirio<br>msn: <a href="mailto:waldirio@gmail.com" target="_blank">waldirio@gmail.com</a><br>Skype: waldirio<br>Site: <a href="http://www.waldirio.com.br" target="_blank">www.waldirio.com.br</a><br>Blog: <a href="http://blog.waldirio.com.br" target="_blank">blog.waldirio.com.br</a></div>
<div>LinkedIn: <a href="http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646" target="_blank">http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646</a><br>PGP: <a href="http://www.waldirio.com.br/public.html" target="_blank">www.waldirio.com.br/public.html</a></div></div></div>
<br><div class="gmail_quote">On Mon, Mar 23, 2015 at 10:16 AM, Jens Neu <span dir="ltr"><<a href="mailto:jens.neu@biotronik.com" target="_blank">jens.neu@biotronik.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><tt><font>> #!/bin/bash</font></tt>
<br><tt><font>> if [ -f /var/log/ref_teste ]; then</font></tt>
<br><tt><font>>   echo "Script was defined - $(date)"
          | tee -a /var/log/messages</font></tt>
<br><tt><font>>   echo "Removing $0 from /etc/cron.hourly"
     | tee -a /var/log/messages</font></tt>
<br><tt><font>>   echo "### rm -rf /etc/cron.hourly/$0"
        | tee -a /var/log/messages</font></tt>
<br><tt><font>> else</font></tt>
<br><tt><font>>   echo "TEST ### $(date) ###"
                  | tee -a
/var/log/messages</font></tt>
<br><tt><font>>   </font></tt>
<br><tt><font>>   # Command here !!!!</font></tt>
<br><tt><font>>   service xpto_daemon restart</font></tt>
<br><tt><font>> <br>
>   touch /var/log/ref_teste</font></tt>
<br>
<br></span><tt><font>Thats useful, yes. But I require "arbitrary commands"
to depend on host groups, activations keys, etc. If the command is "service
httpd restart", fine. But if the command requires variables to be
filled in other than these: </font></tt><a href="https://access.redhat.com/documentation/en-US/Red_Hat_Network_Satellite/5.0/html/Reference_Guide/s3-sm-file-macros.html" target="_blank"><tt><font color="blue">https://access.redhat.com/documentation/en-US/Red_Hat_Network_Satellite/5.0/html/Reference_Guide/s3-sm-file-macros.html</font></tt></a>
<br><tt><font>you're in the woods.</font></tt>
<br>
<br><tt><font>Besides, if you combine this workaround with my #2
you possibly have restarting apaches every hour/day when someone forgets
to remove this file from the config channel. All poison to a "human
environment" that can not cope with puppet (right now) for reasons
whatsoever.</font></tt>
<br><span class="HOEnZb"><font color="#888888">
<br><tt><font>-Jens</font></tt><font face="sans-serif"><br>
<br>
</font></font></span><br>_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br></blockquote></div><br></div>