Evening everybody,

I just noticed something strange:

My playbook contains:
------------------
vars:
  lxc_version: 2.0
------------------

In the role, that is being called in the playbook, I had the following:
------------------
- name: debug
  debug: msg="When lxc_version is 1.0"
  when: lxc_version == "1.0"

- name: delete file
  file:
    dest=/some/path
    state=absent
  when: lxc_version == "1.0"
------------------

So, both tasks should be skipped, as the conditional is written in a
wrong way: 1.0 is recognized as a number, thus does not need to be
quoted. At least that's how I try to explain it. Feel free to correct
me...

BUT:

Only the debug task is shown as skipped, the file task is shown as
'not changed' but run (green instead of light blue on my machine).

If I change the lines to "when: lxc_version == 1.0" (without the
quoted 1.0), both tasks are shown as skipped.

Is this expected? I would have thought that skipped tasks are really
skipped and should thus be shown as such.

No?

Thanks,
Johannes

-- 
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/56E08759.9080509%40ojkastl.de.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to