Skip to content

Ansible code bot recommendations #872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions defaults/main/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Requires access to either the NGINX stub_status or the NGINX Plus REST API.
nginx_agent_enable: false


########################################################################################################################
# The following parameters let you configure the static configuration file of NGINX Agent. #
# By default, the config produced is as close a match to the default config provided by NGINX Agent upon installation. #
Expand Down Expand Up @@ -86,7 +85,6 @@ nginx_agent_metrics:
# report_interval: 15s
# precompiled_publication: true


#############################################################################################
# The following parameters let you configure the dynamic configuration file of NGINX Agent. #
# By default, nothing is configured. #
Expand Down
2 changes: 1 addition & 1 deletion defaults/main/amplify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Use your NGINX Amplify API key.
# Default is null.
nginx_amplify_enable: false
nginx_amplify_api_key: null
nginx_amplify_api_key:
2 changes: 1 addition & 1 deletion defaults/main/logrotate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
nginx_logrotate_conf_enable: false
nginx_logrotate_conf:
paths: /var/log/nginx/*.log # String or list of strings
# - /var/log/nginx/*.log
# - /var/log/nginx/*.log
options: # daily # String or a list of strings
- daily
- missingok
Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ galaxy_info:

license: Apache License, Version 2.0

min_ansible_version: '2.16'
min_ansible_version: "2.16"

galaxy_tags:
- nginx
Expand Down
3 changes: 2 additions & 1 deletion molecule/agent/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

- name: Get list of NGINX One dangling instance IDs
ansible.builtin.uri:
url: https://{{ lookup('env', 'ONE_TENANT') }}.console.ves.volterra.io/api/nginx/one/namespaces/default/instances?paginated=false&filter_fields=hostname&filter_ops=IN&filter_values=almalinux-8|almalinux-9|alpine-3.17|alpine-3.18|alpine-3.19|alpine-3.20|amazonlinux-2|amazonlinux-2023|debian-bullseye|debian-bookworm|oraclelinux-8|oraclelinux-9|rhel-8|rhel-9|rockylinux-8|rockylinux-9|sles-15|ubuntu-focal|ubuntu-jammy|ubuntu-noble
url: https://{{ lookup('env', 'ONE_TENANT')
}}.console.ves.volterra.io/api/nginx/one/namespaces/default/instances?paginated=false&filter_fields=hostname&filter_ops=IN&filter_values=almalinux-8|almalinux-9|alpine-3.17|alpine-3.18|alpine-3.19|alpine-3.20|amazonlinux-2|amazonlinux-2023|debian-bullseye|debian-bookworm|oraclelinux-8|oraclelinux-9|rhel-8|rhel-9|rockylinux-8|rockylinux-9|sles-15|ubuntu-focal|ubuntu-jammy|ubuntu-noble
method: GET
headers:
Authorization: APIToken {{ lookup('env', 'ONE_API_TOKEN') }}
Expand Down
4 changes: 2 additions & 2 deletions molecule/agent/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
treat_warnings_as_errors: false
nginx_agent_config_dirs: '"/etc/nginx:/usr/local/etc/nginx:/usr/share/nginx/modules"'
nginx_agent_queue_size: 100
nginx_agent_extensions: ['metrics']
nginx_agent_extensions: [metrics]
nginx_agent_api:
host: 127.0.0.1
port: 8081
nginx_agent_configure_dynamic: true
nginx_agent_instance_group: ansible_instance_group
nginx_agent_tags: ['ansible', 'dev']
nginx_agent_tags: [ansible, dev]
3 changes: 2 additions & 1 deletion molecule/agent/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,5 @@ provisioner:
converge: converge.yml
verify: verify.yml
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3 changes: 2 additions & 1 deletion molecule/amplify/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ provisioner:
converge: converge.yml
verify: verify.yml
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3 changes: 2 additions & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,5 @@ provisioner:
converge: converge.yml
verify: verify.yml
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3 changes: 2 additions & 1 deletion molecule/distribution/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,5 @@ provisioner:
converge: converge.yml
verify: verify.yml
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3 changes: 2 additions & 1 deletion molecule/downgrade-plus/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
ansible.builtin.set_fact:
version: -32-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
version: -32-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version']
| string)) }}.ngx
cacheable: true
when: ansible_facts['os_family'] == "RedHat"
- name: Set repo if SLES
Expand Down
3 changes: 2 additions & 1 deletion molecule/downgrade-plus/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,5 @@ provisioner:
fact_caching_connection: /tmp/facts_cache
fact_caching_timeout: 7200
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3 changes: 2 additions & 1 deletion molecule/downgrade/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
ansible.builtin.set_fact:
version: -1.27.2-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
version: -1.27.2-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version']
| string)) }}.ngx
cacheable: true
when: ansible_facts['os_family'] == "RedHat"
- name: Set repo if SLES
Expand Down
3 changes: 2 additions & 1 deletion molecule/downgrade/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,5 @@ provisioner:
fact_caching_connection: /tmp/facts_cache
fact_caching_timeout: 7200
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3 changes: 2 additions & 1 deletion molecule/plus/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,5 @@ provisioner:
converge: converge.yml
verify: verify.yml
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3 changes: 2 additions & 1 deletion molecule/source-version/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,5 @@ provisioner:
fact_caching_connection: /tmp/facts_cache
fact_caching_timeout: 7200
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3 changes: 2 additions & 1 deletion molecule/source/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,5 @@ provisioner:
converge: converge.yml
verify: verify.yml
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3 changes: 2 additions & 1 deletion molecule/stable/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,5 @@ provisioner:
converge: converge.yml
verify: verify.yml
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3 changes: 2 additions & 1 deletion molecule/uninstall-plus/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,5 @@ provisioner:
converge: converge.yml
verify: verify.yml
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3 changes: 2 additions & 1 deletion molecule/uninstall/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,5 @@ provisioner:
converge: converge.yml
verify: verify.yml
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3 changes: 2 additions & 1 deletion molecule/upgrade-plus/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,5 @@ provisioner:
converge: converge.yml
verify: verify.yml
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3 changes: 2 additions & 1 deletion molecule/upgrade-plus/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
ansible.builtin.set_fact:
version: -32-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
version: -32-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version']
| string)) }}.ngx
when: ansible_facts['os_family'] == "RedHat"
- name: Set repo if SLES
ansible.builtin.set_fact:
Expand Down
3 changes: 2 additions & 1 deletion molecule/upgrade/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,5 @@ provisioner:
converge: converge.yml
verify: verify.yml
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3 changes: 2 additions & 1 deletion molecule/upgrade/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
ansible.builtin.set_fact:
version: -1.27.2-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
version: -1.27.2-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version']
| string)) }}.ngx
when: ansible_facts['os_family'] == "RedHat"
- name: Set repo if SLES
ansible.builtin.set_fact:
Expand Down
6 changes: 4 additions & 2 deletions molecule/version/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
ansible.builtin.set_fact:
ngx_version: -1.27.2-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
njs_version: -1.27.2+0.8.6-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
ngx_version: -1.27.2-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version']
| string)) }}.ngx
njs_version: -1.27.2+0.8.6-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el'
+ ansible_facts['distribution_major_version'] | string)) }}.ngx
cacheable: true
when: ansible_facts['os_family'] == "RedHat"
- name: Set repo if SLES
Expand Down
3 changes: 2 additions & 1 deletion molecule/version/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,5 @@ provisioner:
fact_caching_connection: /tmp/facts_cache
fact_caching_timeout: 7200
env:
ANSIBLE_ROLES_PATH: ~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
ANSIBLE_ROLES_PATH:
~/.cache/molecule/ansible-role-nginx/${MOLECULE_SCENARIO_NAME}/roles:${MOLECULE_PROJECT_DIRECTORY}/..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
5 changes: 3 additions & 2 deletions tasks/agent/install-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
- name: Check if the NGINX Agent dynamic configuration file has been modified
ansible.builtin.lineinfile:
path: /var/lib/nginx-agent/agent-dynamic.conf
line: '# agent-dynamic.conf'
line: "# agent-dynamic.conf"
state: present
check_mode: true
changed_when: false
Expand All @@ -49,7 +49,8 @@
- name: Dynamically generate NGINX Agent dynamic configuration file if it has not been externally modified
ansible.builtin.template:
src: nginx-agent/agent-dynamic.conf.j2
dest: "{{ (ansible_facts['system'] | lower is not search('bsd')) | ternary('/var/lib/nginx-agent/agent-dynamic.conf', '/var/db/nginx-agent/agent-dynamic.conf') }}"
dest: "{{ (ansible_facts['system'] | lower is not search('bsd')) | ternary('/var/lib/nginx-agent/agent-dynamic.conf', '/var/db/nginx-agent/agent-dynamic.conf')
}}"
mode: "0644"
backup: true
when:
Expand Down
3 changes: 2 additions & 1 deletion tasks/agent/setup-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- name: (Debian/Ubuntu) Configure NGINX Agent repository
ansible.builtin.apt_repository:
filename: nginx-agent
repo: deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://packages.nginx.org/nginx-agent/{{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_release'] | lower }} agent
repo: deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://packages.nginx.org/nginx-agent/{{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_release']
| lower }} agent
update_cache: true
mode: "0644"
3 changes: 2 additions & 1 deletion tasks/agent/setup-redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
ansible.builtin.yum_repository:
name: nginx-agent
file: nginx-agent
baseurl: https://packages.nginx.org/nginx-agent/{{ (ansible_facts['distribution'] == 'Amazon') | ternary((ansible_facts['distribution_major_version'] is version('2', '==')) | ternary('amzn2', 'amzn'), 'centos') }}/{{ ansible_facts['distribution_major_version'] }}/$basearch
baseurl: https://packages.nginx.org/nginx-agent/{{ (ansible_facts['distribution'] == 'Amazon') | ternary((ansible_facts['distribution_major_version'] is version('2',
'==')) | ternary('amzn2', 'amzn'), 'centos') }}/{{ ansible_facts['distribution_major_version'] }}/$basearch
description: NGINX Agent
enabled: true
gpgcheck: true
Expand Down
3 changes: 2 additions & 1 deletion tasks/amplify/setup-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- name: (Debian/Ubuntu) Add NGINX Amplify agent repository
ansible.builtin.apt_repository:
filename: nginx-amplify
repo: deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://packages.amplify.nginx.com/py3/{{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_release'] | lower }} amplify-agent
repo: deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://packages.amplify.nginx.com/py3/{{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_release']
| lower }} amplify-agent
update_cache: true
mode: "0644"
3 changes: 1 addition & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

- name: Set up signing keys
ansible.builtin.include_tasks: "{{ role_path }}/tasks/keys/setup-keys.yml"
when: (nginx_enable | bool and nginx_install_from == 'nginx_repository')
or nginx_amplify_enable | bool
when: (nginx_enable | bool and nginx_install_from == 'nginx_repository') or nginx_amplify_enable | bool
tags: nginx_key

- name: "{{ nginx_setup | capitalize }} NGINX"
Expand Down
Loading
Loading