commit 2a83eb9d78ed6240055696ab864129bb88ed3857 parent 3ef54b5c80fb63ff828c2639282f2f75a4a30a53 Author: Dionysis Grigoropoulos <dgrig@erethon.com> Date: Sun, 31 Jan 2021 04:50:51 +0200 ansible: Add mode to all tasks as part of linting Diffstat:
8 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/ansible/roles/element/tasks/main.yml b/ansible/roles/element/tasks/main.yml @@ -33,4 +33,5 @@ template: src: config.json dest: "{{ element__deploy_directory }}/config.json" + mode: 0644 tags: ["riot::configure"] diff --git a/ansible/roles/grafana/tasks/main.yml b/ansible/roles/grafana/tasks/main.yml @@ -7,6 +7,7 @@ section: "{{ item.section }}" option: "{{ item.option }}" value: "{{ item.value }}" + mode: 0640 loop: "{{ grafana__settings }}" - name: Enable and restart Grafana service diff --git a/ansible/roles/haproxy/tasks/main.yml b/ansible/roles/haproxy/tasks/main.yml @@ -4,8 +4,9 @@ template: src: "{{ item.src }}" dest: "{{ item.dest }}" + mode: "{{ item.mode }}" notify: Reload haproxy with_items: - - { src: "haproxy.cfg.j2", dest: "/etc/haproxy/haproxy.cfg" } - - { src: "crt-list.cfg.j2", dest: "/etc/haproxy/crt-list.cfg" } - - { src: "concat_certificates.sh.j2", dest: "/usr/bin/concat_certificates.sh" } + - { src: "haproxy.cfg.j2", dest: "/etc/haproxy/haproxy.cfg", mode: "0644" } + - { src: "crt-list.cfg.j2", dest: "/etc/haproxy/crt-list.cfg", mode: "0644" } + - { src: "concat_certificates.sh.j2", dest: "/usr/bin/concat_certificates.sh", mode: "0755" } diff --git a/ansible/roles/openbsd/tasks/main.yml b/ansible/roles/openbsd/tasks/main.yml @@ -1,10 +1,5 @@ --- -- name: Template installurl - template: - src: installurl - dest: /etc/installurl - - name: Install packages openbsd_pkg: name: "{{ openbsd__packages }}" @@ -40,6 +35,7 @@ state: present line: "permit nopass keepenv setenv { HOME } {{ item.name }} as root" create: yes + mode: 0644 with_items: - "{{ users__accounts }}" when: item.doas diff --git a/ansible/roles/openbsd/templates/installurl b/ansible/roles/openbsd/templates/installurl @@ -1 +0,0 @@ -{{ openbsd__installurl_location | default('https://ftp.fr.openbsd.org/pub/OpenBSD') }} diff --git a/ansible/roles/prometheus/tasks/main.yml b/ansible/roles/prometheus/tasks/main.yml @@ -4,4 +4,5 @@ template: src: prometheus.yml.j2 dest: /etc/prometheus/prometheus.yml + mode: 0644 notify: Restart prometheus diff --git a/ansible/roles/static.erethon.com/tasks/main.yml b/ansible/roles/static.erethon.com/tasks/main.yml @@ -14,9 +14,10 @@ dest: "{{ item.dest }}" owner: root group: wheel + mode: "{{ item.mode }}" with_items: - - { src: "httpd.conf", dest: "/etc/httpd.conf" } - - { src: "httpd/", dest: "/etc/httpd" } + - { src: "httpd.conf", dest: "/etc/httpd.conf", mode: "0644" } + - { src: "httpd/", dest: "/etc/httpd", mode: "0755"} notify: Restart httpd - name: Add individual sites diff --git a/ansible/roles/synapse/tasks/main.yml b/ansible/roles/synapse/tasks/main.yml @@ -4,6 +4,7 @@ template: src: "{{ item.src }}" dest: "{{ item.dest }}" + mode: 0600 with_items: - { src: "homeserver.yaml.j2", dest: "/etc/matrix-synapse/homeserver.yaml" } - { src: "server_name.yaml.j2", dest: "/etc/matrix-synapse/conf.d/server_name.yaml" }