30 lines
605 B
YAML
30 lines
605 B
YAML
# TODO: Make backup user part of AD
|
|
---
|
|
- name: "Add backup user"
|
|
ansible.builtin.user:
|
|
name: backup
|
|
comment: Backup user
|
|
shell: /bin/bash
|
|
|
|
- name: Create .ssh directory of backup user
|
|
ansible.builtin.file:
|
|
path: /home/backup/.ssh
|
|
state: directory
|
|
|
|
- name: Copy authorized_keys
|
|
ansible.builtin.copy:
|
|
src: authorized_keys
|
|
dest: /home/backup/.ssh/authorized_keys
|
|
mode: 0600
|
|
owner: backup
|
|
group: backup
|
|
|
|
- name: Copy ssh config
|
|
ansible.builtin.copy:
|
|
src: ssh_config
|
|
dest: /home/backup/.ssh/config
|
|
mode: 0600
|
|
owner: backup
|
|
group: backup
|
|
...
|