GithubHelp home page GithubHelp logo

poise-hoist's Issues

Exception when using data bags that don't exist

** INFO: *** Chef 12.17.44 ***
Seems like with version 1.2.0 the following error was introduced:

NoMethodError

undefined method `[]' for nil:NilClass

Cookbook Trace:

/var/chef/cache/cookbooks/poise-hoist/files/halite_gem/poise_hoist.rb:44:in hoist!' /var/chef/cache/cookbooks/poise-hoist/files/halite_gem/poise_hoist/cheftie.rb:19:in <top (required)>'
/var/chef/cache/cookbooks/poise-hoist/libraries/default.rb:19:in `<top (required)>'

Relevant File Content:

/var/chef/cache/cookbooks/poise-hoist/files/halite_gem/poise_hoist.rb:

37: # Don't continue if we aren't using policies.
38: return unless policy_group
39: Chef::Log.debug("Running attribute Hoist for group #{policy_group}")
40: # Hoist away, mateys!
41: Chef::Mixin::DeepMerge.hash_only_merge!(node.role_default, node.role_default[policy_group]) if node.role_default.include?(policy_group)
42: Chef::Mixin::DeepMerge.hash_only_merge!(node.role_override, node.role_override[policy_group]) if node.role_override.include?(policy_group)
43: # Grab from a data bag if one is configured.
44>> hoist_from_data_bag!(node, policy_group, node['poise-hoist']['data_bag']) if node['poise-hoist']['data_bag']
45: # Install the patch for chef_environment.
46: patch_chef_environment!(node, policy_group)
47: end
48:
49: # Pull attribute data in from a data bag. Checks for an item matching the
50: # node node, and then the policy group.
51: #
52: # @api private
53: # @param node [Chef::Node] Node object to modify.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.