How come that module is not executed in Windows?

23 views
Skip to first unread message

Roger Yu

unread,
Nov 20, 2013, 12:01:08 PM11/20/13
to puppet...@googlegroups.com
I have the following in vagrantfile in WIndows system.
  config.vm.provision :puppet do |puppet|
     puppet.manifests_path = "manifests"
     puppet.manifest_file  = "base-hadoop.pp"
     puppet.module_path = "modules"
  end


when i run vagrant provision, i do see manifest and module folders are mounted and ssh into vm, I can find files in the following path

[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0

I do see base-hadoop.pp is executed and things are installed. But init.pp under module folder is not executed

my file structure in windows is

%HOME_PATH%\hadoop\   (under this i have vagrant file)
                                      \manifests  (under this I have base_hadoop.pp)
                                      \modules
                                                   \hadoop
                                                               \manifests  (under this i have a init.pp)
 

any idea?


Thanks
Roger

Eugene Vilensky

unread,
Nov 20, 2013, 12:31:30 PM11/20/13
to puppet...@googlegroups.com
On Wed, Nov 20, 2013 at 11:01 AM, Roger Yu <roge...@gmail.com> wrote:
> when i run vagrant provision, i do see manifest and module folders are
> mounted and ssh into vm, I can find files in the following path
>
> [default] -- /tmp/vagrant-puppet/manifests
> [default] -- /tmp/vagrant-puppet/modules-0
>
> I do see base-hadoop.pp is executed and things are installed. But init.pp
> under module folder is not executed



Does a manifest exist which correctly assigns classes to the machine?
Usually the "puppet.manifest_file" setting is used for this purpose,
such as including other *.pp files which then assign like so:
http://docs.puppetlabs.com/puppet/2.7/reference/lang_node_definitions.html,
is one way to do it.

Roger Yu

unread,
Nov 20, 2013, 7:17:21 PM11/20/13
to puppet...@googlegroups.com, evil...@googlemail.com
Yes, if you look at the directory structure above
I have base-hadoop.pp under manifests folder
and init.pp under modules\hadoop\manifests folder. and init.pp content is listed below

class hadoop {
 $hadoop_home = "/opt/hadoop"

exec { "download_hadoop":
path => $path,
unless => "ls /opt | grep hadoop-1.0.3",
require => Package["openjdk-6-jdk"]
}

exec { "unpack_hadoop" :
  command => "tar -zxf /tmp/hadoop.tar.gz -C /opt",
  path => $path,
  creates => "${hadoop_home}-1.0.3",
  require => Exec["download_hadoop"]
}
}

Eugene Vilensky於 2013年11月20日星期三UTC-8上午9時31分30秒寫道:
Reply all
Reply to author
Forward
0 new messages