<div dir="ltr">Dewangga<div><br></div><div>Accept your point of view, although, really do you believe be a "much time to do that" ?!</div><div><br></div><div>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.</div><div><br></div><div>If you need some help, feel free to tell us.</div><div><br></div><div>have a great day!</div></div><div class="gmail_extra"><br clear="all"><div><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>
<br><div class="gmail_quote">On Fri, Oct 17, 2014 at 2:01 PM, Dewangga Bachrul Alam <span dir="ltr"><<a href="mailto:dewanggaba@xtremenitro.org" target="_blank">dewanggaba@xtremenitro.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi rick,<br>
<br>
Yes, it can be easily handled by remote command, but the question is.<br>
Action chain is only temporary for a scheduled action only. And, action<br>
chain couldn't be saved with configuration files.<br>
<br>
So I must create a new chain, if I want to deploy the selected files.<br>
<br>
And yes you're right, it can be done only using remote command and use<br>
sed, select the correct systems. But, you will need much time to do that.<br>
<br>
CMIIW.<br>
<div class="HOEnZb"><div class="h5"><br>
On 10/17/2014 10:26 PM, Rick van der Linde wrote:<br>
> Hi,<br>
><br>
><br>
> 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),<br>
><br>
><br>
> Hope this helps.<br>
><br>
><br>
> RIck<br>
><br>
> -----Oorspronkelijk bericht-----<br>
> Aan: <a href="mailto:spacewalk-list@redhat.com">spacewalk-list@redhat.com</a>;<br>
> Van: Dewangga Bachrul Alam <<a href="mailto:dewanggaba@xtremenitro.org">dewanggaba@xtremenitro.org</a>><br>
> Verzonden: vr 17-10-2014 17:13<br>
> Onderwerp: Re: [Spacewalk-list] Configuration Files Deployment + Remote Command on Action Chain<br>
> So, what if I want to change the line on /etc/nginx/conf.d/ssl.conf and<br>
> restart the nginx.<br>
><br>
> Origin:<br>
> ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;<br>
><br>
> Latest:<br>
> ssl_protocols TLSv1 TLSv1.1 TLSv1.2;<br>
><br>
> And reload the nginx.<br>
><br>
> Should I rebuild the nginx and make the rpm then resubmit it to<br>
> spacewalk server? Is it worth?<br>
><br>
><br>
> On 10/16/2014 06:56 PM, Waldirio Manhães Pinheiro wrote:<br>
>> Hello, good morning<br>
>><br>
>> About big effort, not so much and this is the cost to execute<br>
>> automatically. :-), in fact you will create this script when you need some<br>
>> action after deploy, just on this cases.<br>
>><br>
>> About el7, sure will not, you have to change to system control.<br>
>><br>
>> ps.: You can create a single script and inside else you will use "case" for<br>
>> example. Case el6 do ..., case el7 do ...<br>
>><br>
>> B'Regards<br>
>><br>
>> ______________<br>
>> Atenciosamente<br>
>> Waldirio<br>
>> msn: <a href="mailto:waldirio@gmail.com">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><br>
>> 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><br>
>><br>
>> On Thu, Oct 16, 2014 at 2:56 AM, Dewangga Bachrul Alam <<br>
>> <a href="mailto:dewanggaba@xtremenitro.org">dewanggaba@xtremenitro.org</a>> wrote:<br>
>><br>
>>> Hi Waldirio,<br>
>>><br>
>>> Thanks for your help, but I think it will be make big effort every<br>
>>> create/changes deployment on each files. Isn't it?<br>
>>><br>
>>> IMHO & CMIIW, your scripts won't work on el7.<br>
>>><br>
>>> On 10/16/2014 11:20 AM, Waldirio Manhães Pinheiro wrote:<br>
>>>> Dewangga<br>
>>>><br>
>>>> Just to add information, about your question, the command to restart<br>
>>>> service should be after else<br>
>>>><br>
>>>> ###<br>
>>>> #!/bin/bash<br>
>>>> if [ -f /var/log/ref_teste ]; then<br>
>>>>   echo "Script was defined - $(date)"           | tee -a<br>
>>> /var/log/messages<br>
>>>>   echo "Removing $0 from /etc/cron.hourly"      | tee -a<br>
>>> /var/log/messages<br>
>>>>   echo "### rm -rf /etc/cron.hourly/$0"         | tee -a<br>
>>> /var/log/messages<br>
>>>> else<br>
>>>>   echo "TEST ### $(date) ###"                   | tee -a<br>
>>> /var/log/messages<br>
>>>><br>
>>>>   # Command here !!!!<br>
>>>>   service xpto_daemon restart<br>
>>>><br>
>>>>   touch /var/log/ref_teste<br>
>>>> fi<br>
>>>> ###<br>
>>>><br>
>>>> ______________<br>
>>>> Atenciosamente<br>
>>>> Waldirio<br>
>>>> msn: <a href="mailto:waldirio@gmail.com">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><br>
>>>> 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><br>
>>>><br>
>>>> On Thu, Oct 16, 2014 at 1:18 AM, Waldirio Manhães Pinheiro <<br>
>>>> <a href="mailto:waldirio@gmail.com">waldirio@gmail.com</a>> wrote:<br>
>>>><br>
>>>>> Hello Dewangga and list friends, good morning<br>
>>>>><br>
>>>>> By default the Spacewalk don't have this feature, btw you can do things<br>
>>>>> like bellow:<br>
>>>>><br>
>>>>> 1. Create a rpm just to do what you need, so you configure in conf.<br>
>>>>> channel the package and the command will be executed (I know, I don't<br>
>>> like<br>
>>>>> too, but it work).<br>
>>>>><br>
>>>>> 2. Create a script like bellow in /etc/cron.hourly. Sure you will<br>
>>> change,<br>
>>>>> remove comments and define to your environment, but this will work too.<br>
>>> The<br>
>>>>> command will not be execute at the same time of deploy, but on the next<br>
>>> 01<br>
>>>>> minute of next hour.<br>
>>>>><br>
>>>>> ###<br>
>>>>> #!/bin/bash<br>
>>>>> if [ -f /var/log/ref_teste ]; then<br>
>>>>>   echo "Script was defined - $(date)"           | tee -a<br>
>>> /var/log/messages<br>
>>>>>   echo "Removing $0 from /etc/cron.hourly"      | tee -a<br>
>>> /var/log/messages<br>
>>>>>   echo "### rm -rf /etc/cron.hourly/$0"         | tee -a<br>
>>> /var/log/messages<br>
>>>>> else<br>
>>>>>   echo "TEST ### $(date) ###"                   | tee -a<br>
>>> /var/log/messages<br>
>>>>>   touch /var/log/ref_teste<br>
>>>>> fi<br>
>>>>> ###<br>
>>>>><br>
>>>>> I'll prepare a real sample and create a post in my blog. Good question!<br>
>>> ;-)<br>
>>>>><br>
>>>>> Take Care and let me know if work to you.<br>
>>>>><br>
>>>>> ______________<br>
>>>>> Atenciosamente<br>
>>>>> Waldirio<br>
>>>>> msn: <a href="mailto:waldirio@gmail.com">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><br>
>>>>> 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><br>
>>>>><br>
>>>>> On Thu, Oct 16, 2014 at 12:19 AM, Dewangga Bachrul Alam <<br>
>>>>> <a href="mailto:dewanggaba@xtremenitro.org">dewanggaba@xtremenitro.org</a>> wrote:<br>
>>>>><br>
>>>>>> Hi,<br>
>>>>>><br>
>>>>>> I've try to centralize SSL Configuration Files, (eg.<br>
>>>>>> /etc/nginx/conf.d/ssl.conf), but, after changes that files, I should<br>
>>>>>> reload the nginx automatically after deployed the files.<br>
>>>>>><br>
>>>>>> I add action chaining manually to deployment schedule, is it possible<br>
>>> to<br>
>>>>>> automate them? I mean that remote command `service nginx reload` saved<br>
>>>>>> on configuration files too.<br>
>>>>>><br>
>>>>>> Is it possible?<br>
>>>>>><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>
>>>>>><br>
>>>>><br>
>>>>><br>
>>>><br>
>>>><br>
>>>><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>
>>>><br>
>>><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>
>>><br>
>><br>
>><br>
>><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>
>><br>
><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>
><br>
><br>
><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>
><br>
<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>
</div></div></blockquote></div><br></div>