{{ name }}:x:{{ opt.id | default(loop.index + 110) }}:
{% endif %}
{% endfor %}
+{% if openwrt_groups is defined %}
{% for name, opt in openwrt_groups.items() %}
{{ name }}:x:{{ opt.id | default(loop.index + 200) }}:
{% endfor %}
+{% endif %}
nogroup:x:65534:
daemon:*:1:1:daemon:/var:/bin/false
ftp:*:55:55:ftp:/home/ftp:/bin/false
network:*:101:101:network:/var:/bin/false
-{% for user in openwrt_users %}
-{{ user.name }}:*:{{ user.id | default(loop.index + 110) }}:{{ user.gid | default(loop.index + 110) }}:{{ user.name }}:{{ user.home | default('/nonexistent') }}:{{ user.shell | default('/bin/false') }}
+{% for name, opt in openwrt_users.items() %}
+{{ name }}:*:{{ opt.id | default(loop.index + 110) }}:{{ opt.gid | default(loop.index + 110) }}:{{ name }}:{{ opt.home | default('/nonexistent') }}:{{ opt.shell | default('/bin/false') }}
{% endfor %}
nobody:*:65534:65534:nobody:/var:/bin/false
dest: "{{ openwrt_imgbuilder_files }}/etc/group"
mode: 0644
trim_blocks: yes
- when: openwrt_groups or openwrt_users is defined
+ when: openwrt_groups is defined or openwrt_users is defined
### TODO: this just hangs?
# - unarchive: