mirror of
https://github.com/konstruktoid/hardening.git
synced 2026-04-26 17:25:52 +03:00
[GH-ISSUE #88] [BUG] Role fails with "AnsibleUndefinedVariable: 'dict object' has no attribute 'systemd'" #41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @PorgJuice on GitHub (Oct 25, 2020).
Original GitHub issue: https://github.com/konstruktoid/hardening/issues/88
Originally assigned to: @konstruktoid on GitHub.
Sorry if I'm missing something obvious here but I'm new to Ansible. I'm running into an issue doing a dry run of this role.
Describe the bug
When running the role (with
--check') on a new Ubuntu 20.04 VM in Proxmox, it fails ontimesyncd.confwithAnsibleUndefinedVariable: 'dict object' has no attribute 'systemd'`.To Reproduce
Build a brand new Ubuntu 20.04 VM and do a dry run (
--check) of the role on it.Expected behavior
To run without crashing.
System (lsb_release -a):
Additional context
@konstruktoid commented on GitHub (Oct 26, 2020):
Hi @ProfessorSalty, thanks for reporting the issue. I'll have a look at it, but I assume it was meant to be opened in https://github.com/konstruktoid/ansible-role-hardening
@konstruktoid commented on GitHub (Oct 26, 2020):
Since the
--checkdoesn't actually change anything, the custom facts directories and files aren't created. This results in theansible_local.systemd.versionand related facts are missing.The
--checkwill also fail on anything that requires some kind of interaction:@PorgJuice commented on GitHub (Oct 26, 2020):
Ah, yes, I suppose this is the wrong repo. Sorry about that. I appreciate you taking your time out for the explanation - it looks like I can't just blindly check my tasks, so I'll have to modify my config to account for missing facts. Thanks so much!