[Spacewalk-list] Configuration Files Deployment + Remote Command on Action Chain

Waldirio Manhães Pinheiro waldirio at gmail.com
Fri Oct 17 17:40:15 UTC 2014


Dewangga

Accept your point of view, although, really do you believe be a "much time
to do that" ?!

IMHO, you can use a script template and change in fact only inside else
clause and there you will put your commands, or accept, SW will not do this
automatically for you.

If you need some help, feel free to tell us.

have a great day!

______________
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 Fri, Oct 17, 2014 at 2:01 PM, Dewangga Bachrul Alam <
dewanggaba at xtremenitro.org> wrote:

> Hi rick,
>
> Yes, it can be easily handled by remote command, but the question is.
> Action chain is only temporary for a scheduled action only. And, action
> chain couldn't be saved with configuration files.
>
> So I must create a new chain, if I want to deploy the selected files.
>
> And yes you're right, it can be done only using remote command and use
> sed, select the correct systems. But, you will need much time to do that.
>
> CMIIW.
>
> On 10/17/2014 10:26 PM, Rick van der Linde wrote:
> > Hi,
> >
> >
> > Probably a good way would be to select a set of systems to manage (those
> you want to correct) and then run a remote command that does what you want
> (sed and a service restart),
> >
> >
> > Hope this helps.
> >
> >
> > RIck
> >
> > -----Oorspronkelijk bericht-----
> > Aan: spacewalk-list at redhat.com;
> > Van: Dewangga Bachrul Alam <dewanggaba at xtremenitro.org>
> > Verzonden: vr 17-10-2014 17:13
> > Onderwerp: Re: [Spacewalk-list] Configuration Files Deployment + Remote
> Command on Action Chain
> > So, what if I want to change the line on /etc/nginx/conf.d/ssl.conf and
> > restart the nginx.
> >
> > Origin:
> > ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
> >
> > Latest:
> > ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
> >
> > And reload the nginx.
> >
> > Should I rebuild the nginx and make the rpm then resubmit it to
> > spacewalk server? Is it worth?
> >
> >
> > On 10/16/2014 06:56 PM, Waldirio Manhães Pinheiro wrote:
> >> Hello, good morning
> >>
> >> About big effort, not so much and this is the cost to execute
> >> automatically. :-), in fact you will create this script when you need
> some
> >> action after deploy, just on this cases.
> >>
> >> About el7, sure will not, you have to change to system control.
> >>
> >> ps.: You can create a single script and inside else you will use "case"
> for
> >> example. Case el6 do ..., case el7 do ...
> >>
> >> B'Regards
> >>
> >> ______________
> >> 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 Thu, Oct 16, 2014 at 2:56 AM, Dewangga Bachrul Alam <
> >> dewanggaba at xtremenitro.org> wrote:
> >>
> >>> Hi Waldirio,
> >>>
> >>> Thanks for your help, but I think it will be make big effort every
> >>> create/changes deployment on each files. Isn't it?
> >>>
> >>> IMHO & CMIIW, your scripts won't work on el7.
> >>>
> >>> On 10/16/2014 11:20 AM, Waldirio Manhães Pinheiro wrote:
> >>>> Dewangga
> >>>>
> >>>> Just to add information, about your question, the command to restart
> >>>> service should be after else
> >>>>
> >>>> ###
> >>>> #!/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
> >>>> ###
> >>>>
> >>>> ______________
> >>>> 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 Thu, Oct 16, 2014 at 1:18 AM, Waldirio Manhães Pinheiro <
> >>>> waldirio at gmail.com> wrote:
> >>>>
> >>>>> Hello Dewangga and list friends, good morning
> >>>>>
> >>>>> By default the Spacewalk don't have this feature, btw you can do
> things
> >>>>> like bellow:
> >>>>>
> >>>>> 1. Create a rpm just to do what you need, so you configure in conf.
> >>>>> channel the package and the command will be executed (I know, I don't
> >>> like
> >>>>> too, but it work).
> >>>>>
> >>>>> 2. Create a script like bellow in /etc/cron.hourly. Sure you will
> >>> change,
> >>>>> remove comments and define to your environment, but this will work
> too.
> >>> The
> >>>>> command will not be execute at the same time of deploy, but on the
> next
> >>> 01
> >>>>> minute of next hour.
> >>>>>
> >>>>> ###
> >>>>> #!/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
> >>>>>   touch /var/log/ref_teste
> >>>>> fi
> >>>>> ###
> >>>>>
> >>>>> I'll prepare a real sample and create a post in my blog. Good
> question!
> >>> ;-)
> >>>>>
> >>>>> Take Care and let me know if work to you.
> >>>>>
> >>>>> ______________
> >>>>> 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 Thu, Oct 16, 2014 at 12:19 AM, Dewangga Bachrul Alam <
> >>>>> dewanggaba at xtremenitro.org> wrote:
> >>>>>
> >>>>>> Hi,
> >>>>>>
> >>>>>> I've try to centralize SSL Configuration Files, (eg.
> >>>>>> /etc/nginx/conf.d/ssl.conf), but, after changes that files, I should
> >>>>>> reload the nginx automatically after deployed the files.
> >>>>>>
> >>>>>> I add action chaining manually to deployment schedule, is it
> possible
> >>> to
> >>>>>> automate them? I mean that remote command `service nginx reload`
> saved
> >>>>>> on configuration files too.
> >>>>>>
> >>>>>> Is it possible?
> >>>>>>
> >>>>>> _______________________________________________
> >>>>>> Spacewalk-list mailing list
> >>>>>> Spacewalk-list at redhat.com
> >>>>>> https://www.redhat.com/mailman/listinfo/spacewalk-list
> >>>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> Spacewalk-list mailing list
> >>>> Spacewalk-list at redhat.com
> >>>> https://www.redhat.com/mailman/listinfo/spacewalk-list
> >>>>
> >>>
> >>> _______________________________________________
> >>> Spacewalk-list mailing list
> >>> Spacewalk-list at redhat.com
> >>> https://www.redhat.com/mailman/listinfo/spacewalk-list
> >>>
> >>
> >>
> >>
> >> _______________________________________________
> >> Spacewalk-list mailing list
> >> Spacewalk-list at redhat.com
> >> https://www.redhat.com/mailman/listinfo/spacewalk-list
> >>
> >
> > _______________________________________________
> > Spacewalk-list mailing list
> > Spacewalk-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/spacewalk-list
> >
> >
> >
> > _______________________________________________
> > Spacewalk-list mailing list
> > Spacewalk-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/spacewalk-list
> >
>
> _______________________________________________
> 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/20141017/e040052b/attachment.htm>


More information about the Spacewalk-list mailing list