diff --git a/defaults/main.yml b/defaults/main.yml index b38caf8..c6daff2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -28,6 +28,15 @@ yum_repositories: [] # enabled: True # @end +# @var yum_deltarpm_value:description: > +# Configure deltarmp. To get it working you have to install `deltarpm` package first! +# Value set to `0` means disabled. A positive value defines the number +# of reconstruction made in parallel. A negative value asks yum to figure out how many cores +# are available and to multiply them by the given value to get the number of +# reconstruction to make in parallel. +yum_deltarpm_value: 0 +yum_deltarpm_percentage: 75 + yum_upgrade_enabled: False yum_packages_install: [] yum_packages_uninstall: [] diff --git a/templates/etc/yum.conf.j2 b/templates/etc/yum.conf.j2 new file mode 100644 index 0000000..e07639a --- /dev/null +++ b/templates/etc/yum.conf.j2 @@ -0,0 +1,32 @@ +#jinja2: lstrip_blocks: True +{{ ansible_managed | comment }} +[main] +cachedir=/var/cache/yum/$basearch/$releasever +keepcache=0 +debuglevel=2 +logfile=/var/log/yum.log +exactarch=1 +obsoletes=1 +gpgcheck=1 +plugins=1 +installonly_limit=5 +bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum +distroverpkg=centos-release +{% if yum_deltarpm_value != 0 %} +deltarpm={{ yum_deltarpm_value }} +deltarpm_percentage={{ yum_deltarpm_percentage }} +{% endif %} + + +# This is the default, if you make this bigger yum won't see if the metadata +# is newer on the remote and so you'll "gain" the bandwidth of not having to +# download the new metadata and "pay" for it by yum not having correct +# information. +# It is esp. important, to have correct metadata, for distributions like +# Fedora which don't keep old packages around. If you don't like this checking +# interupting your command line usage, it's much better to have something +# manually check the metadata once an hour (yum-updatesd will do this). +# metadata_expire=90m + +# PUT YOUR REPOS HERE OR IN separate files named file.repo +# in /etc/yum.repos.d