From ffc5ab456e7101c17da29dbf176182648a12678c Mon Sep 17 00:00:00 2001 From: Joseph Hall Date: Thu, 19 May 2016 17:40:01 -0600 Subject: [PATCH 1/4] Don't lay down all available opts --- salt/utils/cloud.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/salt/utils/cloud.py b/salt/utils/cloud.py index c06e6f1abfa1..ef6e66f72182 100644 --- a/salt/utils/cloud.py +++ b/salt/utils/cloud.py @@ -214,8 +214,9 @@ def minion_config(opts, vm_): Return a minion's configuration for the provided options and VM ''' - # Let's get a copy of the salt minion default options - minion = copy.deepcopy(salt.config.DEFAULT_MINION_OPTS) + # Don't start with a copy of the default minion opts; they're not always + # what we need + minion = {} # Some default options are Null, let's set a reasonable default minion.update( log_level='info', From 4118318ad4c0ebdce3cce90685c1714d5b0ec6b2 Mon Sep 17 00:00:00 2001 From: Joseph Hall Date: Thu, 19 May 2016 17:46:07 -0600 Subject: [PATCH 2/4] We need at least one opt in there --- salt/utils/cloud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/utils/cloud.py b/salt/utils/cloud.py index ef6e66f72182..d868b0cb6faa 100644 --- a/salt/utils/cloud.py +++ b/salt/utils/cloud.py @@ -216,7 +216,7 @@ def minion_config(opts, vm_): # Don't start with a copy of the default minion opts; they're not always # what we need - minion = {} + minion = {'master': 'salt'} # Some default options are Null, let's set a reasonable default minion.update( log_level='info', From ba3700ee5efbe2f3340867dc2e4b4e61d048ef05 Mon Sep 17 00:00:00 2001 From: Joseph Hall Date: Thu, 19 May 2016 19:32:09 -0600 Subject: [PATCH 3/4] Condense defaults --- salt/utils/cloud.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/salt/utils/cloud.py b/salt/utils/cloud.py index d868b0cb6faa..cfc79f50f15b 100644 --- a/salt/utils/cloud.py +++ b/salt/utils/cloud.py @@ -215,14 +215,11 @@ def minion_config(opts, vm_): ''' # Don't start with a copy of the default minion opts; they're not always - # what we need - minion = {'master': 'salt'} - # Some default options are Null, let's set a reasonable default - minion.update( - log_level='info', - log_level_logfile='info', - hash_type='sha256' - ) + # what we need. Some default options are Null, let's set a reasonable default + minion = { + 'master': 'salt', + 'log_level': 'info', + } # Now, let's update it to our needs minion['id'] = vm_['name'] From 3458fa5a84266ab92d23f3d8a3dde9a1a427d38a Mon Sep 17 00:00:00 2001 From: Joseph Hall Date: Fri, 20 May 2016 10:00:48 -0600 Subject: [PATCH 4/4] Put the default hash type back --- salt/utils/cloud.py | 1 + 1 file changed, 1 insertion(+) diff --git a/salt/utils/cloud.py b/salt/utils/cloud.py index cfc79f50f15b..d3fcd16a4f64 100644 --- a/salt/utils/cloud.py +++ b/salt/utils/cloud.py @@ -219,6 +219,7 @@ def minion_config(opts, vm_): minion = { 'master': 'salt', 'log_level': 'info', + 'hash_type': 'sha256', } # Now, let's update it to our needs