X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=ansible%2Froles%2Fopenwrt-image%2Ftasks%2Fprepare.yml;h=e04998366dfc8cb832f654ab03fa47ae8af4592b;hb=a7b16357c0999e0a863ee80abde6af5f34f3a16d;hp=b697e39e5b74a34ef62fe1a3e92b14ed5a7cc579;hpb=f29883b753432c86653691a4e2131dd963633ae6;p=noc.git diff --git a/ansible/roles/openwrt-image/tasks/prepare.yml b/ansible/roles/openwrt-image/tasks/prepare.yml index b697e39..e049983 100644 --- a/ansible/roles/openwrt-image/tasks/prepare.yml +++ b/ansible/roles/openwrt-image/tasks/prepare.yml @@ -36,6 +36,17 @@ loop_control: label: "{{ item.key }}" +- name: Generate /etc/fstab + mount: + fstab: "{{ openwrt_imgbuilder_files }}/etc/fstab" + state: present + args: + "{{ item }}" + when: openwrt_mounts is defined + with_items: "{{ openwrt_mounts }}" + loop_control: + label: "{{ item.path }}" + - name: Create UCI configuration files template: src: uci.j2 @@ -47,6 +58,21 @@ loop_control: label: "{{ item.key }}" +- name: Create /etc/passwd + template: + src: passwd.j2 + dest: "{{ openwrt_imgbuilder_files }}/etc/passwd" + mode: 0644 + trim_blocks: yes + when: openwrt_users is defined + +- name: Create /etc/group + template: + src: group.j2 + dest: "{{ openwrt_imgbuilder_files }}/etc/group" + mode: 0644 + trim_blocks: yes + when: openwrt_groups is defined or openwrt_users is defined ### TODO: this just hangs? # - unarchive: