2024-04-27 15:18:41 +02:00
|
|
|
---
|
|
|
|
- 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'] }}"
|
2024-05-10 13:32:56 +02:00
|
|
|
mode: '0644'
|
2024-04-27 15:18:41 +02:00
|
|
|
loop: "{{ users }}"
|