One thing I could think of is instead of passing in config_src as the -e
arg, pass in dummy_src and declare config_src = {{ dummy_src|some_filter }}
as a variable somewhere that makes sense for your specific structure
(probably a top level default variable based on your initial post).
It might not even be necessary. For file paths, multiple slashes are
collapsed into one on most OSes I've tried.
On Monday, August 29, 2016 at 4:43:31 AM UTC-7, ishan jain wrote:
>
> I have a variable config_src which i use in a lot many places (host vars,
> inventory file, playbook) and its value is supplied at the run time as
> extra vars (-e)
> This variable is actually a path variable, so i need to ensure that it is
> always ending in a '/'. As this variable is in use in a lot of places, i
> want to make sure that a '/' is appended to it in a single place as
> applying some filter to all the places is not feasible. My inventory file
> is something that is common for all playbooks, so i think i should append
> the '/' somewhere in the inventory file only.
> How can i do that ?
>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/46689f94-41b3-43fa-99d5-33ce90a6f86f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.