Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

role fails with "Invalid data passed to 'loop'" #54

Open
b1r63r opened this issue May 10, 2022 · 2 comments
Open

role fails with "Invalid data passed to 'loop'" #54

b1r63r opened this issue May 10, 2022 · 2 comments

Comments

@b1r63r
Copy link

b1r63r commented May 10, 2022

TASK [stackhpc.libvirt-host : Ensure configuration files exist] **********************************************************************************************************
task path: /home/birger/.ansible/roles/stackhpc.libvirt-host/tasks/config.yml:24
fatal: [examplehost]: FAILED! => {
"msg": "Invalid data passed to 'loop', it requires a list, got this instead: <generator object select_or_reject at 0x7f2bcc663f40>. Hint: If you passed a list/dict of just one element, try adding wantlist=True to your lookup invocation or use q/query instead of lookup."
}

I used the role t2d.ansible_role_libvirt_host (which is v. 1.4.1 of this same project?) without this problem. It had other problems, though. So I tried to switch over here. Same playbook now gives this error.

Running ansible on fedora, with target system running Centos 8 stream

@b1r63r
Copy link
Author

b1r63r commented May 10, 2022

I got around this by appending
| list
to a bunch of loops. I didn't even try to understand the existing stuff, just forced everything that triggered errors to become lists. Now everything seems to work, including the stuff that did not work in t2d.ansible_role_libvirt_host.
Now on to find out why the vm only starts with selinux in permissive mode.

@markgoddard
Copy link
Member

Hi @b1r63r, will you provide a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants