On Monday, 21 January 2019 18:48:51 CET Sahar wrote:
> Any idea how can I fix the below error?
>
>
> tasks:
>
>
> - name: check the state (primary/secondary/standalone)
> asa_command:
> commands:
> - 'show version | i "{{ OldImage }}"'
> register: state
>
>
> - include: reboot.yml
> when: '"{{ OldImage }}" in state.stdout'
>
>
>
> Error I'm receiving:
>
>
> TASK [include]
> *********************************************************************************************************************
> [WARNING]: when statements should not include jinja2 templating delimiters
> such as {{ }} or {% %}. Found: "{{ OldImage }}" in
> state.stdout
> skipping: [Fw4Script-01.tor.bellnhs.int]
> [WARNING]: when statements should not include jinja2 templating delimiters
> such as {{ }} or {% %}. Found: "{{ OldImage }}" in
> state.stdout
> skipping: [Fw4Script-02.tor.bellnhs.int]
As the error message say, you can't use {{ }} in when so just do
when: OldImage in state.stdout
--
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/11732955.liqkLmbh1j%40x1.
For more options, visit https://groups.google.com/d/optout.