mirror of
https://github.com/wickedyoda/public-setupfiles.git
synced 2026-11-16 13:31:56 -06:00
playbooks
This commit is contained in:
1 parent
69802266ae
commit
ef1efe26b2
36 files changed
+1770
No files matched your search
@@ -0,0 +1,25 @@
|
||||
---
|
||||
- name: Configure syslog forwarding on Flint4 (OpenWrt)
|
||||
hosts: flint4
|
||||
gather_facts: false
|
||||
vars:
|
||||
ansible_python_interpreter: /nonexistent
|
||||
tasks:
|
||||
- name: Configure syslog forwarding in /etc/config/system
|
||||
raw: |
|
||||
# Add remote syslog forwarding to OpenWrt system config
|
||||
uci set system.@system[0].log_ip='100.119.225.53'
|
||||
uci set system.@system[0].log_port='514'
|
||||
uci commit system
|
||||
|
||||
# Also create rsyslog config as backup
|
||||
mkdir -p /etc/rsyslog.d
|
||||
echo '*.* @@100.119.225.53:514' > /etc/rsyslog.d/50-remote.conf
|
||||
|
||||
# Add cron for 15-min refresh
|
||||
mkdir -p /etc/crontabs
|
||||
(crontab -l 2>/dev/null; echo "*/15 * * * * uci commit system 2>/dev/null; /etc/init.d/system reload 2>/dev/null || true") | sort -u | crontab -
|
||||
args:
|
||||
executable: /bin/sh
|
||||
changed_when: true
|
||||
|
||||
Reference in new issue
Block a user