23 lines
418 B
YAML
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
|
|
...
|