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

ansible_host variable escaping #205

Open
smirta opened this issue Jan 7, 2025 · 0 comments
Open

ansible_host variable escaping #205

smirta opened this issue Jan 7, 2025 · 0 comments
Assignees

Comments

@smirta
Copy link
Member

smirta commented Jan 7, 2025

Currently,

- name: PODMAN_HOST
value: "{{ ansible_host }}"

and

- name: PODMAN_HOST
value: "{{ ansible_host }}"

will set foreman.service.int.rabe.ch as value for environment variable PODMAN_HOST in revproxy container when applied to foreman. This is not desirable. It should replace it with the destination ansible host when run as role in foreman. E.g. vm-2001.dmz.int.rabe.ch or vm-2002.dmz.int.rabe.ch. Would escaping work for that @hairmare ? Can you quickly test that? I believe you have it tested a lot quicker than me.

I was thinking of something like this:

                          - name: PODMAN_HOST
                            value: "\{\{ ansible_host \}\}"

which then would result in something like that in foreman:
Image

Thx!

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

No branches or pull requests

2 participants