[Spacewalk-list] Configuration Channels

Jens Neu jens.neu at biotronik.com
Mon Mar 23 13:16:18 UTC 2015


> #!/bin/bash
> if [ -f /var/log/ref_teste ]; then
>   echo "Script was defined - $(date)"           | tee -a 
/var/log/messages
>   echo "Removing $0 from /etc/cron.hourly"      | tee -a 
/var/log/messages
>   echo "### rm -rf /etc/cron.hourly/$0"         | tee -a 
/var/log/messages
> else
>   echo "TEST ### $(date) ###"                   | tee -a 
/var/log/messages
>   
>   # Command here !!!!
>   service xpto_daemon restart
> 
>   touch /var/log/ref_teste

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: 
https://access.redhat.com/documentation/en-US/Red_Hat_Network_Satellite/5.0/html/Reference_Guide/s3-sm-file-macros.html
you're in the woods.

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.

-Jens

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20150323/41d537c9/attachment.htm>


More information about the Spacewalk-list mailing list