Please review pull request #166: (maint) use env vars for dmv options opened by (justinstoller)

Description:

This will use environmental variables if available before using the defaults for dmv configuration.

  • Opened: Wed Mar 14 19:22:46 UTC 2012
  • Based on: puppetlabs:master (0bd564ccb167d43c2e5d91ddcb96acb0fc230db0)
  • Requested merge: justinstoller:maint/master/use_env_for_dmv (e99e1e228249ea72eaab6fa5979da064dc8954b9)

Diff follows:

diff --git a/setup/early/01-gen-answer-file.rb b/setup/early/01-gen-answer-file.rb
index 7f852c3..50a3a2b 100644
--- a/setup/early/01-gen-answer-file.rb
+++ b/setup/early/01-gen-answer-file.rb
@@ -35,14 +35,8 @@
 q_puppet_enterpriseconsole_auth_database_user='mYu7hu3r'
 q_puppet_enterpriseconsole_auth_database_password='~!@#$%^*-/aZ'
 q_puppet_enterpriseconsole_auth_database_name='console_auth'
-q_puppet_enterpriseconsole_smtp_host=DASHBOARD
-q_puppet_enterpriseconsole_smtp_use_tls=n
-q_puppet_enterpriseconsole_smtp_port=25
 q_puppet_enterpriseconsole_smtp_user_auth=y
-q_puppet_enterpriseconsole_smtp_username='console'
-q_puppet_enterpriseconsole_smtp_password='~!@#$%^*-/aZ'
 q_puppet_enterpriseconsole_auth_password='~!@#$%^*-/aZ'
-q_puppet_enterpriseconsole_auth_user='[email protected]'
 q_puppet_enterpriseconsole_database_install=y
 q_puppet_enterpriseconsole_database_name='console'
 q_puppet_enterpriseconsole_database_password='~!@#$%^*-/aZ'
@@ -54,7 +48,15 @@
 q_puppet_enterpriseconsole_master_hostname=MASTER
 q_puppet_enterpriseconsole_inventory_certname=`uname | grep -i sunos > /dev/null && hostname || hostname -s`
 q_puppet_enterpriseconsole_inventory_dnsaltnames=MASTER
-] + "\nq_puppet_enterpriseconsole_httpd_port=#{portno}\n"
+] + %Q[
+q_puppet_enterpriseconsole_auth_user='#{ENV['q_puppet_enterpriseconsole_auth_user'] || '[email protected]'}'
+q_puppet_enterpriseconsole_httpd_port=#{portno}
+q_puppet_enterpriseconsole_smtp_host='#{ENV['q_puppet_enterpriseconsole_smtp_host'] || 'DASHBOARD'}'
+q_puppet_enterpriseconsole_smtp_use_tls='#{ENV['q_puppet_enterpriseconsole_smtp_use_tls'] || 'n'}'
+q_puppet_enterpriseconsole_smtp_port='#{ENV['q_puppet_enterpriseconsole_smtp_port'] || '25'}'
+q_puppet_enterpriseconsole_smtp_username='#{ENV['q_puppet_enterpriseconsole_smtp_username'] || '[email protected]'}'
+q_puppet_enterpriseconsole_smtp_password='#{ENV['q_puppet_enterpriseconsole_smtp_password'] || '~!@#$%^*-/aZ'}'
+]
 
 dashboardhost = nil
 hosts.each do |host|  # Clean up all answer files that might conflict

    

--
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