Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

Conversation

ROpdebee
Copy link

The additional space after the = sign caused Ansible to parse the argument dict incorrectly as follows:

{
  "password": "",
  "{{ lookup('password', playbook_dir + '/credentials/databases/' + item.key.replace('.', '_') + ' chars": "ascii_letters,digits length=16') }}",
}

This would cause the task to fail due to an unrecognised argument. This at least happens on Ansible core 2.13.6 and likely earlier versions too. The fix should maintain backwards compatibility.

Just out of interest: Why are you using = for action arguments instead of :?

The additional space behind the `=` sign caused Ansible to parse the argument dict incorrectly as follows:
```
{
  "password": "",
  "{{ lookup('password', playbook_dir + '/credentials/databases/' + item.key.replace('.', '_') + ' chars": "ascii_letters,digits length=16') }}",
}
```
This would cause the task to fail due to an unrecognised parameter. This at least happens on Ansible core 2.13.6 and likely earlier versions too. The fix should maintain backwards compatibility.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant