Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making the cookbook operational when running Chef Infra client/CINC 17.10.0 #181

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
end

chef_gem 'influxdb' do
version '0.6.1'
version '0.8.1'
compile_time false if respond_to?(:compile_time)
end

Expand Down
10 changes: 8 additions & 2 deletions resources/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@
default_action :create

action :create do
require 'toml'
if Version.new(Chef::VERSION) >= Version.new('17.3.48')
content = render_toml(new_resource.config)
else
require 'toml'

content = TOML::Generator.new(new_resource.config).body
end

file new_resource.path do
content TOML::Generator.new(new_resource.config).body
content content
end
end

Expand Down