I've applied the diff. The defined users are now being created, but only when their primary group is created first using the groups statement. The users are also correctly added to the specified additionals groups.
I've pasted my userdata below:
#cloud-config
groups: - ansible - sysop
users: - name: sysop gecos: "System Operator" primary-group: sysop groups: "sudo,adm" shell: /bin/bash lock-passwd: false passwd: <redacted> - name: ansible gecos: Ansible primary-group: ansible groups: sudo shell: /bin/bash
I've applied the diff.
The defined users are now being created, but only when their primary group is created first using the groups statement.
The users are also correctly added to the specified additionals groups.
I've pasted my userdata below:
#cloud-config
groups:
- ansible
- sysop
users:
- name: sysop
gecos: "System Operator"
primary-group: sysop
groups: "sudo,adm"
shell: /bin/bash
lock-passwd: false
passwd: <redacted>
- name: ansible
gecos: Ansible
primary-group: ansible
groups: sudo
shell: /bin/bash