FL> - name: check if target server is CentOS 6 or Ubuntu 14
FL> fail: msg='unsupported platform detected!'
FL> when: (ansible_distribution != "CentOS" and
FL> ansible_distribution_major_version != "6") or (ansible_distribution !=
FL> "Ubuntu" and ansible_distribution_major_version != "14")
This logic seems wrong to me. With
"msg": "distro is CentOS and version is 6"
then your when turns into
when: (False and False) or (True and True)
aka
when: False or True
aka True. Right?
I think you want something more like
when: NOT (CentOS 6 or Ubuntu 14)
than like
when: (not CentOS 6) or (not Ubuntu 14)
Because you're always going to be not one of those things -- you need to
negate the whole or.
-Josh ([email protected])
This email is intended for the person(s) to whom it is addressed and may
contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use,
distribution, copying, or disclosure by any person other than the addressee(s)
is strictly prohibited. If you have received this email in error, please notify
the sender immediately by return email and delete the message and any
attachments from your system.
--
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/22139.6485.524597.108454%40gargle.gargle.HOWL.
For more options, visit https://groups.google.com/d/optout.