HAProxy not found because apt cache not up to date (deployments-balancer)
See original GitHub issueWhen running the playbook for the “Deploying to app servers behind a load balancer” in chapter 9, the HAProxy role errors out because it can’t find haproxy
package. I had to run ansible deployments -i inventory -a "sudo apt-get update"
to update the apt cache and then ran the playbook again. It worked this time around. Might want to update the instructions to add that as a step somehow.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Common HAProxy Errors - DigitalOcean
This tutorial series explains how to troubleshoot and fix some of the most common errors that you may encounter when using the HAProxy...
Read more >Accelerate Your APIs by Using the HAProxy Cache
HAProxy's cache, which is known as a proxy cache, will speed it up for all users because once a resource is cached in...
Read more >haproxy.service start failed when I set up load balancer on the ...
Since my Apache web server is listening on Port 80, therefore I cannot configure the same for my HAProxy. Changed it to another...
Read more >HAProxy known bugs for version v2.4.4 (maintenance branch ...
20. If your version is not the last one in the maintenance branch, you are missing fixes for known bugs, and by not...
Read more >Install haproxy 1.5 without telling apt specific version
installs haproxy 1.4, while 1.5 is in the repository. How can I install haproxy 1.5 (or the newest) without resorting to specific versions?...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah sure, make sense on using package in that case. no pb 🥰
@searsaw - Are you using this playbook? https://github.com/geerlingguy/ansible-for-devops/blob/master/deployments-balancer/playbooks/provision.yml
Almost every time I build a playbook for Ubuntu or Debian, I add a pre_tasks section with an apt cache update task. But it looks like I didn’t add that in this case. The example’s also using Ubuntu 14.04 currently, which is a bit out of date (I thought I had updated all examples to use at least 16.04!).
I will need to get this example updated to make it work better out of the box.
And @MacFlurry - sometimes I use a different module (like
package
in this case) to show how it can be done; in this case, I believe thehaproxy
package is the same across RHEL and Deb/Ubuntu, so usingpackage
is a more cross-platform-compatible way instead of specifyingapt
. (And thus why I usually have a separate task that manages apt caches, like here: https://github.com/geerlingguy/ansible-role-apache/blob/17af52011a07fd218eb740f861b3a70976d8f1cc/molecule/default/converge.yml#L14-L18)