vm-ansible/roles/ansibleuser/tasks/main.yaml
2022-04-16 23:42:52 +02:00

23 lines
418 B
YAML

---
- name: "Add ansible user"
ansible.builtin.user:
name: ansible
comment: Ansible
shell: /bin/bash
- name: "Add ansible user to sudo group"
ansible.builtin.user:
name: ansible
comment: Ansible
groups: sudo
append: yes
- name: Copy authorized_keys
copy:
src: authorized_keys
dest: /home/ansible/.ssh/authorized_keys
mode: 0600
owner: ansible
group: ansible
...