An example of what I think might work.

   - name: Verify ruby version is 1.9

     shell: echo /opt/vagrant_ruby/bin/ruby --version

     register: status

   - fail: "This is bad version" 

     when: var=status.stdout_lines != "1.9"

On Friday, November 20, 2015 at 11:51:57 AM UTC-8, MIkeJ wrote:
>
> Hello,
>
>
> I want to run a check in my playbook for the current version of ruby 
> package installed and if its not the version Im expecting then fail the 
> play.
>
>
> How can I go about doing this?
>
>
> Thanks
>
> Mike
>

-- 
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/a6deaf19-3c68-4adb-9338-2f6bbb5672ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to