aboutsummaryrefslogtreecommitdiff
path: root/manifests/puppet_bootstrap.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/puppet_bootstrap.pp')
-rw-r--r--manifests/puppet_bootstrap.pp32
1 files changed, 32 insertions, 0 deletions
diff --git a/manifests/puppet_bootstrap.pp b/manifests/puppet_bootstrap.pp
new file mode 100644
index 0000000..f094dd7
--- /dev/null
+++ b/manifests/puppet_bootstrap.pp
@@ -0,0 +1,32 @@
+class puppet_bootstrap {
+
+ # puppet-bootstrap script
+ file { "/usr/local/sbin/puppet-bootstrap":
+ owner => "root",
+ group => "root",
+ mode => 0755,
+ ensure => present,
+ require => Package["puppet"],
+ content => template("$templates_dir/bin/puppet-bootstrap"),
+ }
+
+ define puppet_modules($modules_dir) {
+
+ # directory to download modules
+ file { "$modules_dir":
+ ensure => directory,
+ owner => "puppet",
+ group => "puppet",
+ mode => 0755,
+ }
+
+ # execute the bootstrap script to download puppet modules
+ exec { "/usr/local/sbin/puppet-bootstrap add-submodules":
+ user => root,
+ require => [ File["/usr/local/sbin/puppet-bootstrap"], File["$modules_dir"] ],
+ timeout => 600,
+ }
+
+ }
+
+}