Create dhparams only for gateways or standalone servers

Fix lint warnings
This commit is contained in:
phil 2023-03-19 00:47:20 +01:00
parent 0cdb3c6792
commit 719fc93598
2 changed files with 6 additions and 5 deletions

View file

@ -3,6 +3,7 @@
community.crypto.openssl_dhparam:
path: "{{ dhparam_path }}"
size: "{{ dhparam_size | default(4096) }}"
when: nginx_type == 'gateway' or nginx_type == 'standalone'
- name: "Configuration | Get bad user agents"
ansible.builtin.shell: "curl {{ bad_user_agents_url }}"
@ -12,14 +13,14 @@
ansible.builtin.template:
src: nginx.conf.j2
dest: /etc/nginx/nginx.conf
mode: 0644
mode: "0644"
notify: reload nginx
- name: "Configuration | Copy configuration snippets"
ansible.builtin.copy:
src: "{{ item }}"
dest: "/etc/nginx/snippets/{{ item }}"
mode: 0644
mode: "0644"
loop:
- add_headers.conf
- letsencrypt.conf
@ -29,7 +30,7 @@
ansible.builtin.template:
src: "{{ item }}.j2"
dest: "/etc/nginx/conf.d/{{ item }}"
mode: 0644
mode: "0644"
loop:
- bad_clients.conf
- bad_bots.conf
@ -42,6 +43,6 @@
ansible.builtin.copy:
src: request_limits.conf
dest: /etc/nginx/conf.d/
mode: 0644
mode: "0644"
notify: reload nginx
when: nginx_type == 'gateway' or nginx_type == 'standalone'

View file

@ -3,7 +3,7 @@
ansible.builtin.copy:
src: "fail2ban/{{ item }}"
dest: "/etc/fail2ban/{{ item }}"
mode: 0644
mode: "0644"
notify: reload fail2ban
loop:
- "filter.d/nginx-req-limit.conf"