From c301a2b1a1ac3561f870a2d3ba33ce1edafc1bd8 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Sat, 29 May 2021 12:01:21 +0200 Subject: [PATCH] nginx_com -> nginx_org --- defaults/main.yml | 8 ++++---- tasks/nginx-config.yml | 10 +++++----- tasks/nginx-deb.yml | 18 +++++++++--------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 0d2b15a..6fd7821 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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 diff --git a/tasks/nginx-config.yml b/tasks/nginx-config.yml index ba0a9de..1bc96aa 100644 --- a/tasks/nginx-config.yml +++ b/tasks/nginx-config.yml @@ -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 diff --git a/tasks/nginx-deb.yml b/tasks/nginx-deb.yml index bf05a2b..ed45fec 100644 --- a/tasks/nginx-deb.yml +++ b/tasks/nginx-deb.yml @@ -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"