I am trying to write an Ansible playbook that only compiles Nginx if it\'s not already present and at the current version. However it compiles every time which is undesirable.>
Try:
when: nginxVersion.stdout != 'nginx version: nginx/1.8.0'
or
when: '"nginx version: nginx/1.8.0" not in nginxVersion.stdout'