From: Christian Pointner Date: Sat, 29 Dec 2018 05:03:31 +0000 (+0100) Subject: ansible: added support for symlinks on openwrt/image role X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=033393c10e86b4b160be87a052357360dcf2d552;p=noc.git ansible: added support for symlinks on openwrt/image role --- 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 }}"