Works, thank you!

On Friday, November 3, 2017 at 11:32:36 AM UTC-7, Kai Stian Olstad wrote:
>
> On 03. nov. 2017 18:14, [email protected] <javascript:> wrote: 
> > It looks like this is working, but I get an error.  Does anyone know the 
> > proper way to do this?  Thanks! 
> > 
> > 
> > - name: configure hostname 
> >    ios_config: 
> >      commands: 
> >        - ip domain-name {{ domain_name }} 
> >    when: not ansible_net_config | search("(ip domain-name {{ domain_name 
> }}|ip domain name {{ domain_name }})" 
>
>
> According to the template documentation[1] ~ (tilde) is used for 
> concatenation of strings, so is just a matter of concatenate the elements. 
>
> when: not ansible_net_config | search("(ip domain-name " ~ domain_name ~ 
> "|ip domain name " ~ domain_name ~ ")") 
>
>
> [1] http://jinja.pocoo.org/docs/dev/templates/#other-operators 
>
> -- 
> Kai Stian Olstad 
>

-- 
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/59e25727-bdb4-4ecb-b86b-005e56bad458%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to