not sure what you want to do

but as is, seems it will only do the test nagios server

On Fri, Nov 23, 2018 at 2:57 PM rhys.james.campbell via Vagrant <
vagrant-up@googlegroups.com> wrote:

> My full Vagrant file is as below. I've since "fixed" this by removing the
> increment and adding auto_correct: true to the port mapping. That works but
> I don;t see what I'm doing wrong the old way. Cheers, Rhys
>
> Vagrant.configure("2") do |config|
>
>
>   nagios_forward_port=8888
>   nrpe_hosts = [ "nrpeyum01",
>                   "nrpepip02",
>                   "nrpescript03",
>                   "nrpeyumpip04",
>                   "nrpeyumscript05",
>                   "nrpepipscript06",
>                   "nrpeall07"
>               ]
>   nagios_hosts = [ "testnagios01",
>                    "testnagios02" ]
>
>
>   all_hosts = nrpe_hosts + nagios_hosts
>
>
>   all_hosts.each do |host|
>       config.vm.define "#{host}" do |nrpe|
>         nrpe.vm.box = "bento/centos-7.5"
>         nrpe.vm.provider :virtualbox do |vb|
>           vb.customize [
>             "modifyvm", :id,
>             "--name", "#{host}",
>             "--memory", "1024"
>           ]
>           vb.cpus = 1
>         end
>         config.vm.hostname = "#{host}"
>         if host.start_with?("testnagios")
>           config.vm.network "forwarded_port", guest: 80, host:
> nagios_forward_port
>           nagios_forward_port += 1
>         end
>         if host == all_hosts[-1]
>           config.vm.provision :ansible do |ansible|
>             ansible.groups = {
>                   "nrpe" => nrpe_hosts,
>                   "nagios" => nagios_hosts,
>                 }
>             ansible.limit = "nrpe"
>             ansible.playbook = "nrpe.yml"
>           end
>           config.vm.provision :ansible do |ansible|
>             ansible.groups = {
>                   "nrpe" => nrpe_hosts,
>                   "nagios" => nagios_hosts,
>                 }
>             ansible.limit = "nagios"
>             ansible.playbook = "nagios.yml"
>           end
>         end
>       end
>   end
> end
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/d8bcdbf5-8f4b-48a3-8f72-75a97ec6140f%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/d8bcdbf5-8f4b-48a3-8f72-75a97ec6140f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Alvaro

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vagrant-up+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0ezm9WFc-rv4jRquaKaEKupcr804W-%3DiSNRAgLGrQkaQ9A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to