ansible-pilote/tasks/users.yml

15 lines
404 B
YAML
Raw Normal View History

---
- 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 }}"