<HTML><BODY>Thanks! <br>I am go to check this :)<br><br><br><br><br><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">
        Четверг, 10 марта 2016, 18:50 +03:00 от "William H. ten Bensel" <WHTENBEN@up.com>:<br>
        <br>
        <div id="">


























<div class="js-helper js-readmsg-msg">
        <style type="text/css"></style>
        <div>
                <base target="_self" href="https://e.mail.ru/">
                
            <div id="style_14576256150000000107_BODY"><font size="2" face="sans-serif">Python would be the best way, but if you
are interested in bash/spacecmd examples.  Just some quick examples.<br><br>for server in `spacecmd -s xxxxxx -u yyyyy -p zzzzzz -q group_listsystems
group`; do<br>        for errata in `spacecmd -s xxxxxx -u
yyyyy -p zzzzzz -q system_listerrata $server |egrep -vi "^security|^-|^bug|^enhancement"
|grep [a-zA-Z0-9] |awk '{print $1}'`; do<br>                spacecmd
-s xxxxxx -u yyyyy -p zzzzzz -q system_applyerrata $server $errata<br>        done<br>done<br><br>To save several spacecmd, %sessions, and schedules on the above, could
also do.<br>        server_errata=`spacecmd -s xxxxxx -u
yyyyy -p zzzzzz -q system_listerrata $server |egrep -vi "^security|^-|^bug|^enhancement"
|grep [a-zA-Z0-9] |awk '{print $1}' |paste -s -d" "`<br>        spacecmd -s xxxxxx -u yyyyy -p zzzzzz
-q system_applyerrata $server $server_errata</font><p><font size="2" face="sans-serif"><br>yum update -y, with error checking and any additional scripting needed.</font></p><p><font size="2" face="sans-serif">        server_list=`spacecmd
-s xxxxxx -u yyyyy -p zzzzzz -q group_listsystems group |paste -s -d"
"`<br>        spacecmd -s xxxxxx -u yyyyy -p zzzzzz
-q -- system_runscript $server_list -u root -g root -t7200 -f  /pathtofile.sh
 (yum with error checking and returns)<br><br></font></p><p><font size="2" face="sans-serif">reboot (if servers are not running osad,
then the -s schedule needs to be > 4 hours then when the reboot command
is sent)<br>        Caution: ensure that virtuals are removed,
that exist on hypers that are going to be rebooted.<br><br>        server_list=`spacecmd -s xxxxxx -u
yyyyy -p zzzzzz -q group_listsystems group |paste -s -d" "`<br>        spacecmd -s xxxxxx -u yyyyy -p zzzzzz
-q -- system_runscript $server_list -u root -g root -t7200 -s YYYYMMDD[HHMM]-f
 /reboot2am.sh <br><br><br>        reboot.sh  ---> </font></p><p><font size="2" face="sans-serif"><br>                #/bin/bash<br>                </font><font size="2" color="#2f2f2f" face="Arial">nohup
shutdown -r HH:MM > /dev/null 2>&1 & <br>                exit
0</font><font size="3"> </font></p><p><font size="2" face="sans-serif">shutdown -c can be ran on the servers
before HH:MM just in case a mistake was made!<br><br><br>- Thanks and good luck<br></font><br><br><br><br><font size="1" color="#5f5f5f" face="sans-serif">From:      
 </font><font size="1" face="sans-serif">Alexander Dacre <<a href="/compose?To=alex.dacre@aridhia.com">alex.dacre@aridhia.com</a>></font><br><font size="1" color="#5f5f5f" face="sans-serif">To:      
 </font><font size="1" face="sans-serif">Евгений <<a href="/compose?To=evgen787@mail.ru">evgen787@mail.ru</a>>,
"spacewalk-list@redhat.com" <<a href="/compose?To=spacewalk%2dlist@redhat.com">spacewalk-list@redhat.com</a>></font><br><font size="1" color="#5f5f5f" face="sans-serif">Date:      
 </font><font size="1" face="sans-serif">03/10/2016 05:01 AM</font><br><font size="1" color="#5f5f5f" face="sans-serif">Subject:    
   </font><font size="1" face="sans-serif">Re: [Spacewalk-list]
Automatic auto updates</font><br><font size="1" color="#5f5f5f" face="sans-serif">Sent by:    
   </font><font size="1" face="sans-serif"><a href="/compose?To=spacewalk%2dlist%2dbounces@redhat.com">spacewalk-list-bounces@redhat.com</a></font><br></p><hr><br><br><br><font size="3">This email originated from outside of the company. Please
