-
Notifications
You must be signed in to change notification settings - Fork 12
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
portainer overwrites traefik #6
Comments
I've noticed the same behavior on my side. I agree that the misinterpreting of the variables happen within compose_hull. But currently i haven't debug it in detail. |
The problem is, When using vars: within the roles: section of a playbook, the variables are added to the play variables, making them available to all tasks within the play before and after the role. This behavior can be changed by DEFAULT_PRIVATE_ROLE_VARS. But setting private_role_vars = True in ansible.cfg did't work. So here is my working system-setup.yml:
|
ok thanks for your reply and "workaround". |
Thanks! So the original code must have been untested ... |
As far as I understand it, this is a problem with the variable precedence in ansible (https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#understanding-variable-precedence). |
@AndreasCS , thanks for your workaround! |
If I install each of the four services separately, everything works fine.
But when I run system-setup.yml (in the article erroneously called server-setup.yml), the portainer installation seems to use the service_cfg of traefik.
The traefik/docker-compose.yml contains the content of the portainer compose file and the installation fails because "admin_user" variable cannot be found (I assume because ansible searches for this variable below the traefik section).
The problem also appears for other services, e.g. when I only install watchtower and autoheal - then autoheal overwrites the docker-compose.yml of watchtower.
Really weird - can somebody reproduce this?
I am suspecting the use of set_fact in facts.yml of compose_hull, but I am not sure.
The text was updated successfully, but these errors were encountered: