diff --git a/tasks/install.yml b/tasks/install.yml index cbd56fe..0bef25f 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -12,7 +12,7 @@ owner: root group: root with_items: - - '{{ nginx__conf_dir }}' + - '{{ nginx__dir_etc }}' - '{{ nginx__confd_dir }}' - '{{ nginx__available_dir }}' - '{{ nginx__enabled_dir }}' @@ -22,7 +22,7 @@ notify: nginx | Restart Nginx copy: src: 'files/nginx.conf' - dest: '{{ nginx__conf_dir }}/nginx.conf' + dest: '{{ nginx__dir_etc }}/nginx.conf' mode: 'u=rw,go=r' owner: root group: root @@ -31,7 +31,7 @@ notify: nginx | Restart Nginx copy: content: "{{ nginx__stream }}\n" - dest: '{{ nginx__conf_dir }}/stream.conf' + dest: '{{ nginx__dir_etc }}/stream.conf' mode: 'u=rw,go=r' owner: root group: root diff --git a/tasks/purge.yml b/tasks/purge.yml index 4fe3814..09696e7 100644 --- a/tasks/purge.yml +++ b/tasks/purge.yml @@ -11,4 +11,4 @@ - name: Delete Nginx configuration file: state: absent - path: '{{ nginx__conf_dir }}' + path: '{{ nginx__dir_etc }}' diff --git a/vars/main.yml b/vars/main.yml index a2d2b23..5a6f88b 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,6 +1,7 @@ --- -nginx__conf_dir: '/etc/nginx' -nginx__confd_dir: '{{ nginx__conf_dir }}/conf.d' -nginx__available_dir: '{{ nginx__conf_dir }}/sites-available' -nginx__enabled_dir: '{{ nginx__conf_dir }}/sites-enabled' -nginx__snippets_dir: '{{ nginx__conf_dir }}/snippets' +nginx__dir_etc: '/etc/nginx' + +nginx__confd_dir: '{{ nginx__dir_etc }}/conf.d' +nginx__available_dir: '{{ nginx__dir_etc }}/sites-available' +nginx__enabled_dir: '{{ nginx__dir_etc }}/sites-enabled' +nginx__snippets_dir: '{{ nginx__dir_etc }}/snippets'