You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'Create EE temp list' task fails when running a playbook using this collection/role to extract info about current venvs on an existing Tower node. The regex_replace filter function used here causes the following error. I'm assuming this is a problem with using Ansible 2.9.x but this syntax should work in 2.9 because we typically run the playbook on Tower node, which has Ansible 2.9.
TASK [infra.ee_utilities.virtualenv_migrate : Create EE list] ******************************************************************fatal: [localhost]: FAILED! => {"reason": "We were unable to read either as JSON nor YAML, these are the errors we got from each:\nJSON: Expecting value: line 1 column 1 (char 0)\n\nSyntax Error while loading YAML.\n found unknown escape character\n\nThe error appears to be in '/app/collections/ansible_collections/infra/ee_utilities/roles/virtualenv_migrate/tasks/02_ee_list_create.yml': line 9, column 69, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n ee_list_temp:\n - name: \"{{ __venv_migrate_python_item.item | regex_replace('^\\/|\\/$', '') | regex_replace('\\/|\\/', '_') }}\"\n
Issue Type
Bug Report
Ansible, Collection, Docker/Podman details
ansible --versionansible 2.9.27 config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.6/site-packages/ansible executable location = /usr/bin/ansible python version = 3.6.8 (default, Oct 20 2022, 09:31:56) [GCC 8.5.0 20210514 (Red Hat 8.5.0-15)]ansible-galaxy collection list(not supported in this version)podman --versionClient: Podman EngineVersion: 4.2.0API Version: 4.2.0Go Version: go1.18.4Built: Mon Dec 12 06:41:56 2022OS/Arch: linux/amd64
ansible installation method: one of source, pip, OS package, EE
Traditional Tower installation, with 3 custom virt envs in a custom location.
OS / ENVIRONMENT
Desired Behavior
It should work, but fails. So the workaround was simply to remove the regex_replace filter functions from that line and that seems to work enough to get the results. Not sure the intent for those regex functions.
Summary
'Create EE temp list' task fails when running a playbook using this collection/role to extract info about current venvs on an existing Tower node. The regex_replace filter function used here causes the following error. I'm assuming this is a problem with using Ansible 2.9.x but this syntax should work in 2.9 because we typically run the playbook on Tower node, which has Ansible 2.9.
Issue Type
Ansible, Collection, Docker/Podman details
Traditional Tower installation, with 3 custom virt envs in a custom location.
OS / ENVIRONMENT
Desired Behavior
It should work, but fails. So the workaround was simply to remove the regex_replace filter functions from that line and that seems to work enough to get the results. Not sure the intent for those regex functions.
Actual Behavior
see above
STEPS TO REPRODUCE
The text was updated successfully, but these errors were encountered: