vm-ansible/roles/backuphost/tasks/main.yaml
Kristóf Torma 8887c47c2c
Some checks failed
continuous-integration/drone/push Build is failing
update everything to be ad compatible
2023-07-25 16:58:19 +02:00

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
...