-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Module docker_service seems to create variables at runtime #33960
Comments
Files identified in the description: If these files are inaccurate, please update the |
Ref:
|
Potential fix: Keep the current behavior for backward compatibility. Introduce a new optional attribute to allow the user to
results would contain:
|
can confirm this exact problem happens to me as well. broke my deployment. |
Files identified in the description: If these files are inaccurate, please update the |
Please note that the !component =lib/ansible/modules/cloud/docker/docker_compose.py Also, please note that currently, nobody is actively maintaining the Ansible |
Please note that the returned ansible_facts are deprecated for Ansible 2.8, and will be removed in Ansible 2.12. Also, maybe this helps. No idea whether this can be set on task level, though. |
Files identified in the description: If these files are inaccurate, please update the |
CC @sluther |
Files identified in the description: If these files are inaccurate, please update the |
If I'm following this correctly, |
It's not replaced, but a ansible_facts with name Use another variable name for now, or tell Ansible to handle |
Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.
For further information, please see: |
ISSUE TYPE
COMPONENT NAME
docker_service
ANSIBLE VERSION
CONFIGURATION
DEFAULT_HOST_LIST(/etc/ansible/env/dev/ansible.cfg) = [u'/etc/ansible/env/dev/inventory.yml']
OS / ENVIRONMENT
N/A
SUMMARY
Not sure if this is an intended feature by the owner or a bug.
When using the docker_service module with
state: present
, a new variable is created in the ansible runtime for each services defined in the docker-compose.yml file, containing the output ofdocker-compose up
. This potentially overwrites variables already defined in ansible.This also means that if i edit the docker-compose.yml file (oblivious of ansible), it can potentially break the ansible build when there are name conflicts between ansible variables and the name of services present in the docker-compose.yml file.
STEPS TO REPRODUCE
EXPECTED RESULTS
No variables created by the module
ACTUAL RESULTS
A new
formio
variable gets created and overwrites the currentformio
variable, becausee the docker-compose.yml file has a service namedformio
.The text was updated successfully, but these errors were encountered: