ansible-community / molecule-hetznercloud

A molecule driver for Hetzner Cloud
https://ansible.readthedocs.io/projects/molecule/
GNU Lesser General Public License v3.0
27 stars 14 forks source link

molecule_to_yaml filter still present when role init #37

Closed VeselaHouba closed 1 year ago

VeselaHouba commented 3 years ago

Filter molecule_to_yaml have been replaced with ansible native some time ago (#20) but somehow when I init new role I still get the "old ones"

$ pip freeze |grep molecule
molecule==3.4.0
molecule-hetznercloud==1.3.0

$ molecule init role myrolename -d hetznercloud
INFO     Initializing new role myrolename...
No config file found; using defaults
- Role myrolename was created successfully
INFO     Initialized role in /tmp/ansible-role-crowdsec/myrolename successfully.

$ grep from_yaml myrolename/* -R
myrolename/molecule/default/create.yml:      with_items: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}"
myrolename/molecule/default/destroy.yml:            instance_conf: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}"

which leads to errors like

TASK [Dump instance config] ******************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "template error while templating string: No filter named 'molecule_header'.. String: {{ instance_conf | to_json | from_json | molecule_to_yaml | molecule_header }}"}
decentral1se commented 3 years ago

Can you try the latest release and re-confirm this is still an issue @VeselaHouba? Thanks.

VeselaHouba commented 3 years ago

Hi @decentral1se, github tags claims that 1.3.0 is the latest release, so this is still valid.

stefa2k commented 3 years ago

Ran into the same error, is there a workaround to use until a fixed version is released?

pyToshka commented 2 years ago

@VeselaHouba for resolving issue try:

pip uninstall molecule-hetznercloud
pip install git+https://github.com/ansible-community/molecule-hetznercloud