ansible-pilote/tasks/users.yml
Julien Riou 096a3e0540
Initial commit
Signed-off-by: Julien Riou <julien@riou.xyz>
2024-04-27 15:21:55 +02:00

14 lines
404 B
YAML

---
- name: Create users
ansible.builtin.user:
name: "{{ item['name'] }}"
password: "{{ item['password'] }}"
loop: "{{ users }}"
- name: Define bashrc
ansible.builtin.copy:
dest: "{% if item['name'] == 'root' %}/root{% else %}/home/{{ item['name'] }}{% endif %}/.bashrc"
src: files/users/bashrc
owner: "{{ item['name'] }}"
group: "{{ item['name'] }}"
loop: "{{ users }}"