maxhoesel-ansible/ansible-collection-smallstep

Error reading ca.json config: 'provisioners'

strarsis opened this issue ยท 2 comments

When adding the ACME provisioner to smallstep CA, ansible terminates with this error:

Error reading ca.json config: 'provisioners'

The ca.json doesn't contain a (authority/)provisioner field yet.

That's probably the reason, the module assumes there is already an authority and also provisioners structure:
https://github.com/maxhoesel/ansible-collection-smallstep/blob/2c8b941429fe48f448634283a7891420b2409558/plugins/modules/step_ca_provisioner.py#L324

@maxhoesel: When I manually insert "provisioners": [], into the ca.json the issue doesn't occur.
However, manipulating JSON files with ansible is a bit clunky and it would be nice if the module code could check for that key and insert it.

Seems like this is caused by a change in the 0.17 release. With 0.16 and earlier, the provisioners key was always defined, it was just empty.

Should be fixed in #118. Will push out a release later.