You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 23, 2019. It is now read-only.
It seems that when I use the run command, I can't also pass a --var_file. I am defining my service's command as a variable in my container.yml, and trying to set the variable in a var file for each environment.
STEPS TO REPRODUCE
Create a vars-test.yml file with a variable container_start_command defined in it.
Use a container.yml file like the one above.
Try running the run command after building the container(s) along with the --var_file option.
It says in the docs line that [--var-file VAR_FILE] is one of the options... and it works fine with the build option, but it seems not to be accepted by run.
EXPECTED RESULTS
The variables defined in vars-test.yml should be used by the run command allowing variables to be used in container.yml.
# Init the project with ac-solr role
$ ansible-container init geerlingguy.ac-solr
# Build using latest AC source
$ ansible-container --var-file vars-6.x.yml --debug --devel build
# Run with --var-file, using latest AC source:
$ ansible-container --var-file vars-6.x.yml --debug --devel run
# Check if the container is actually running
$ docker ps
WARNING: Error loading config file:/Users/chouseknecht/.docker/config.json - EOF
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
655ad410ceae ac-solr-solr:20170710150458 "/opt/solr/bin/sol..." 3 minutes ago Up 3 minutes 0.0.0.0:8983->8983/tcp acsolr_solr_1
Looks like in your comments above, and in your docs, you're specifying the --var-file param incorrectly. Notice in both places you have --var_file, emphasis on the _.
ISSUE TYPE
container.yml
OS / ENVIRONMENT
See: https://gist.github.com/geerlingguy/98cb8a4b61baa285bafe813823eb2b23
SUMMARY
It seems that when I use the
run
command, I can't also pass a--var_file
. I am defining my service'scommand
as a variable in mycontainer.yml
, and trying to set the variable in a var file for each environment.STEPS TO REPRODUCE
vars-test.yml
file with a variablecontainer_start_command
defined in it.container.yml
file like the one above.run
command after building the container(s) along with the--var_file
option.It says in the docs line that
[--var-file VAR_FILE]
is one of the options... and it works fine with thebuild
option, but it seems not to be accepted byrun
.EXPECTED RESULTS
The variables defined in
vars-test.yml
should be used by therun
command allowing variables to be used incontainer.yml
.ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: