From 033393c10e86b4b160be87a052357360dcf2d552 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 29 Dec 2018 06:03:31 +0100 Subject: [PATCH] ansible: added support for symlinks on openwrt/image role --- ansible/roles/openwrt/image/tasks/prepare.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ansible/roles/openwrt/image/tasks/prepare.yml b/ansible/roles/openwrt/image/tasks/prepare.yml index 3414371..ff6a613 100644 --- a/ansible/roles/openwrt/image/tasks/prepare.yml +++ b/ansible/roles/openwrt/image/tasks/prepare.yml @@ -19,7 +19,19 @@ - "{{ openwrt_mixin | map('dirname') | map('regex_replace', '^', openwrt_imgbuilder_files) | unique | list }}" -- name: Copy mixins in place [1/2] +- name: Copy mixins in place [1/3] + file: + dest: "{{ openwrt_imgbuilder_files }}/{{ item.key }}" + src: "{{ item.value.link }}" + force: yes + follow: no + state: link + with_dict: "{{ openwrt_mixin }}" + when: '"link" in item.value' + loop_control: + label: "{{ item.key }}" + +- name: Copy mixins in place [2/3] copy: src: "{{ item.value.file }}" dest: "{{ openwrt_imgbuilder_files }}/{{ item.key }}" @@ -29,7 +41,7 @@ loop_control: label: "{{ item.key }}" -- name: Copy mixins in place [2/2] +- name: Copy mixins in place [3/3] copy: content: "{{ item.value.content }}" dest: "{{ openwrt_imgbuilder_files }}/{{ item.key }}" -- 1.7.10.4