diff options
| -rw-r--r-- | ansible/roles/nginx/tasks/main.yml | 17 | ||||
| -rw-r--r-- | ansible/roles/nginx/templates/nginx-conf.d/charset.conf.j2 | 2 | 
2 files changed, 19 insertions, 0 deletions
diff --git a/ansible/roles/nginx/tasks/main.yml b/ansible/roles/nginx/tasks/main.yml index 37d2793..e6060f1 100644 --- a/ansible/roles/nginx/tasks/main.yml +++ b/ansible/roles/nginx/tasks/main.yml @@ -25,6 +25,23 @@    file:      path: /etc/nginx/sites-enabled/default      state: absent +  tags: +    - role::nginx + +- name: Copy conf.d entries +  template: +    src: "{{ item }}" +    dest: "/etc/nginx/conf.d/{{ item | basename | splitext | first }}" +    mode: "0444" +    owner: root +    group: root +  with_fileglob: "../templates/nginx-conf.d/*" +  loop_control: +    label: "{{ item | basename | splitext | first }}" +  tags: +    - role::nginx +  notify: +    - Reload the nginx service  - name: Copy host-specific configs    copy: diff --git a/ansible/roles/nginx/templates/nginx-conf.d/charset.conf.j2 b/ansible/roles/nginx/templates/nginx-conf.d/charset.conf.j2 new file mode 100644 index 0000000..d0db21e --- /dev/null +++ b/ansible/roles/nginx/templates/nginx-conf.d/charset.conf.j2 @@ -0,0 +1,2 @@ +# {{ ansible_managed }} +charset utf-8;  |