#
# Cookbook Name:: motd-attributes
# Recipe:: default
#
# Copyright (c) 2015 The Authors, All Rights Reserved.


# Try to override an automatic attribute.
node.default['ipaddress'] = '1.1.1.1'

# Define "recipe-level" attributes.
node.default['motd-attributes']['company'] = 'cjl-magistri'
node.default['motd-attributes']['message'] = "It's a wonderful day today!"


# Include other recipes (which may, in turn, define attributes).
include_recipe 'motd-attributes::_message'


template '/etc/motd' do
  source 'motd.erb'
  mode '0644'
end

#
# Cookbook Name:: motd-attributes
# Recipe:: default
#
# Copyright (c) 2015 The Authors, All Rights Reserved.


require 'pp'


# Try to override an automatic attribute.
node.default['ipaddress'] = '1.1.1.1'
pp node.debug_value('ipaddress')

# Define "recipe-level" attributes. 
node.default['motd-attributes']['company'] = 'cjl-magistri' 
node.default['motd-attributes']['message'] = 
	"It's a wonderful day today!"


# Include other recipes (which may, in turn, define attributes).
include_recipe 'motd-attributes::_message'


template '/etc/motd' do
  source 'motd.erb'
  mode '0644'
end

Add debug information to converge run.
Add debug information to converge run.

Add a call to `note.debug_value()` to the default recipe. This call
allows us to see the value of `ipaddress` at run-time.

Note tha the printing **does not** occur as part of the command `kitchen
login` but only during the call to `kitchen converge.`
