Closed keywal closed 1 year ago
This should hopefully now be resolved with https://github.com/ahembree/ansible-hms-docker/commit/a1bd7a75c4460bf24f00ec577fd9295c117fa285. Since the .env
file is deployed to the project directory that both Ansible and docker-compose expect as a default, this was safe to remove (but was only commented out with a note)
If you still continue to encounter issues, the following troubleshooting steps might help, I believe it might be some old version of something somewhere, possibly Ansible itself or the Ansible community module.
Looks like the module requires Compose version >= 1.25.0
, and this repo installs version 1.29.2
, so we're good there. I actually just bumped Compose to v2.14.2
in https://github.com/ahembree/ansible-hms-docker/commit/23f0e0f3ecc276211c73a502af05a733dfdac2a5
Assuming your Ansible is up to date, if you run the command ansible-galaxy collection list | grep docker
, this should print the version of the Docker module for Ansible.
According to this Ansible docs page, the env_file
parameter that it is erroring on above is supported as of version 1.9.0
of the module, which is what's making me think it's a version issue.
Turns out I was running 2.7.1
while the current version is 3.3.1
. I just updated myself using ansible-galaxy collection install community.docker
and confirmed everything is still working correctly.
Let me know if you encounter any additional issues and thanks for reporting this!
Closing due to inactivity
Hey ahembree,
Having an issue running ansible for the first time.
This is the error:
TASK [hmsdocker : Ensure containers defined in compose file.] *********************************************************************************************************************************************************** fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (docker_compose) module: env_file Supported parameters include: api_version, build, ca_cert, client_cert, client_key, debug, definition, dependencies, docker_host, files, hostname_check, nocache, project_name, project_src, pull, recreate, remove_images, remove_orphans, remove_volumes, restarted, scale, services, ssl_version, state, stopped, timeout, tls, tls_hostname, validate_certs"}
Im using the advanced config file. What parameter its having issue with?
Thanks Key