remove old backup system
This commit is contained in:
parent
d49257dabd
commit
c63c206b75
5 changed files with 0 additions and 68 deletions
|
@ -43,5 +43,4 @@
|
|||
- {role: postgresql, tags: postgresql}
|
||||
- {role: githubixx.ansible_role_wireguard, tags: wireguard}
|
||||
- {role: ssh_ca, tags: ssh_ca}
|
||||
# - {role: backup, tags: backup}
|
||||
- {role: backupng, tags: backupng}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
VIRSH="virsh --connect qemu:///system"
|
||||
read -p "" option
|
||||
case "$option" in
|
||||
up)
|
||||
for i in $($VIRSH list --all --name --autostart); do $VIRSH start "$i"; done
|
||||
;;
|
||||
down)
|
||||
for i in $($VIRSH list --state-running --name --autostart); do
|
||||
$VIRSH shutdown "$i"
|
||||
until $VIRSH domstate "$i" | grep shut; do
|
||||
sleep 0.5
|
||||
done
|
||||
done
|
||||
;;
|
||||
esac
|
|
@ -1,4 +0,0 @@
|
|||
- name: restart sshd
|
||||
systemd:
|
||||
name: sshd
|
||||
state: restarted
|
|
@ -1,14 +0,0 @@
|
|||
TrustedUserCAKeys /etc/ssh/user_ca_key.pub
|
||||
|
||||
Match User {{ backup_share_user }}
|
||||
AuthorizedPrincipalsFile /etc/ssh/backup_principals
|
||||
ChrootDirectory /kvm/data
|
||||
ForceCommand internal-sftp
|
||||
AllowTcpForwarding no
|
||||
X11Forwarding no
|
||||
|
||||
Match User {{ backup_control_user }}
|
||||
AuthorizedPrincipalsFile /etc/ssh/backup_principals
|
||||
ForceCommand /home/{{ backup_control_user }}/control.sh
|
||||
AllowTcpForwarding no
|
||||
X11Forwarding no
|
|
@ -1,34 +0,0 @@
|
|||
- name: Add backup share user
|
||||
user:
|
||||
name: "{{ backup_share_user }}"
|
||||
create_home: false
|
||||
password: '!'
|
||||
shell: /sbin/nologin
|
||||
system: true
|
||||
- name: Add backup control user
|
||||
user:
|
||||
name: "{{ backup_control_user }}"
|
||||
password: '!'
|
||||
shell: /usr/bin/sh
|
||||
system: true
|
||||
groups: "libvirt"
|
||||
- name: Copy control script
|
||||
copy:
|
||||
src: "backup_control.sh"
|
||||
dest: "/home/{{ backup_control_user }}/control.sh"
|
||||
owner: "{{ backup_control_user }}"
|
||||
group: "{{ backup_control_user }}"
|
||||
mode: u=rx,g=rx,o=rx
|
||||
- name: Add backup user principals file
|
||||
copy:
|
||||
dest: "/etc/ssh/backup_principals"
|
||||
content: "backup"
|
||||
- name: Install user CA
|
||||
copy:
|
||||
dest: "/etc/ssh/user_ca_key.pub"
|
||||
content: "{{ user_ca }}"
|
||||
- name: Copy ssh config for backup user
|
||||
template:
|
||||
src: "sshd.conf.j2"
|
||||
dest: "/etc/ssh/sshd_config.d/custom.conf"
|
||||
notify: restart sshd
|
Reference in a new issue