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

30 lines
605 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"
ansible.builtin.user:
name: backup
comment: Backup user
shell: /bin/bash
2022-04-16 21:20:11 +02:00
- name: Create .ssh directory of backup user
2023-03-05 19:00:38 +01:00
ansible.builtin.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-03-05 19:00:38 +01:00
ansible.builtin.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-03-05 19:00:38 +01:00
ansible.builtin.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
...