From: nicoo Date: Sun, 6 May 2018 11:39:03 +0000 (+0200) Subject: roles/openwrt-image: Add support for setting file modes X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=a2ecec5f11993e0f9e291bc5d3e7d50ab59dd400;p=noc.git roles/openwrt-image: Add support for setting file modes --- 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 }}