From 297dc1f66970aa5713745173ae480a23ce4e4802 Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Fri, 3 Sep 2021 12:19:32 +0200 Subject: [PATCH] Fix ansible lint --- .ansible-lint | 2 ++ tasks/site.yml | 5 ++++- tests/test.yml | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index f99f65f..a648d99 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,2 +1,4 @@ +--- + enable_list: - fqcn-builtins diff --git a/tasks/site.yml b/tasks/site.yml index 643c958..02937e3 100644 --- a/tasks/site.yml +++ b/tasks/site.yml @@ -56,9 +56,12 @@ label: "{{ item | nginx_site_name }}" - name: TEMPLATE | Create sites with preconfigured template - template: + ansible.builtin.template: src: "{{ item.custom_template }}" dest: "{{ nginx_etc_dir }}/sites-available/{{ item | nginx_site_filename }}" + mode: 0644 + owner: root + group: root notify: ['reload nginx', 'restart nginx freebsd'] when: (item.state is not defined or item.state != 'absent') and item.custom_template is defined loop: "{{ nginx_sites }}" diff --git a/tests/test.yml b/tests/test.yml index a48ccca..2f3c027 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -320,9 +320,10 @@ - 'test-php-index2.local' - name: -- Add Directories -- - file: + ansible.builtin.file: path: "{{ item }}" state: directory + mode: 0755 loop: - "{{ nginx_root }}/test-htpasswd.local/public/hello" - "/tmp/custom-template"