I want to add a simple check on the version of nginx.
But version with conditionals won't work :(
- name: check for install nginx
shell: nginx -v 2>&1 | awk '{print $3}' | sed -e 's/nginx\///g'
register: nginx
- debug: msg="{{ nginx.stdout }}"
- name: download nginx latest version
shell: wget -N http://nginx.org/download/nginx-{{ nginx_version
}}.tar.gz -P /usr/src
when: "{{ nginx_version }} != {{ nginx.stdout }}"
Result:
error while evaluating conditional: 1.6.1 != 1.6.1
--
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/78023921-7c33-4df2-93ab-c92ad5585c00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.