ansible-pilote/tasks/users.yml
Julien Riou 38fef42aa6
style: Add ansible-lint
Signed-off-by: Julien Riou <julien@riou.xyz>
2024-05-10 13:32:56 +02:00

15 lines
421 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'] }}"
mode: '0644'
loop: "{{ users }}"