From a2ecec5f11993e0f9e291bc5d3e7d50ab59dd400 Mon Sep 17 00:00:00 2001 From: nicoo Date: Sun, 6 May 2018 13:39:03 +0200 Subject: [PATCH] roles/openwrt-image: Add support for setting file modes --- ansible/roles/openwrt-image/tasks/prepare.yml | 2 ++ ansible/tuer.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/roles/openwrt-image/tasks/prepare.yml b/ansible/roles/openwrt-image/tasks/prepare.yml index 056daf3..29e24cd 100644 --- a/ansible/roles/openwrt-image/tasks/prepare.yml +++ b/ansible/roles/openwrt-image/tasks/prepare.yml @@ -19,6 +19,7 @@ copy: src: "{{ item.file }}" dest: "{{ openwrt_imgbuilder_files }}/{{ item.key }}" + mode: "{{ item.mode | default(0644) }}" with_dict: "{{ openwrt_mixin }}" when: '"file" in item' loop_control: @@ -28,6 +29,7 @@ copy: content: "{{ item.value }}" dest: "{{ openwrt_imgbuilder_files }}/{{ item.key }}" + mode: "{{ item.mode | default(0644) }}" with_dict: "{{ openwrt_mixin }}" when: '"content" in item' loop_control: diff --git a/ansible/tuer.yml b/ansible/tuer.yml index 9989e0d..9d4ceec 100644 --- a/ansible/tuer.yml +++ b/ansible/tuer.yml @@ -101,8 +101,8 @@ option RootPasswordAuth 'off' option Port '22000' - # TODO: mode needs to be 0600 /etc/dropbear/authorized_keys: + mode: 0600 content: |- {% for key in noc_ssh_keys %} {{ key }} -- 1.7.10.4