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

Update apt packages before checking essentials #1086

Merged
merged 1 commit into from
Jul 24, 2019

Conversation

amelotrgr
Copy link
Contributor

This step will prevent errors such as "No package matching 'build-essential' is available."
That happened a lot for me when I run the provisioning on Digital Ocean droplets Ubuntu 18.04.

This step will prevent errors such as: No package matching 'build-essential' is available
@swalkinshaw
Copy link
Member

Does this happen after the first provision?

Should note that the task below sets cache_valid_time (the default is 60 minutes). The docs say

Update the apt cache if its older than the cache_valid_time. This option is set in seconds.
As of Ansible 2.4, if explicitly set, this sets update_cache=yes.

@amelotrgr
Copy link
Contributor Author

amelotrgr commented Jun 13, 2019

Yes

Does this happen after the first provision?

Should note that the task below sets cache_valid_time (the default is 60 minutes). The docs say

Update the apt cache if its older than the cache_valid_time. This option is set in seconds.
As of Ansible 2.4, if explicitly set, this sets update_cache=yes.

Yes. That happens when I create a new droplet in Digitalocean and, right after, I run the provisioning. The problem is solved when I get into the VM and run a basic apt-get update.

According to the Ansible docs, it says that this playbook snippet is basically an apt-get update command. I tried that and worked.

@slackday
Copy link
Contributor

Can confirmed it just happened to me as well on a new Ubuntu 18.04 droplet on Digital Ocean. Solved by manually running apt-get update on the server as @amelotrgr suggested.

@mAAdhaTTah
Copy link
Contributor

Just ran into this myself, provisioning a new droplet. The solution in the PR worked for me. I wonder if this happens because the cache on a new droplet isn't "stale" enough for the Checking Essentials task to be required to update it.

@swalkinshaw
Copy link
Member

I wonder if this happens because the cache on a new droplet isn't "stale" enough for the Checking Essentials task to be required to update it.

That makes sense. Going to merge this since it's straightforward enough.

@swalkinshaw swalkinshaw merged commit ae6e020 into roots:master Jul 24, 2019
swalkinshaw added a commit that referenced this pull request Jul 24, 2019
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

Successfully merging this pull request may close these issues.

4 participants