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
- 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"