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