diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2019-03-04 01:59:43 -0500 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2019-03-04 01:59:43 -0500 |
| commit | 8747b45c5fcafa191db55d23988041f5ddc696d9 (patch) | |
| tree | 42ead7b50b3156e27aa8afc3b69a96bd7df3f4c5 /tasks/main.yml | |
| parent | c06f286b6d7a6c1b63cbcd7289a0343564939ebe (diff) | |
| download | nginx-8747b45c5fcafa191db55d23988041f5ddc696d9.tar.gz nginx-8747b45c5fcafa191db55d23988041f5ddc696d9.tar.xz | |
Add support for alternate configuration directories, Ubuntu, FreeBSD, etc.
Diffstat (limited to 'tasks/main.yml')
| -rw-r--r-- | tasks/main.yml | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/tasks/main.yml b/tasks/main.yml index 23a424b..ab06c87 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,15 +1,8 @@ --- -- name: Install Nginx - xbps: - name: nginx - state: present -- name: Enable Nginx - file: - src: /etc/sv/nginx - dest: /var/service/nginx - owner: root - group: root - state: link +- name: Include install tasks + include_tasks: install.yml +- name: Include enable tasks + include_tasks: enable.yml - name: Lock down and setup configuration directories file: path: '{{item}}' @@ -18,8 +11,8 @@ group: "{{nginx_conf_group}}" mode: "{{nginx_conf_dir_mode}}" loop: - - /etc/nginx - - /etc/nginx/conf.d + - "{{nginx_conf_dir}}" + - "{{nginx_conf_dir}}/conf.d" - name: Create Acme Challenge directory file: path: /var/lib/acme-challenge @@ -30,7 +23,7 @@ - name: Install Main 'nginx.conf' template: src: nginx/nginx.conf - dest: /etc/nginx/nginx.conf + dest: "{{nginx_conf_dir}}/nginx.conf" owner: "{{nginx_conf_owner}}" group: "{{nginx_conf_group}}" mode: "{{nginx_conf_file_mode}}" @@ -39,7 +32,7 @@ - name: Install Other Nginx templates template: src: "nginx/{{item}}" - dest: "/etc/nginx/{{item}}" + dest: "{{nginx_conf_dir}}/{{item}}" owner: "{{nginx_conf_owner}}" group: "{{nginx_conf_group}}" mode: "{{nginx_conf_file_mode}}" |
