Skip to content

Instantly share code, notes, and snippets.

@arcimboldo
Created April 12, 2013 17:25
Show Gist options
  • Save arcimboldo/5373652 to your computer and use it in GitHub Desktop.
Save arcimboldo/5373652 to your computer and use it in GitHub Desktop.
---
- name: Collecting facts
hosts: all
gather_facts: yes
vars:
is_ubuntu: "'${ansible_distribution}' == 'Ubuntu'"
is_centos: "'${ansible_distribution}' == 'CentOS'"
- name: new play
hosts: all
tasks:
- action: debug msg="I am ubuntu"
only_if: $is_ubuntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment