• LOGIN
  • No products in the cart.

DevOps on AWS – Vagrant file for Nagios Exercise

Vagrant file for Nagios Exercise:
———————————————-

# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = “2”
ENV[‘VAGRANT_DEFAULT_PROVIDER’] = ‘virtualbox’

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define “nagiosServer” do |nagiosServer|
nagiosServer.vm.hostname = “nagiosServer.rnstech.com”
nagiosServer.vm.box = “bento/centos-7.2”
nagiosServer.vm.box_url = “bento/centos-7.2”

nagiosServer.vm.network “public_network”, bridge: “Broadcom 802.11n Network Adapter”

nagiosServer.vm.network :forwarded_port, guest: 80, host: 80 
 # manual ip
  nagiosServer.vm.provision “shell”,
    run: “always”,
    inline: “ifconfig enp0s8 192.168.1.10 netmask 255.255.255.0 up”

  # manual ipv6
  nagiosServer.vm.provision “shell”,
    run: “always”,
    inline: “ifconfig enp0s8 inet6 add fc00::18/7”
#nagiosServer.vm.provision ‘shell’, path: ‘provision.sh’
end

config.vm.define “nagiosClient” do |nagiosClient|

nagiosClient.vm.hostname = “nagiosClient.rnstech.com”
nagiosClient.vm.box = “bento/centos-7.2”
nagiosClient.vm.box_url = “bento/centos-7.2”

nagiosClient.vm.network “public_network”, bridge: “Broadcom 802.11n Network Adapter”
 # manual ip
  nagiosClient.vm.provision “shell”,
    run: “always”,
    inline: “ifconfig enp0s8 192.168.1.11 netmask 255.255.255.0 up”

  # manual ipv6
  nagiosClient.vm.provision “shell”,
    run: “always”,
    inline: “ifconfig enp0s8 inet6 add fc00::17/7”
end
end
February 22, 2021

0 responses on "DevOps on AWS - Vagrant file for Nagios Exercise"

    All rights reserved.
    error: Alert: Content is protected !!
    X