Well its monday so semi auto magic roll of patches on CentOS via yum-cron on Debian broken for some dumb and strong firewall rules but applied via unattended updates now done through a ssh tunnel using tsocks, been thinking on create a permanent tunnel or one based on apt.conf and push keys to our external machine, laziness has won and it’s not implemented… but.
Our mini script, for every directory get git code
#!/bin/bash for i in $( ls ); do echo item: $i cd $i
sudo -u apachegit pull cd /var/www/html done
For 20 instances took 88 secs yay! ;)
real 1m28.599s user 0m11.510s sys 0m5.070s
Now tell Moodle about the changes and run whatever is pending
#!/bin/bash for i in $( ls ); do echo item: $i sudo -u apache php $i/admin/cli/upgrade.php --non-interactive done
Nice it took almost four minutes to execute…
real 4m31.226s user 2m36.918s sys 0m28.886s
Half of work done… time for a coffee, need to make this via ansible… still get no time to implement test |staging | production from staging to production rollback if breaks.
As pointed by Gunnar in the comments the moodle source not really needs to have apache permissions opposed to moodledata where it need to write and create files.