parent
a08f8cda11
commit
95e49ce2ee
@ -1,11 +1,21 @@ |
||||
--- |
||||
- name: Enable nginx repo. |
||||
- name: (RedHat) Enable nginx repo. |
||||
template: |
||||
src: nginx.repo.j2 |
||||
src: nginx.rhel.repo.j2 |
||||
dest: /etc/yum.repos.d/nginx.repo |
||||
owner: root |
||||
group: root |
||||
mode: 0644 |
||||
when: ansible_distribution == 'RedHat' |
||||
|
||||
- name: (Centos) Enable nginx repo. |
||||
template: |
||||
src: nginx.centos.repo.j2 |
||||
dest: /etc/yum.repos.d/nginx.repo |
||||
owner: root |
||||
group: root |
||||
mode: 0644 |
||||
when: ansible_distribution == 'CentOS' |
||||
|
||||
- name: Ensure nginx is installed. |
||||
yum: pkg=nginx state=installed enablerepo=nginx |
||||
|
@ -0,0 +1,13 @@ |
||||
{% if nginx_el_install_mainline %} |
||||
[nginx] |
||||
name=nginx repo mainline |
||||
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/ |
||||
gpgcheck=0 |
||||
enabled=1 |
||||
{% else %} |
||||
[nginx] |
||||
name=nginx repo stable |
||||
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ |
||||
gpgcheck=0 |
||||
enabled=1 |
||||
{% endif %} |
@ -1,5 +0,0 @@ |
||||
[nginx] |
||||
name=nginx repo |
||||
baseurl=http://nginx.org/packages/centos/{{ ansible_distribution_major_version }}/$basearch/ |
||||
gpgcheck=0 |
||||
enabled=1 |
@ -0,0 +1,13 @@ |
||||
{% if nginx_el_install_mainline %} |
||||
[nginx] |
||||
name=nginx repo mainline |
||||
baseurl=http://nginx.org/packages/mainline/rhel/$releasever/$basearch/ |
||||
gpgcheck=0 |
||||
enabled=1 |
||||
{% else %} |
||||
[nginx] |
||||
name=nginx repo stable |
||||
baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/ |
||||
gpgcheck=0 |
||||
enabled=1 |
||||
{% endif %} |
Reference in new issue