Closed vkhatri closed 7 years ago
/etc/salt/master:
+--- +external_auth: + pam: + saltapi: !ruby/array:Chef::Node::ImmutableArray + internal: + - "@wheel" + - "@runner" + ivars: + :@__path__: [] + :@__root__: + :@__node__: + :@__precedence__:
Instead, use below code (been using it in numerous cookbooks).
$ git diff libraries/helpers.rb diff --git a/libraries/helpers.rb b/libraries/helpers.rb index 9412bca..2571e12 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -6,7 +6,7 @@ require 'mixlib/log' module SaltCookbookHelper def salt_config(config) - config.to_hash.compact.sorted_hash.to_yaml + JSON.parse(config.to_json).to_yaml.lines.to_a[1..-1].join end end
Will submit a PR.
The method takes in a hash so that change would not be needed. (Not sure why i have the extra .to_hash though)
.to_hash
/etc/salt/master:
Instead, use below code (been using it in numerous cookbooks).
Will submit a PR.