Open akremer opened 8 months ago
After spending 4 hours trying to get the docker module to work I finally found out I'm running in the above bug. Does not work with the latest version of the puppetserver on ubuntu
Got this error when applying a puppet config containing an instance of docker_stack
:
Could not evaluate: wrong number of arguments (given 4, expected 1)
Manually applying the mentioned pull request (https://github.com/puppetlabs/puppetlabs-docker/pull/976) to the code fixed this issue
Describe the Bug
This module inherited a bug in PDK which causes the
docker_stack
resource to ungracefully fail with a "wrong number of arguments" error while callingpsych
's YAML.safe_load.See the following issues:
https://github.com/puppetlabs/pdk/issues/1143 https://github.com/ruby/psych/discussions/571
It looks like this issue was fixed in 2021, however, this module is still using the old way of calling safe_load in both of these resources. Any recent installation of psych (which is a dependency of the PDK) will error out.
Expected Behavior
I should be able to use docker_stack without an error.
Steps to Reproduce
Deploy a docker_stack resource with a version of psych greater than 4 on the host system. You can see the version of the gem installed in
/opt/puppetlabs/puppet/lib/ruby/gems/3.2.0/gems
although your installed version of ruby may be different.Environment
Additional Context
Add any other context about the problem here.