chef-acme
chef-acme copied to clipboard
Cannot get the dns verification working following the steps on README.md
I've got a file at libraries/acme_dns.rb
with the content from the readme file defining the install_dns_challenge
method and remove_dns_challenge
. Using in my recipe with resource acme_certificate
.
include_recipe 'acme::default'
apitoken = chef_vault_item('secrets', 'tokens')['dns_provider_token']
include_recipe 'prometheus::use_lwrp'
acme_certificate node['fqdn'] do
key "/path/to/key.key"
crt "//path/to/cert.crt"
install_authz_block install_dns_challenge(apitoken)
remove_authz_block remove_dns_challenge(apitoken)
end
But, I am getting the following error...
Failure/Error: ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '22.04').converge(described_recipe)
NoMethodError:
undefined method `install_dns_challenge' for Custom resource acme_certificate from cookbook acme
raise NoMethodError, "undefined method `#{method_symbol}' for #{self.class}"
^^^^^
chef --version
Chef Workstation version: 24.4.1064
Test Kitchen version: 3.6.0
Cookstyle version: 7.32.8
Chef Infra Client version: 18.4.12
Chef InSpec version: 5.22.40
Chef CLI version: 5.6.14
Chef Habitat version: 1.6.652
I am new to chef and ruby. Perhaps I am not getting how the helper method is supposed to be used.