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
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 on timesyncd.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):
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
Since the --check doesn't actually change anything, the custom facts directories and files aren't created. This results in the ansible_local.systemd.version and related facts are missing.
~$ ls -l /etc/ansible/facts.d/systemd.fact
ls: cannot access '/etc/ansible/facts.d/systemd.fact': No such file or directory
The --check will also fail on anything that requires some kind of interaction:
fatal: [127.0.0.1]: FAILED! => {"msg": "The conditional check 'needrestart_directory.stat.exists and needrestart_restart_set.rc != 0' failed. The error was: error while evaluating conditional (needrestart_directory.stat.exists and needrestart_restart_set.rc != 0): 'dict object' has no attribute 'rc'\n\nThe error appears to be in '/private/etc/ansible/roles/konstruktoid.hardening/tasks/packages.yml': line 42, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: configure needrestart\n ^ here\n"}
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!
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 on
timesyncd.confwith
AnsibleUndefinedVariable: '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
The text was updated successfully, but these errors were encountered: