class puppet_bootstrap { $templates_dir = "$puppet_bootstrap_tmpdir/templates" # puppet-bootstrap script file { "/usr/local/sbin/puppet-bootstrap": owner => "root", group => "root", mode => 0755, ensure => present, content => template("$templates_dir/bin/puppet-bootstrap"), } define puppet_modules($puppet_dir) { # directory to download modules file { "$puppet_dir/modules": ensure => directory, owner => "puppet", group => "puppet", mode => 0755, } # execute the bootstrap script to download puppet modules exec { "/usr/local/sbin/puppet-bootstrap add-submodules $puppet_dir": user => root, require => [ File["/usr/local/sbin/puppet-bootstrap"], File["$puppet_dir/modules"] ], timeout => 600, } } }