s.path is giving an error when I run vagrant reload or up

34 views
Skip to first unread message

Antonio Moreno Borras

unread,
Oct 2, 2018, 2:54:30 PM10/2/18
to Vagrant
Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"

  config.vm.define "sl1" do |sl1|

     sl1.vm.network "private_network", ip: "192.168.100.2", auto_config: true

     sl1.vm.provider "virtualbox" do |v| #ahora creo la virtualbox para el server
        v.name = "ipa-sl1"
        v.memory= 1024
        v.cpus = 2
     end

     sl1.vm.provision "network-config", type: "shell" do |s|
        s.path="scripts/network-confing.sh"
        
        s.args = "'ipa-sl1' '192.168.100.2'"
     end

     sl1.vm.provision "ipa-server-install", type: "shell" do |s|
       
    s.path = "scripts/ipa-server-install.sh"
    s.args = 'ipa-sl1'
     end
end

when I run vagrant up or reload I get:

shell provisioner:
* `path` for shell provisioner does not exist on the host system: /home/Vagrant/ipa-incompleto-centos7/network-confing.sh

And of course that the network-config.sh exists in that path.

May anyone help me out a little please?

Best regards,
Antonio.

Alvaro Miranda Aguilera

unread,
Oct 2, 2018, 3:02:21 PM10/2/18
to vagra...@googlegroups.com
Hello

This works for me.


cat hello.sh 

#!/usr/bin/env bash


echo $@


cat Vagrantfile 

Vagrant.configure("2") do |config|

  config.vm.box = "hashicorp/precise64"



  config.vm.provision "shell" do |s|

    s.path = "hello.sh"

    s.args   = "'hello, world!'"

  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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/1e20543a-cbbd-4ee2-be7a-16ddd223bd6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Reply all
Reply to author
Forward
0 new messages