Hi
On Tue, May 31, 2016 at 03:40:29PM -0700, jepper wrote:
> I'm trying to create a template which contains a URL and must always have a /
> on the end. So if jenkins_master_url is 'https://xyz.com' ansible must add a /
>
> If someone could help me with the regex_replace I'd be most grateful:
>
> <buildServerUrl>{{ jenkins_master_url|regex_replace('??') }}</buildServerUrl>
>
How about:
<buildServerUrl>{{ jenkins_master_url +
(jenkins_master_url.endswith('/')?'/':'') }}</buildServerUrl>
?
Hope this help
--
Karl
--
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/20160601105708.GA13449%40macdonald.
For more options, visit https://groups.google.com/d/optout.