Open klemens-u opened 4 years ago
Note: this happens only with python2
I guess the package needed might be ruamel.yaml
. But tried it no help too.
Hey, I had the same problem.
Installing the package python-yaml
did it for me.
You can do this by running apt install python-yaml
on the managed host or by creating an ansible task:
- name: ensure python-yaml is installed
package:
name: python-yaml
state: present
I had this issue in python3 using pyenv virtual environments on Macos. It seems like the correct python interpreter was not discovered. Fixed by setting the ANSIBLE_PYTHON_INTERPRETER environment variable as follows.
export ANSIBLE_PYTHON_INTERPRETER="$(which python)"
Using Ubuntu 18.04 I get the following error:
I already tried various variants of
pip install pyaml
, (python2, python3, earlier version) but to no success. Any ideas?