Created
April 24, 2015 05:15
-
-
Save polster/76441b57b28adb89aac1 to your computer and use it in GitHub Desktop.
How to check via Ansible if binary is installed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Register maven installation status | |
command: which mvn | |
changed_when: false | |
failed_when: false | |
register: mvn_installed | |
- name: Check maven installation status | |
fail: | |
msg: "Maven appears to be missing, install first" | |
when: mvn_installed|failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A small update on this for people who may want a more current working version: