-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Undefined attributes in dict #2
Comments
I think it has to do with your setup; the The error you are seeing comes from this code: - name: test if locale_lang is set correctly
ansible.builtin.assert:
that:
- locale_lang is defined
- locale_lang is string
quiet: yes Maybe just to be sure you can quote your values: locale_lang: "en_GB.UTF-8"
locale_timezone: "Europe/Vienna" Although I don't really expect that to cause an issue. Hope you find the issue, please reopen if you need further help. |
You were right about that not causing the issue.
I can't imagine what is causing the assertion to fail. No other role/task is messing with locales, and I checked the host, they are all set properly (to "C", no clue why, but its fine, its the initial state that should get changed by this role). If you don't mind, I'd ask you to reopen the issue as I still don't have a fix. |
What a strange error, I'm actually curious where it comes from. Can you run the playbook with a couple of '-vvv's? |
Sorry for my late response, I didn't have time to retry this earlier. I ran the play using
|
I'm suspecting the issue is triggered by some sort of underlying ansible bug. I managed to reproduce the exact same issue on a different play, using partially the same vars as in the play I mentioned above. Appearently the unrelated var I didn't try yet if the mentioned workaround allows me to use your role again, I'll test it ASAP and close the issue if I succeed. |
I managed to sort out the issue regarding the unrelated var |
Good to hear your issue is "fixes", indeed please make issues for any problem you spot, it helps me and all other users of these roles. Thanks! |
Describe the bug
To begin with, I'm unsure if this is a bug or just happens because I'm doing it wrong.
When trying to provision a remote Ubuntu LXC on a Proxmox Host, the role immediately fails with the error
fatal: [my.remote.host -> localhost]: FAILED! => {"msg": "'dict object' has no attribute 'password'"}
Playbook
I just paste the part of the playbook relating to locale(s), which is within our "common" role, as setting the locale is one of the things that needs to be done on all of our hosts.
Our config done via group_vars/all.yml:
Our requirements.yml which is fed into ansible before every run:
Output
The first "TASK" in the output is the line calling the role, as described above.
Environment
NAME="Ubuntu" VERSION="20.04.3 LTS (Focal Fossa)"
ansible [core 2.11.3]
NAME="Ubuntu" VERSION="18.04.5 LTS (Bionic Beaver)"
actually just a LXC on a Proxmox 6.4-13 Host (Debian 10)The text was updated successfully, but these errors were encountered: