Closed jasonpau closed 4 years ago
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
Not a stupid question; however you typically shouldn't run into this issue with VMs. One thing to try is seeing if the tinker option helps (https://github.com/geerlingguy/ansible-role-ntp/pull/65), probably won't, because that config isn't applied until this role finishes running, which doesn't happen since apt-get update fails.
But it's not something this role can really fix—because if apt-get update itself fails, something needs to be fixed prior to it running.
Note that my VMs that I run through Vagrant (built with Packer) like geerlingguy/ubuntu1804
don't seem to have this issue. Maybe it's a problem caused by the way the snapshots are being created?
Regardless, I think it would be best to look into it on another level—unfortunately, I don't see a way this role can prevent issues with apt-get commands.
Not sure if it's just me or what, but after restoring a VirtualBox VM snapshot, I get the following error when trying to run my Ansible playbook:
This fatal error seems to be due to the VM system clock being out of date (since it's the exact time when the snapshot was originally made). Syncing the system clock on the VM resolves this issue. However, it seems strange to have to do that manually, since this role is supposed to handle clock syncing.
Later I realized installing
python-apt
on the restored snapshot before running my Ansible playbook resolves the issue;geerlingguy.ntp
and the rest of the roles in my playbook run successfully.I'm pretty new to Ansible (and VMs in general), so my apologies if this is a stupid question/issue.