From 7e0c6b1c43715d640e3bce0f1d4bcc9ff6c24803 Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Mon, 27 Jan 2020 15:44:38 -0500 Subject: [PATCH] Private IP variable and rsyslog forwarding --- Vagrantfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 9a3021f..809b55c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,8 +1,10 @@ # vi: set ft=ruby : +PRIVATE_NET_IP = "172.28.128.30" + Vagrant.configure("2") do |config| 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.provider "virtualbox" do |vbox| @@ -32,6 +34,12 @@ Vagrant.configure("2") do |config| systemctl start 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 # Install newest docker-compose