nginx_com -> nginx_org
This commit is contained in:
parent
1cc1f240bb
commit
c301a2b1a1
|
@ -2,12 +2,12 @@
|
|||
nginx_enabled: True
|
||||
nginx_use_ppa: False
|
||||
nginx_ppa_repo: ppa:nginx/stable
|
||||
nginx_use_nginx_com_repo: False
|
||||
nginx_com_repo_key: 'https://nginx.org/keys/nginx_signing.key'
|
||||
nginx_com_repo: 'deb http://nginx.org/packages/ubuntu/ bionic nginx'
|
||||
nginx_use_nginx_org_repo: False
|
||||
nginx_org_repo_key: 'https://nginx.org/keys/nginx_signing.key'
|
||||
nginx_org_repo: 'deb http://nginx.org/packages/ubuntu/ bionic nginx'
|
||||
nginx_package_state: present
|
||||
|
||||
nginx_com_modules: []
|
||||
nginx_org_modules: []
|
||||
# - pkg_name: nginx-module-njs
|
||||
# mod_name: ngx_http_js_module.so
|
||||
# enabled: yes
|
||||
|
|
|
@ -34,10 +34,10 @@
|
|||
copy:
|
||||
content: "load_module modules/{{ item.mod_name }};"
|
||||
dest: /etc/nginx/modules-available/{{ item.pkg_name }}.conf
|
||||
loop: '{{ nginx_com_modules }}'
|
||||
loop: '{{ nginx_org_modules }}'
|
||||
when:
|
||||
- item.enabled
|
||||
- nginx_use_nginx_com_repo
|
||||
- nginx_use_nginx_org_repo
|
||||
|
||||
- name: Enable the additional modules
|
||||
file:
|
||||
|
@ -45,20 +45,20 @@
|
|||
dest: /etc/nginx/modules-enabled/{{ item.pkg_name }}.conf
|
||||
state: link
|
||||
when: item.enabled
|
||||
loop: '{{ nginx_com_modules }}'
|
||||
loop: '{{ nginx_org_modules }}'
|
||||
|
||||
- name: Disable the additional modules that we do not want installed
|
||||
file:
|
||||
dest: /etc/nginx/modules-enabled/{{ item.pkg_name }}.conf
|
||||
state: absent
|
||||
when: not item.enabled
|
||||
loop: '{{ nginx_com_modules }}'
|
||||
loop: '{{ nginx_org_modules }}'
|
||||
|
||||
- name: Remove the default configuration when using the nginx.com repository
|
||||
file:
|
||||
dest: /etc/nginx/conf.d/default.conf
|
||||
state: absent
|
||||
when: nginx_use_nginx_com_repo
|
||||
when: nginx_use_nginx_org_repo
|
||||
|
||||
- name: Install the main nginx.conf
|
||||
template: src=nginx.conf.j2 dest=/etc/nginx/nginx.conf mode=444
|
||||
|
|
|
@ -9,22 +9,22 @@
|
|||
|
||||
- name: Install the key of the nginx.com repository
|
||||
apt_key:
|
||||
url: '{{ nginx_com_repo_key }}'
|
||||
url: '{{ nginx_org_repo_key }}'
|
||||
state: present
|
||||
when:
|
||||
- nginx_use_nginx_com_repo
|
||||
- nginx_use_nginx_org_repo
|
||||
- ansible_distribution == 'Ubuntu'
|
||||
tags: [ 'nginx', 'nginx_com_ppa' ]
|
||||
tags: [ 'nginx', 'nginx_org_ppa' ]
|
||||
|
||||
- name: Install the nginx.com repository configuration
|
||||
apt_repository:
|
||||
repo: '{{ nginx_com_repo }}'
|
||||
repo: '{{ nginx_org_repo }}'
|
||||
update_cache: yes
|
||||
filename: nginx_com
|
||||
filename: nginx_org
|
||||
when:
|
||||
- nginx_use_nginx_com_repo
|
||||
- nginx_use_nginx_org_repo
|
||||
- ansible_distribution == 'Ubuntu'
|
||||
tags: [ 'nginx', 'nginx_com_ppa' ]
|
||||
tags: [ 'nginx', 'nginx_org_ppa' ]
|
||||
|
||||
- name: Install the nginx web server
|
||||
apt: pkg=nginx-full state={{ nginx_package_state }} cache_valid_time=1800
|
||||
|
@ -50,9 +50,9 @@
|
|||
pkg: '{{ item.pkg_name }}'
|
||||
state: present
|
||||
cache_valid_time: 1800
|
||||
loop: '{{ nginx_com_modules }}'
|
||||
loop: '{{ nginx_org_modules }}'
|
||||
when:
|
||||
- nginx_use_nginx_com_repo
|
||||
- nginx_use_nginx_org_repo
|
||||
- ansible_distribution_major_version >= '16'
|
||||
|
||||
when: ansible_distribution_file_variety == "Debian"
|
||||
|
|
Loading…
Reference in New Issue