Skip to content

Instantly share code, notes, and snippets.

@gregswift
Last active August 29, 2015 14:04
Show Gist options
  • Save gregswift/a1c72dfd70f6736b6748 to your computer and use it in GitHub Desktop.
Save gregswift/a1c72dfd70f6736b6748 to your computer and use it in GitHub Desktop.
playbook,s roles, and tags oh my
---
- hosts: all
vars:
- port: 8080
roles:
- { role: plight, tags: ['disable'] }
tasks:
- name: Wait for all active connections to cease
wait_for: host=0.0.0.0 port={{ port }} state=drained exclude_hosts={{ exclude_hosts }}
- name: Update system
yum: name=* state=latest
- hosts: all
roles:
- { role: plight, tags: ['enable'] }
---
- hosts: all
vars:
- port: 8080
roles:
- { role: plight, tags: ['disable'] }
tasks:
- name: Wait for all active connections to cease
wait_for: host=0.0.0.0 port={{ port }} state=drained exclude_hosts={{ exclude_hosts }}
- name: Update system
yum: name=* state=latest
- hosts: all
roles:
- { role: plight, tags: ['enable'] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment