Skip to content

Instantly share code, notes, and snippets.

@quicksnap
Created December 6, 2013 22:28
Show Gist options
  • Select an option

  • Save quicksnap/7833236 to your computer and use it in GitHub Desktop.

Select an option

Save quicksnap/7833236 to your computer and use it in GitHub Desktop.
---
# This is running on four hosts. ie:
# [webservers]
# myhost-A
# myhost-B
# myhost-C
# myhost-D
#
# myhost-C is not special.
- my_module: >
any=options
you=want
# Now that my_module has run on all four hosts,
# they have custom facts. "my_fact", "my_fact.whatever"
# Except for myhost-C. That host has none defined.
- template: >
src=/files/server_{{ inventory_hostname or something }}/template.j2
dest=/var/www/bungus
when: my_fact is defined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment