Hi,
I’m trying to run a cookbook called hostsfile on Opsworks and get the following error in the log:
17: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18: # See the License for the specific language governing permissions and
19: # limitations under the License.
20: #
21:
22: default[‘hostsfile’][‘path’] = nil
23:
24>> hostsfile_entry ‘x.x.x.x’ do
25: hostname 'blah.blah’
26: aliases 'blah’
27: action :create_if_missing
28: end
29:
30: hostsfile_entry ‘x.x.x.x’ do
31: hostname 'blah2.blah’
32: aliases 'blah2’
33: action :create_if_missing
[2016-02-10T10:27:31+00:00] ERROR: Running exception handlers
[2016-02-10T10:27:31+00:00] ERROR: Exception handlers complete
[2016-02-10T10:27:31+00:00] FATAL: Stacktrace dumped to /var/chef/runs/02e3fa28-25c3-42ff-a90e-d6690118f492/local-mode-cache/cache/chef-stacktrace.out
[2016-02-10T10:27:31+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-02-10T10:27:31+00:00] ERROR: Undefined node attribute or method hostsfile_entry' on
node’
[2016-02-10T10:27:32+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
The cookbook i am using is stored like this:
hostsfile
├── attributes
│ └── default.rb
├── CHANGELOG.md
├── libraries
│ ├── entry.rb
│ ├── manipulator.rb
│ └── matchers.rb
├── metadata.json
├── metadata.rb
├── providers
│ └── entry.rb
├── README.md
├── recipes
│ └── default.rb
└── resources
└── entry.rb
Any idea why it can’t find the resource?
Cheers,
Simon.