<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
  <meta name="Generator" content="Zarafa WebAccess v7.0.1-28479">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>RE: [Spacewalk-list] Configuration Files Deployment + Remote Command on Action Chain</title>
  <style type="text/css">
      body
      {
        font-family: Arial, Verdana, Sans-Serif ! important;
        font-size: 12px;
        padding: 5px 5px 5px 5px;
        margin: 0px;
        border-style: none;
        background-color: #ffffff;
      }

      p, ul, li
      {
        margin-top: 0px;
        margin-bottom: 0px;
      }
  </style>
</head>
<body>
<p>Hi,</p><p> </p><p>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),</p><p> </p><p>Hope this helps.</p><p> </p><p>RIck<br /> </p><blockquote style="padding-left: 5px; margin-left: 5px; border-left: #325fba 2px solid">-----Oorspronkelijk bericht-----<br /><strong>Aan:</strong> spacewalk-list@redhat.com; <br /><strong>Van:</strong> Dewangga Bachrul Alam <dewanggaba@xtremenitro.org><br /><strong>Verzonden:</strong> vr 17-10-2014 17:13<br /><strong>Onderwerp:</strong> 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: waldirio@gmail.com<br />> Skype: waldirio<br />> Site: www.waldirio.com.br<br />> Blog: blog.waldirio.com.br<br />> LinkedIn: http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646<br />> PGP: www.waldirio.com.br/public.html<br />> <br />> On Thu, Oct 16, 2014 at 2:56 AM, Dewangga Bachrul Alam <<br />> dewanggaba@xtremenitro.org> 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: waldirio@gmail.com<br />>>> Skype: waldirio<br />>>> Site: www.waldirio.com.br<br />>>> Blog: blog.waldirio.com.br<br />>>> LinkedIn: http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646<br />>>> PGP: www.waldirio.com.br/public.html<br />>>><br />>>> On Thu, Oct 16, 2014 at 1:18 AM, Waldirio Manhães Pinheiro <<br />>>> waldirio@gmail.com> 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: waldirio@gmail.com<br />>>>> Skype: waldirio<br />>>>> Site: www.waldirio.com.br<br />>>>> Blog: blog.waldirio.com.br<br />>>>> LinkedIn: http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646<br />>>>> PGP: www.waldirio.com.br/public.html<br />>>>><br />>>>> On Thu, Oct 16, 2014 at 12:19 AM, Dewangga Bachrul Alam <<br />>>>> dewanggaba@xtremenitro.org> 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 />>>>>> Spacewalk-list@redhat.com<br />>>>>> https://www.redhat.com/mailman/listinfo/spacewalk-list<br />>>>>><br />>>>><br />>>>><br />>>><br />>>><br />>>><br />>>> _______________________________________________<br />>>> Spacewalk-list mailing list<br />>>> Spacewalk-list@redhat.com<br />>>> https://www.redhat.com/mailman/listinfo/spacewalk-list<br />>>><br />>><br />>> _______________________________________________<br />>> Spacewalk-list mailing list<br />>> Spacewalk-list@redhat.com<br />>> https://www.redhat.com/mailman/listinfo/spacewalk-list<br />>><br />> <br />> <br />> <br />> _______________________________________________<br />> Spacewalk-list mailing list<br />> Spacewalk-list@redhat.com<br />> https://www.redhat.com/mailman/listinfo/spacewalk-list<br />> <br /><br />_______________________________________________<br />Spacewalk-list mailing list<br />Spacewalk-list@redhat.com<br />https://www.redhat.com/mailman/listinfo/spacewalk-list<br /></blockquote>
</body>
</html>