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 haproxy role and make it more generic #1892

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Jan 9, 2025

No description provided.

{% for host in foreman_proxies %}
server f-proxy-https-{{loop.index}} {{ hostvars[host].ansible_default_ipv4.address }}:443 check
{% for host in haproxy_targets %}
server f-proxy-https-{{loop.index}} {{ host }}:443 check
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the port also be in the variable? Perhaps even make the var a dict: service -> backends where each backend is just hostname:port

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in go fully generic? I was intending to keep this specific to our load-balancer use case, but remove the fact that it was tightly coupled to how Vagrant works within Forklift to have an inventory.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm debating it. On the one hand, it's good but if we go that route perhaps we can use some community collection instead. You could design an intermediate layer too. On the other hand, it may also be overkill.

I'm fine merging this now (provided tests pass) and leave it to a future improvement. Just want to make sure we at least consider it

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.

2 participants