Please ignore this issue. It was a mistake in the next part of the play 
book that is causing the port to come twice. 

On Sunday, April 7, 2019 at 1:03:34 AM UTC+5:30, Sri Krishna G wrote:
>
> I have a list of strings like :
>  
> [hosts]
> 10.100.0.1
> 10.100.0.2
> 10.100.0.3
>
> I am following the example under : 
> https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html to 
> "add "https://"; prefix to each item in a list"
> In my case I am appending the port number at the end of every item in the 
> list and joining them with a "," to get a string at the end. I am expecting 
> to see something like:
>
>
> *10.100.0.1:2181,10.100.0.2:2181,10.100.0.3:2181*I am creating a variable 
> as:
>
> zookeeper_masters: "{{'zk://' + hosts | map('regex_replace', '^(.*)$', 
> '\\1:2181') | join(',')}}"
>
>
> My result comes as:
> "zk://10.100.0.1:2181:2181,10.100.0.2:2181:2181,10.100.0.3:2181:2181"
>
> Can some one point out as to why I am getting the port number twice?
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/280b5378-e2c3-41fa-a6be-77557e5d555e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to