I don't get the error anymore, but it doesn't work as expected either. I will skip my both devices which is not expected:
TASK [include] ********************************************************************************************************************* skipping: [Fw4Script-01.tor.int] skipping: [Fw4Script-02.tor.int] On Mon, Jan 21, 2019 at 12:56 PM Kai Stian Olstad < [email protected]> wrote: > 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. > -- 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/CAFnHJWJSkaiyBRvud6GHJJe5kBD96PmtS7W2JuVTkW5gZ7ba4w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
