[Spacewalk-list] Configuration Channels

Waldirio Manhães Pinheiro waldirio at gmail.com
Mon Mar 23 12:38:41 UTC 2015


Hello Friends,

About the big problem (point 3), follow one way

https://www.redhat.com/archives/spacewalk-list/2014-October/msg00145.html

Part of text here, but is referent to script that you can create in your
conf channel to be deployed in /etc/cron.hourly, so will be executed one
time and after removed automatically.

###
#!/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
fi
###

Let me know if you have any doubt about it.

Take Care

______________
Atenciosamente
Waldirio
msn: waldirio at gmail.com
Skype: waldirio
Site: www.waldirio.com.br
Blog: blog.waldirio.com.br
LinkedIn: http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646
PGP: www.waldirio.com.br/public.html

On Mon, Mar 23, 2015 at 9:24 AM, Jens Neu <jens.neu at biotronik.com> wrote:

> > 1.       Can rules be configured for automatic subscription to
> > configuration channels? E.g. if the server is in subnet X then
> > subscribe to channel Y
>
> You can assign config channels to activation keys; use the desired key for
> subnet X and you're flying.
>
> > 2.       Can configuration files be automatically deployed?
>
> On subscription/registration yes, there's a function doing this. Just make
> sure you enable config file management during deployment/kickstart (touch
>  /etc/sysconfig/rhn/allowed-actions/all)
> Changes can be pushed to the clients via workaround; just deploy a cron
> schedule with "rhncfg-client get" upon registration. Works fine, biggest
> drawback: you can not delete files (ensure => absent does not work)
>
> > 3.       Can arbitrary commands be run when configuration files are
> > deployed?
>
> Hard. You can send scripts to hosts upon actions via GUI. Limitations are
> huge, as variable to host binding is very limited (hiera, smartclass
> parameters, inheritance, etc... there's not enough comparable tools).
>
> I could do this with Puppet via the notify metaparameter,
> > but as a business we are just not ready for Puppet
>
> Know your feels. Migrate to katello/Satellite 6 and sell the move as
> "without alternatives"
>
> -Jens
>
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20150323/6c9eb6b2/attachment.htm>


More information about the Spacewalk-list mailing list