-
-
Save arbabnazar/255ac55bd357f94b814a2cafc3397f9f to your computer and use it in GitHub Desktop.
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: 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