* added pillar variable to specify os release version for nginx package repo base url for RedHat family os hosts

This commit is contained in:
Roshan Bangera 2015-05-13 19:00:12 -05:00
parent 8db7bf7b4d
commit 997ef47905
3 changed files with 4 additions and 2 deletions

View File

@ -55,9 +55,9 @@ nginx_yum_repo:
- name: nginx - name: nginx
- humanname: nginx repo - humanname: nginx repo
{%- if salt['grains.get']('os') == 'CentOS' %} {%- if salt['grains.get']('os') == 'CentOS' %}
- baseurl: 'http://nginx.org/packages/centos/$releasever/$basearch/' - baseurl: 'http://nginx.org/packages/centos/{{ nginx.lookup.rh_os_releasever }}/$basearch/'
{%- else %} {%- else %}
- baseurl: 'http://nginx.org/packages/rhel/$releasever/$basearch/' - baseurl: 'http://nginx.org/packages/rhel/{{ nginx.lookup.rh_os_releasever }}/$basearch/'
{%- endif %} {%- endif %}
- gpgcheck: False - gpgcheck: False
- enabled: True - enabled: True

View File

@ -25,6 +25,7 @@
'vhost_enabled': '/etc/nginx/conf.d', 'vhost_enabled': '/etc/nginx/conf.d',
'vhost_use_symlink': False, 'vhost_use_symlink': False,
'pid_file': '/var/run/nginx.pid', 'pid_file': '/var/run/nginx.pid',
'rh_os_releasever': '$releasever',
}, },
'Suse': { 'Suse': {
'package': 'nginx', 'package': 'nginx',

View File

@ -35,6 +35,7 @@ nginx:
vhost_available: /etc/nginx/sites-available vhost_available: /etc/nginx/sites-available
vhost_enabled: /etc/nginx/sites-enabled vhost_enabled: /etc/nginx/sites-enabled
vhost_use_symlink: True vhost_use_symlink: True
rh_os_releasever: '6'
# Source compilation is not currently a part of nginx.ng # Source compilation is not currently a part of nginx.ng
from_source: False from_source: False