Skip to content

Instantly share code, notes, and snippets.

@halberom
Created October 20, 2017 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halberom/e2c7e1b85d17b495e15fff9a1979f312 to your computer and use it in GitHub Desktop.
Save halberom/e2c7e1b85d17b495e15fff9a1979f312 to your computer and use it in GitHub Desktop.
ansible - example of using dynamic group to run serial:1 over multiple plays
---
- hosts: all
connection: local
gather_facts: False
serial: 1
tasks:
- add_host:
name: "{{ inventory_hostname }}"
groups: "only_one"
- hosts: only_one
tasks:
- do something
- hosts: only_one
tasks:
- do something else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment