Please review pull request #137: (maint) Set some sane cmd line defaults opened by (djm68)

Description:

Watching some devs run the harness was a little painful: too
many args being passed to stop running step that are geared
to provisoning CI VMs. Setting this opts to not run unless
specified.

  • Opened: Thu Feb 09 01:14:52 UTC 2012
  • Based on: puppetlabs:pe2.0.x (621aec31d35ebb0a5c203897f230bfbd3ee12ac5)
  • Requested merge: djm68:sane_cmd_line_defaults_happier_devs (6627412b402a1f724f8baa532238331e24db4f65)

Diff follows:

diff --git a/lib/options_parsing.rb b/lib/options_parsing.rb
index 2d6d30a..2e76b7c 100644
--- a/lib/options_parsing.rb
+++ b/lib/options_parsing.rb
@@ -126,14 +126,14 @@ def self.parse_args
         @options[:ntpserver] = server
       end
 
-      @options[:notimesync] = FALSE
-      opts.on( '--no-ntp', 'skip ntpdate step' ) do
-        @options[:notimesync] = TRUE
+      @options[:timesync] = FALSE
+      opts.on( '--ntp', 'run ntpdate step' ) do
+        @options[:timesync] = TRUE
       end
 
-      @options[:no_root_keys] = FALSE
-      opts.on('--no-root-keys', 'skip syncing ~root/.ssh/authorized_keys') do
-        @options[:no_root_keys] = TRUE
+      @options[:root_keys] = FALSE
+      opts.on('--root-keys', 'sync ~root/.ssh/authorized_keys') do
+        @options[:root_keys] = TRUE
       end
 
       @options[:dhcp_renew] = FALSE
diff --git a/setup/early/02-ntpdate.rb b/setup/early/02-ntpdate.rb
index 8f1320c..c9438b5 100644
--- a/setup/early/02-ntpdate.rb
+++ b/setup/early/02-ntpdate.rb
@@ -1,4 +1,4 @@
-unless options[:notimesync]
+if options[:timesync]
   test_name "Update system time sync"
   step "run ntpdate against NTP pool systems"
   hosts.each do |host|
diff --git a/setup/early/20-root_authorized_keys.rb b/setup/early/20-root_authorized_keys.rb
index 48cc308..a77af33 100644
--- a/setup/early/20-root_authorized_keys.rb
+++ b/setup/early/20-root_authorized_keys.rb
@@ -5,7 +5,7 @@
 # issues on Windows and maybe Solaris.  We will likely need to filter this step
 # but we're deliberately taking the approach of "assume it will work, fix it
 # when reality dictates otherwise"
-if not options[:no_root_keys] then
+if options[:root_keys] then
   script = "https://raw.github.com/puppetlabs/puppetlabs-sshkeys/master/templates/scripts/manage_root_authorized_keys"
   setup_root_authorized_keys = "curl -o - #{script} | bash"
   step "Sync root authorized_keys from github"

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to