Git Product home page Git Product logo

chef-handler-mail's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chef-handler-mail's Issues

Errors out saying didnot find highline?

I tried this handler on omnibus installed chef in ubuntu oneric.

chef_gem 'chef-handler-mail'
gem 'chef-handler-mail'

chef_handler "MailHandler" do
  source 'chef/handler/mail'
  arguments :to_address => "[email protected]"
  action :nothing
end.run_action(:enable)

But it errors out complaining about highline gem not found but its installed already.

The trace is at https://gist.github.com/3148965

And the following is the gems installed. highline is also already installed.

ubuntu@ip-10-202-66-91:~$ /opt/chef/embedded/bin/gem list

*** LOCAL GEMS ***

bundler (1.0.22)
bunny (0.7.9)
chef (10.12.0, 10.12.0.rc.1)
chef-handler-mail (0.1.2)
erubis (2.7.0)
highline (1.6.13, 1.6.12)
i18n (0.6.0)
ipaddress (0.8.0)
json (1.6.1)
mail (2.4.4)
mime-types (1.18)
minitest (1.6.0)
mixlib-authentication (1.1.4)
mixlib-cli (1.2.2)
mixlib-config (1.1.2)
mixlib-log (1.3.0)
mixlib-shellout (1.0.0)
moneta (0.6.0)
net-ssh (2.2.2)
net-ssh-gateway (1.1.0)
net-ssh-multi (1.1)
ohai (6.14.0)
polyglot (0.3.3)
pony (1.4)
rake (0.8.7)
rdoc (2.5.8)
rest-client (1.6.7)
right_aws (2.1.0)
right_http_connection (1.3.0)
systemu (2.5.1)
treetop (1.4.10)
uuidtools (2.1.2)
yajl-ruby (1.1.0)

handler should accept string parameters in addition to symbol parameters

I'm using the chef-client cookbook to install handler and I've enabled it in the following way:

default.chef_client.load_gems = {
  "chef-handler-mail" => {
    "require_name" => 'chef/handler/mail',
  }
}

default.chef_client.config.report_handlers = [
  { "class" => "MailHandler", "arguments" => [{:to_address => "[email protected]"}] }
]

When I use the chef-client cookbook to manage the handler it creates the following line (amonth the others) in Chef config:

report_handlers << MailHandler.new({"to_address"=>"[email protected]"})

Notice that a symbol has changed to string here.

This means that we can't pass any parameters to the handler using chef-client cookbook as the handler accepts only symbols.

Deprecated features used

Deprecated features used!
  "method access to node attributes (node.foo.bar) is deprecated and will be removed in Chef 13, please use bracket syntax (node["foo"]["bar"]) at 3 locations:
    - /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-handler-mail-0.1.2/lib/chef/handler/mail.rb:36:in `report'
    - (erubis):1:in `block in evaluate'
    - /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-handler-mail-0.1.2/lib/chef/handler/mail.rb:55:in `report'

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.