Commit 81312dac authored by Phillip Smith (fukawi2)'s avatar Phillip Smith (fukawi2)
Browse files

reformat borg-client tasks for readability; add mysql to bbs borg

parent 64c0d8e9
......@@ -7,3 +7,6 @@ zabbix_agent_templates:
- Template App HTTPS Service
- Template App MySQL
- Template App Nginx
mysql_backup_dir: "/root/backup-mysql"
mysql_backup_defaults: "/root/.backup-my.cnf"
......@@ -4,13 +4,25 @@
pacman: name=borg state=present
- name: create borg user
user: home="{{ backup_dir }}" name=borg
user:
name: borg
home: "{{ backup_dir }}"
- name: create borg user home
file: path="{{ backup_dir }}" state=directory owner=borg group=borg mode=0700
file:
path: "{{ backup_dir }}"
state: directory
owner: borg
group: borg
mode: 0700
- name: create the root backup directory at {{ backup_dir }}
file: path="{{ backup_dir }}/{{ item }}" state=directory owner=borg group=borg mode=0700
file:
path: "{{ backup_dir }}/{{ item }}"
state: directory
owner: borg
group: borg
mode: 0700
with_items: "{{ backup_clients }}"
- name: fetch ssh keys
......@@ -21,8 +33,8 @@
- name: allow certain clients to connect
authorized_key:
user=borg
key="{{ item.stdout }}"
manage_dir=yes
key_options="command=\"/usr/bin/borg serve --restrict-to-path {{ backup_dir }}/{{ item['item'] }}\",no-pty,no-agent-forwarding,no-port-forwarding,no-X11-forwarding,no-user-rc"
user: borg
key: "{{ item.stdout }}"
manage_dir: yes
key_options: "command=\"/usr/bin/borg serve --restrict-to-path {{ backup_dir }}/{{ item['item'] }}\",no-pty,no-agent-forwarding,no-port-forwarding,no-X11-forwarding,no-user-rc"
with_items: "{{ ssh_keys.results }}"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment