Created
March 16, 2016 08:12
-
-
Save knakayama/5172a2da9eb2199acb87 to your computer and use it in GitHub Desktop.
This file contains hidden or 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: Ansible tips | |
connection: local | |
hosts: localhost | |
tasks: | |
- name: Ping only if OSX | |
ping: | |
when: "{{ lookup('pipe', 'uname -s') | match('Darwin') }}" | |
- name: Ping only if Linux | |
ping: | |
when: "{{ lookup('pipe', 'uname -s') | match('Linux') }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment