diff options
author | drebs <drebs@riseup.net> | 2011-03-12 18:15:40 -0300 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2011-03-12 18:15:40 -0300 |
commit | 740f29de8fa0b432d9468e2bf87b83a3c403f37a (patch) | |
tree | 0576a880e0811a8216b523a13a5a5301b2caad3f | |
parent | 6d0cc2a36b1718a737bc88f08d7101eb101ee00b (diff) | |
download | puppet-bootstrap-740f29de8fa0b432d9468e2bf87b83a3c403f37a.tar.gz puppet-bootstrap-740f29de8fa0b432d9468e2bf87b83a3c403f37a.tar.bz2 |
fixing modules script
-rw-r--r-- | manifests/admin_node.pp | 4 | ||||
-rw-r--r-- | manifests/puppet_bootstrap.pp | 5 | ||||
-rw-r--r-- | manifests/stage1.pp | 4 | ||||
-rw-r--r-- | templates/bin/puppet-bootstrap | 8 |
4 files changed, 10 insertions, 11 deletions
diff --git a/manifests/admin_node.pp b/manifests/admin_node.pp index 364a900..cdea2b9 100644 --- a/manifests/admin_node.pp +++ b/manifests/admin_node.pp @@ -2,8 +2,8 @@ import "nodo" class admin_node { nodo::vserver::instance { "$host-master": - context => '2', - puppetmaster => true, + context => '2', + puppetmaster => true, } host { "puppet": diff --git a/manifests/puppet_bootstrap.pp b/manifests/puppet_bootstrap.pp index f094dd7..61dcbda 100644 --- a/manifests/puppet_bootstrap.pp +++ b/manifests/puppet_bootstrap.pp @@ -1,12 +1,13 @@ 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, - require => Package["puppet"], content => template("$templates_dir/bin/puppet-bootstrap"), } @@ -21,7 +22,7 @@ class puppet_bootstrap { } # execute the bootstrap script to download puppet modules - exec { "/usr/local/sbin/puppet-bootstrap add-submodules": + exec { "/usr/local/sbin/puppet-bootstrap add-submodules $modules_dir": user => root, require => [ File["/usr/local/sbin/puppet-bootstrap"], File["$modules_dir"] ], timeout => 600, diff --git a/manifests/stage1.pp b/manifests/stage1.pp index 6c67ded..1bce6f2 100644 --- a/manifests/stage1.pp +++ b/manifests/stage1.pp @@ -2,4 +2,6 @@ import "config.pp" import "puppet_bootstrap.pp" include puppet_bootstrap -puppet_modules("$puppet_bootstrap_tmpdir/modules") +puppet_bootstrap::puppet_modules{ "modules": + modules_dir => "$puppet_bootstrap_tmpdir/modules", +} diff --git a/templates/bin/puppet-bootstrap b/templates/bin/puppet-bootstrap index 6f93ed4..9c385f3 100644 --- a/templates/bin/puppet-bootstrap +++ b/templates/bin/puppet-bootstrap @@ -1,7 +1,7 @@ #!/bin/sh function usage { - echo "Usage: $1 add-submodules" + echo "Usage: $1 add-submodules <DIR>" exit $2 } @@ -20,11 +20,7 @@ function add_submodules { done } -if [ $# -eq 1 ]; then - puppet_dir=$1 -elif [ $# -lt 1 ]; then - puppet_dir=<%= puppet_dir %> -else +if [ $# -ne 2 ]; then usage $0 1 exit 1 fi |