Skip to content

Instantly share code, notes, and snippets.

@halberom
Last active August 29, 2015 14:02
Show Gist options
  • Save halberom/8dde6312a017541cfd09 to your computer and use it in GitHub Desktop.
Save halberom/8dde6312a017541cfd09 to your computer and use it in GitHub Desktop.
conditional include idea
---
- include: install.yml
when: 'etcd' in groups
- include: cleanup.yml
when: 'etcd' not in groups
---
- include: install.yml
when: 'nginx' in groups
- include: cleanup.yml
when: 'nginx' not in groups
---
- name: Install and configure etcd
hosts: vms
sudo: True
roles:
- { role: etcd, tags: etcd }
- nginx
- etcdctl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment