0

I am trying to upload a cookbook called 'cookbookABC' and it has the following chef spec code but I am not sure why it is failing:

let(:tool_path) { '/wk/wildfly_tools' }
%w(/tailLog.sh' /tailLog.sh /clearTmpData.sh /clearOldServerLog.sh /startJBoss.sh /jboss_standalone_start.sh).each do |path|
expect(chef_run).to create_template(['tool_path']+ path).with(
owner: useradmin
group: useradmin
mode: '0744'
)
end

It is telling me I have a syntax error. I have narrowed it down to being related to the %w(/file /file2) section.

  • I think what you mean is tool_path + path, it’s a method call. – coderanger Jul 2 '18 at 5:20
  • @coderanger Looks like my first thought was wrong and it turned out to be a few , missing after owner and group. – Josh Kirby Jul 3 '18 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.