Created
May 24, 2016 07:39
-
-
Save icot/4db17a23441550346ce5424d4f1ae52b to your computer and use it in GitHub Desktop.
distro_sync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script executed by the cronjob responsible for synchronize system | |
# packages with the ones reflected in the repository | |
# This file is generated by puppet don't touch it. | |
# It is possible to add -x <packageA> -x <packageB> to this file using the | |
# hiera variable, e.g | |
# osrepos_sync_exclude_packages: | |
# - openssh | |
# - cvmfs | |
# - kernel-* | |
# | |
# It is is also possible to exclude a whole yum repositories from distro_sync using | |
# | |
# osrepos_sync_exclude_repos: | |
# - lemon%{operatingsystemmajrelease}-testing | |
# - xrootd-devel | |
# - slc-* | |
# | |
# again, globbing should work. | |
# Notice how above uses a fact dynamically to cope if it's SL5 or SL6. | |
yum --skip-broken --disablerepo 'epel*' --disablerepo 'rhel*' --disablerepo 'slc*' -x 'oracle-rdbms*' -x 'oracle-racrdbms*' -x 'oracle-crs*' distro-sync -y 2>&1 | awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; }' >> /var/log/distro_sync.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment