vm-ansible/roles/backuphost/tasks/main.yaml

30 lines
541 B
YAML
Raw Normal View History

2023-07-25 16:58:19 +02:00
# TODO: Make backup user part of AD
2022-04-16 20:55:19 +02:00
---
- name: "Add backup user"
2023-08-30 23:13:59 +02:00
user:
2022-04-16 20:55:19 +02:00
name: backup
comment: Backup user
shell: /bin/bash
2022-04-16 21:20:11 +02:00
- name: Create .ssh directory of backup user
2023-08-30 23:13:59 +02:00
file:
2022-04-16 21:20:11 +02:00
path: /home/backup/.ssh
state: directory
2022-04-16 21:17:11 +02:00
- name: Copy authorized_keys
2023-08-30 23:13:59 +02:00
copy:
2022-04-16 21:17:11 +02:00
src: authorized_keys
dest: /home/backup/.ssh/authorized_keys
mode: 0600
owner: backup
group: backup
- name: Copy ssh config
2023-08-30 23:13:59 +02:00
copy:
2022-04-16 21:17:11 +02:00
src: ssh_config
dest: /home/backup/.ssh/config
mode: 0600
owner: backup
group: backup
2022-04-16 20:55:19 +02:00
...