parent
279527d27a
commit
f1444d088c
9 changed files with 68 additions and 7 deletions
@ -1,3 +1,3 @@ |
||||
url: {{ crowdsec_lapi_url }} |
||||
url: {{ crowdsec_lapi_enabled | ternary('http://127.0.0.1:' ~ crowdsec_lapi_port,crowdsec_lapi_url) }} |
||||
login: {{ crowdsec_lapi_user }} |
||||
password: {{ crowdsec_lapi_pass }} |
||||
|
@ -0,0 +1,3 @@ |
||||
#!/bin/bash -e |
||||
|
||||
rm -f /home/lbkp/crowdsec/* |
@ -0,0 +1,18 @@ |
||||
#!/bin/bash -e |
||||
|
||||
mkdir -p /home/lbkp/crowdsec/ |
||||
{% if crowdsec_lapi_enabled %} |
||||
{% if crowdsec_db_engine == 'mysql' %} |
||||
/usr/bin/mysqldump \ |
||||
{% if crowdsec_db_server not in ['localhost','127.0.0.1'] %} |
||||
--user={{ crowdsec_db_user | quote }} \ |
||||
--password={{ crowdsec_db_pass | quote }} \ |
||||
--host={{ crowdsec_db_server | quote }} \ |
||||
--port={{ crowdsec_db_port | quote }} \ |
||||
{% endif %} |
||||
--quick --single-transaction \ |
||||
--add-drop-table {{ crowdsec_db_name | quote }} | zstd -c > /home/lbkp/crowdsec/{{ crowdsec_db_name }}.sql.zst |
||||
{% else %} |
||||
sqlite3 /var/lib/crowdsec/data/crowdsec.db .dump | zstd -c > /home/lbkp/crowdsec/crowdsec.sql.zst |
||||
{% endif %} |
||||
{% endif %} |
@ -1,7 +1,7 @@ |
||||
--- |
||||
|
||||
- name: restart ntpd |
||||
service: name={{ ntp_service }} state=restarted |
||||
service: name={{ ntp_ntpd_service }} state=restarted |
||||
|
||||
- name: restart chrony |
||||
service: name={{ chrony_service }} state=restarted |
||||
service: name={{ ntp_chrony_service }} state=restarted |
||||
|
Loading…
Reference in new issue