I have a problem to expand a variable in ansible. The variable holds the path to an application folder. This should be expanded and used to run the application.
mlcp_path: '/home/<user>/mlcp-9.0.3'
shell: "{{ mlcp_path }}/bin/mlcp.sh" import -host {{ ml_dbserver }} .....
This results in :
shell: "{{ mlcp_path }}"/bin/mlcp.sh" import -host {{ ml_dbserver }} - port {{ ml_dbserver_port }} -username {{ ml_dbserver_user }} - input_file_path {{ mlcp_input_file_path }} -password {{ ml_dbserver_password }} -output_uri_replace "{{ mlcp_uri_replace }}" - output_permissions {{ mlcp_output_permissions }} -output_collections {{ mlcp_output_collections }} We could be wrong, but this one looks like it might be an issue with missing quotes.
In the mlcp_path
variable is not used every thing works fine. I have read the docs but did not found an indication that this is incorrect. The only thing which might looks odd would be the regex later in the string. Maybe something gets out of sync?
Any hint is helpful, thanks a lot.