use discretion if opening attachments or clicking on links.</font><hr><font size="3"> </font><br><font size="2" color="#004080" face="Calibri">I can’t share the code we’ve
written – company won’t let me – but the applications utilise the XML
RPC API: </font><a href="http://www.spacewalkproject.org/documentation/api/2.4/" target="_self"><font size="2" color="blue" face="Calibri"><u>http://www.spacewalkproject.org/documentation/api/2.4/</u></font></a><font size="2" color="#004080" face="Calibri">.</font><br><font size="2" color="#004080" face="Calibri"> </font><br><font size="2" color="#004080" face="Calibri">A quick pseudocode example
would be to:</font><br><font size="2" color="#004080" face="Calibri"> </font><br><font size="2" color="#004080" face="Calibri">CALL systemgroup.listSystems(“group
name”)</font><br><font size="2" color="#004080" face="Calibri">FOR EACH SYSTEM:</font><br><font size="2" color="#004080" face="Calibri">  CALL system.getUnscheduledErrata</font><br><font size="2" color="#004080" face="Calibri">    FOR EACH ERRATUM:</font><br><font size="2" color="#004080" face="Calibri">      System.scheduleApplyErrata</font><br><font size="2" color="#004080" face="Calibri"> </font><br><font size="2" color="#004080" face="Calibri">Pretty straightforward to
do in Python.</font><br><font size="2" color="#004080" face="Calibri"> </font><br><font size="2" color="#004080" face="Calibri">Thanks, </font><br><font size="2" color="#004080" face="Calibri"> </font><br><font size="2" color="#004080" face="Calibri"> </font><br><font size="2" color="#800000" face="Calibri">Alex Dacre</font><br><font size="2" color="#808080" face="Calibri">Systems Engineer</font><br><font size="2" color="#808080" face="Calibri"><span class="js-phone-number">+44 131 560 1476</span></font><br><font size="2" color="#808080" face="Calibri"><span class="js-phone-number">+44 7713281778</span><br></font><br><font size="2" color="#004080" face="Calibri"> </font><br><font size="2" face="Calibri"><b>From:</b> <a href="/compose?To=spacewalk%2dlist%2dbounces@redhat.com">spacewalk-list-bounces@redhat.com</a>
[</font><a href="//e.mail.ru/compose/?mailto=mailto%3aspacewalk%2dlist%2dbounces@redhat.com" target="_blank"><font size="2" face="Calibri">mailto:spacewalk-list-bounces@redhat.com</font></a><font size="2" face="Calibri">]
<b>On Behalf Of </b>???????<b><br>Sent:</b> 10 March 2016 09:21<b><br>To:</b> <a href="/compose?To=spacewalk%2dlist@redhat.com">spacewalk-list@redhat.com</a><b><br>Subject:</b> Re: [Spacewalk-list] Automatic auto updates</font><br><font size="3" face="Times New Roman"> </font><br><font size="3" face="Times New Roman">Hmm, via spacecmd?<br><br>Can chops and share examples? :)<br>Thanks.<br><br><br>Evgeniy<br></font><br><font size="3" face="Times New Roman">Четверг, 10 марта 2016,
7:48 UTC от Alexander Dacre <</font><a href="//e.mail.ru/compose/?mailto=mailto%3aalex.dacre@aridhia.com" target="_self"><font size="3" color="blue" face="Times New Roman"><u>alex.dacre@aridhia.com</u></font></a><font size="3" face="Times New Roman">>:</font><br><font size="3" face="Times New Roman">Absolutely!<br><br>We do this with the API. I provide a system group to a little bespoke application
which goes off and gets all the member systems. For each system it calls
the getUnschedulerErrata method and then another to schedule them at a
specified time. There is some other stuff it does like customer notifications
etc too.<br><br>The reboot can also be done via the API with a similar method.<br><br>Sent from my iPhone<br><br>> On 10 Mar 2016, at 06:42, Евгений <</font><a href="https://e.mail.ru/compose?To=evgen787@mail.ru" target="_self"><font size="3" color="blue" face="Times New Roman"><u>evgen787@mail.ru</u></font></a><font size="3" face="Times New Roman">>
wrote:<br>> <br>> Hi all,<br>> <br>> Can I do with spacewalk automatic patch management?<br>> <br>> Example:<br>> <br>> GroupA - regular check and install all updates(or errata), reboot
as needed.<br>> All this in maintenance window - 2:3AM<br>> <br>> GroupB - regular check and install all updates(or errata), reboot
as needed.<br>> All this in maintenance window - 4:5AM<br>> <br>> In Windows, all this susses fully doing in wsus+sccm. <br>> <br>> Evgeniy<br>> <br>> _______________________________________________<br>> Spacewalk-list mailing list<br>> </font><a href="https://e.mail.ru/compose?To=Spacewalk%2dlist@redhat.com" target="_self"><font size="3" color="blue" face="Times New Roman"><u>Spacewalk-list@redhat.com</u></font></a><font size="3" face="Times New Roman"><br>> </font><a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank"><font size="3" color="blue" face="Times New Roman"><u>https://www.redhat.com/mailman/listinfo/spacewalk-list</u></font></a><font size="3" face="Times New Roman"><br><br>_______________________________________________<br>Spacewalk-list mailing list</font><font size="3" color="blue" face="Times New Roman"><u><br></u></font><a href="https://e.mail.ru/compose?To=Spacewalk%2dlist@redhat.com" target="_self"><font size="3" color="blue" face="Times New Roman"><u>Spacewalk-list@redhat.com</u></font></a><font size="3" color="blue" face="Times New Roman"><u><br></u></font><a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank"><font size="3" color="blue" face="Times New Roman"><u>https://www.redhat.com/mailman/listinfo/spacewalk-list</u></font></a><br><font size="3" face="Times New Roman"> </font><tt><font size="2">This
email originated from outside of the company.  Please use discretion
if opening attachments or clicking on links.<br><br>_______________________________________________<br>Spacewalk-list mailing list<br><a href="/compose?To=Spacewalk%2dlist@redhat.com">Spacewalk-list@redhat.com</a><br></font></tt><a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank"><tt><font size="2">https://www.redhat.com/mailman/listinfo/spacewalk-list</font></tt></a><br><br>
<br>
<br>
**<br>
<br>
<br>
<br>
This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient.  Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law.  If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.<br>
<br>
**<br>
</div>
            
                
                    <div>_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="/compose?To=Spacewalk%2dlist@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></div>
                
             
        
                <base target="_self" href="https://e.mail.ru/">
        </div>

        
</div>


</div>
</blockquote>
<br></BODY></HTML>