parent
b1ca10dbba
commit
2d1b95e0dc
8 changed files with 62 additions and 2 deletions
@ -0,0 +1,12 @@ |
||||
--- |
||||
|
||||
- name: Remove unused and tmp files |
||||
file: path={{ synapse_root_dir }}/{{ item }} state=absent |
||||
loop: |
||||
- lib |
||||
- lib64 |
||||
- include |
||||
- bin |
||||
- db_dumps |
||||
tags: matrix |
||||
|
@ -0,0 +1,7 @@ |
||||
#!/bin/bash -e |
||||
|
||||
# Delete database dumps |
||||
rm -f {{ seafile_root_dir }}/backup/* |
||||
|
||||
# Umount fuse FS |
||||
{{ seafile_root_dir }}/seafile-server/seaf-fuse.sh stop |
@ -0,0 +1,16 @@ |
||||
#!/bin/bash -e |
||||
|
||||
# Dump Databases |
||||
for DB in {{ seafile_db_ccnet }} {{ seafile_db_seafile }} {{ seafile_db_seahub }}; do |
||||
/usr/bin/mysqldump \ |
||||
--quick --single-transaction \ |
||||
{% if seafile_db_server not in ['127.0.0.1', 'localhost'] %} |
||||
--user='{{ seafile_db_user }}' \ |
||||
--password='{{ seafile_db_pass }}' \ |
||||
--host={{ seafile_db_server }} \ |
||||
{% endif %} |
||||
--add-drop-table $DB | zstd -T0 -c > {{ seafile_root_dir }}/backup/$DB.sql.zst |
||||
done |
||||
|
||||
# Mount fuse FS |
||||
{{ seafile_root_dir }}/seafile-server/seaf-fuse.sh start {{ seafile_root_dir }}/fuse/ |
@ -0,0 +1,8 @@ |
||||
--- |
||||
- name: Handle Zabbix Agent port |
||||
iptables_raw: |
||||
name: zabbix_agent_port |
||||
state: "{{ (zabbix_agent_src_ip | length > 0) | ternary('present', 'absent') }}" |
||||
rules: "-A INPUT -m state --state NEW -p tcp --dport {{ zabbix_agent_port }} -s {{ zabbix_agent_src_ip | join(',') }} -j ACCEPT" |
||||
when: iptables_manage | default(True) |
||||
tags: zabbix |
@ -0,0 +1,4 @@ |
||||
--- |
||||
- name: Start Zabbix Agent |
||||
service: name=zabbix-agent state=started enabled=True |
||||
tags: zabbix |
Loading…
Reference in new issue