From: nicoo Date: Sun, 20 May 2018 21:36:14 +0000 (+0200) Subject: fixup! roles/openwrt-image: Add support for setting file modes X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=63f0a1a580f9011f377c4564527dbf0978eb7b90;p=noc.git fixup! 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 e049983..bf09f31 100644 --- a/ansible/roles/openwrt-image/tasks/prepare.yml +++ b/ansible/roles/openwrt-image/tasks/prepare.yml @@ -18,21 +18,21 @@ - name: Copy mixins in place [1/2] copy: - src: "{{ item.file }}" + src: "{{ item.value.file }}" dest: "{{ openwrt_imgbuilder_files }}/{{ item.key }}" - mode: "{{ item.mode | default(0644) }}" + mode: "{{ item.value.mode | default('0644') }}" with_dict: "{{ openwrt_mixin }}" - when: '"file" in item' + when: '"file" in item.value' loop_control: label: "{{ item.key }}" - name: Copy mixins in place [2/2] copy: - content: "{{ item.value }}" + content: "{{ item.value.content }}" dest: "{{ openwrt_imgbuilder_files }}/{{ item.key }}" - mode: "{{ item.mode | default(0644) }}" + mode: "{{ item.value.mode | default('0644') }}" with_dict: "{{ openwrt_mixin }}" - when: '"content" in item' + when: '"content" in item.value' loop_control: label: "{{ item.key }}" diff --git a/ansible/tuer.yml b/ansible/tuer.yml index 0d90890..4b3bd7a 100644 --- a/ansible/tuer.yml +++ b/ansible/tuer.yml @@ -69,17 +69,17 @@ openwrt_mixin: # Go binaries /usr/local/bin/door_client: - mode: 0755 + mode: '0755' file: "{{ playbook_dir }}/.cache/openwrt/tuer/door_and_sensors/door_client/door_client" /usr/local/bin/door_daemon: - mode: 0755 + mode: '0755' file: "{{ playbook_dir }}/.cache/openwrt/tuer/door_and_sensors/door_daemon/door_daemon" /usr/local/bin/update-keys: - mode: 0755 + mode: '0755' file: "{{ playbook_dir }}/.cache/openwrt/tuer/door_and_sensors/update-keys/update-keys" /usr/local/bin/authorized_keys.sh: - mode: 0755 + mode: '0755' file: "{{ playbook_dir }}/files/tuer/authorized_keys.sh" /etc/ssh/sshd_config: