summaryrefslogtreecommitdiffstats
path: root/bin/puppet
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-09-23 20:42:08 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-09-23 20:42:08 +0000
commit8211df036e1d2d24e1084616fc3fc4891b06cfdd (patch)
tree597f8b999cf5210a7ceff5ef1e1977f1de08c241 /bin/puppet
parentd20ac8e0b564e5413d571f2059de559e0783b72d (diff)
Many, many changes toward a completely functional system. The only current problems with my home config are that apache's stupid init script does not do status and that packages are not working as non-root users (which makes sense).
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@703 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'bin/puppet')
-rwxr-xr-xbin/puppet23
1 files changed, 18 insertions, 5 deletions
diff --git a/bin/puppet b/bin/puppet
index d3eead009..25807ee1a 100755
--- a/bin/puppet
+++ b/bin/puppet
@@ -18,6 +18,10 @@
#
# = Options
#
+# confdir::
+# The configuration root directory, where +puppetmasterd+ defaults to looking
+# for all of its configuration files. Defaults to +/etc/puppet+.
+#
# debug::
# Enable full debugging.
#
@@ -61,11 +65,13 @@ rescue LoadError
end
result = GetoptLong.new(
+ [ "--confdir", "-c", GetoptLong::REQUIRED_ARGUMENT ],
[ "--debug", "-d", GetoptLong::NO_ARGUMENT ],
[ "--help", "-h", GetoptLong::NO_ARGUMENT ],
[ "--logdest", "-l", GetoptLong::REQUIRED_ARGUMENT ],
[ "--verbose", "-v", GetoptLong::NO_ARGUMENT ],
[ "--noop", "-n", GetoptLong::NO_ARGUMENT ],
+ [ "--use-nodes", GetoptLong::NO_ARGUMENT ],
[ "--parse-only", "-p", GetoptLong::NO_ARGUMENT ],
[ "--version", "-V", GetoptLong::NO_ARGUMENT ]
)
@@ -76,9 +82,15 @@ noop = false
logfile = false
parseonly = false
+master = {
+ :Local => true
+}
+
begin
result.each { |opt,arg|
case opt
+ when "--confdir"
+ Puppet[:puppetconf] = arg
when "--version"
puts "%s" % Puppet.version
exit
@@ -90,7 +102,9 @@ begin
exit
end
when "--noop"
- noop = true
+ Puppet[:noop] = true
+ when "--use-nodes"
+ master[:UseNodes] = true
when "--verbose"
verbose = true
when "--parse-only"
@@ -121,11 +135,10 @@ elsif verbose
Puppet[:loglevel] = :info
end
+master[:File] = ARGV.shift
+
begin
- server = Puppet::Server::Master.new(
- :File => ARGV.shift,
- :Local => true
- )
+ server = Puppet::Server::Master.new(master)
rescue => detail
$stderr.puts detail
exit(1)