From c0bd7476c082f732ec5447f4218fe5bca23c316d Mon Sep 17 00:00:00 2001 From: L3D Date: Thu, 4 Feb 2021 18:27:54 +0100 Subject: [PATCH] improve linting --- defaults/main.yml | 4 ++-- handlers/main.yml | 10 ++++++---- tasks/single_site.yml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 1e8adbc..a8f11c0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,7 +4,7 @@ submodules_versioncheck: false nginx_sites: {} -#nginx_sites: +# nginx_sites: # - name: 'example.org' # altnames: # - 'www.example.org' @@ -23,7 +23,7 @@ nginx__snippet_files: - 'tls_parameters.snippet.conf' -#default_robots_file: 'robots_disallow_all.txt' +# default_robots_file: 'robots_disallow_all.txt' nginx__dhparam_size: 4096 diff --git a/handlers/main.yml b/handlers/main.yml index 56dcac6..d17292e 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,14 +1,16 @@ --- - name: Restart nginx - systemd: + become: true + ansible.builtin.systemd: name: 'nginx.service' - daemon_reload: yes + daemon_reload: true state: restarted - name: systemctl reload nginx - systemd: + become: true + ansible.builtin.systemd: name: 'nginx.service' - daemon_reload: yes + daemon_reload: true state: reloaded diff --git a/tasks/single_site.yml b/tasks/single_site.yml index 9cb08a4..db5da26 100644 --- a/tasks/single_site.yml +++ b/tasks/single_site.yml @@ -2,7 +2,7 @@ - name: Create '{{ site.name }}' site plain http configuration become: true template: - src: 'templates/nginx/sites-available/http_plain_redirect.conf.j2' + src: 'templates/nginx/sites-available/http_plain_redirect.conf.j2' dest: '/etc/nginx/sites-available/{{ site.name }}_http' owner: root group: root