diff --git a/salt/top.sls b/salt/top.sls index e2d2ef8c5..fbf9e32ef 100644 --- a/salt/top.sls +++ b/salt/top.sls @@ -13,6 +13,7 @@ base: 'os:CentOS': - match: grain + - yum - yum.packages '*': diff --git a/salt/yum/etc/yum.conf.jinja b/salt/yum/etc/yum.conf.jinja new file mode 100644 index 000000000..20ad0ce6f --- /dev/null +++ b/salt/yum/etc/yum.conf.jinja @@ -0,0 +1,16 @@ +[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={{ salt['pillar.get']('yum:config:installonly_limit', 2) }} +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 salt['pillar.get']('static:masterupdate', '0') %} +proxy=http://{{ salt['pillar.get']('yum:config:proxy', salt['config.get']('master')) }}:3142 +{% endif %}%} \ No newline at end of file diff --git a/salt/yum/init.sls b/salt/yum/init.sls new file mode 100644 index 000000000..c91de908e --- /dev/null +++ b/salt/yum/init.sls @@ -0,0 +1,6 @@ +yumconf: + file.managed: + - name: /etc/yum.conf + - source: salt://yum/etc/yum.conf.jinja + - mode: 644 + - template: jinja \ No newline at end of file