mirror of
https://github.com/krislamo/graylog_demo
synced 2024-12-16 06:50:35 +00:00
Private IP variable and rsyslog forwarding
This commit is contained in:
parent
ea1931ca0a
commit
7e0c6b1c43
10
Vagrantfile
vendored
10
Vagrantfile
vendored
@ -1,8 +1,10 @@
|
|||||||
# vi: set ft=ruby :
|
# vi: set ft=ruby :
|
||||||
|
|
||||||
|
PRIVATE_NET_IP = "172.28.128.30"
|
||||||
|
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.box = "centos/7"
|
config.vm.box = "centos/7"
|
||||||
config.vm.network "private_network", ip: "172.28.128.30"
|
config.vm.network "private_network", ip: PRIVATE_NET_IP
|
||||||
config.vm.synced_folder ".", "/vagrant", type: "nfs"
|
config.vm.synced_folder ".", "/vagrant", type: "nfs"
|
||||||
|
|
||||||
config.vm.provider "virtualbox" do |vbox|
|
config.vm.provider "virtualbox" do |vbox|
|
||||||
@ -32,6 +34,12 @@ Vagrant.configure("2") do |config|
|
|||||||
systemctl start rsyslog
|
systemctl start rsyslog
|
||||||
systemctl -q enable rsyslog
|
systemctl -q enable rsyslog
|
||||||
|
|
||||||
|
# Add rsyslog forwarding option if it does not exist
|
||||||
|
if ! grep -q "#{PRIVATE_NET_IP}:1514" /etc/rsyslog.conf; then
|
||||||
|
echo "*.* @@#{PRIVATE_NET_IP}:1514;RSYSLOG_SyslogProtocol23Format" >> /etc/rsyslog.conf
|
||||||
|
systemctl restart rsyslog
|
||||||
|
fi
|
||||||
|
|
||||||
SHELL
|
SHELL
|
||||||
|
|
||||||
# Install newest docker-compose
|
# Install newest docker-compose
|
||||||
|
Loading…
Reference in New Issue
Block a user