Skip to content

Instantly share code, notes, and snippets.

@sgargan
Created May 30, 2014 11:06
Show Gist options
  • Save sgargan/9d2c2a8b1a16e2a0581a to your computer and use it in GitHub Desktop.
Save sgargan/9d2c2a8b1a16e2a0581a to your computer and use it in GitHub Desktop.
Ansible extra vars resolution issue
cluster_name: dev
- hosts: localhost
connection: local
gather_facts: False
tasks:
- {include: plays/create_instance.yml,
tags: {
hostname: 'blah_server1',
ansible_groups: ["{{cluster_name}}", 'blah-servers'],
cluster_name: "{{cluster_name}}"
}
}
- debug: msg="creating instance for cluster '{{ cluster_name }}' '{{tags}}' "
[localhost]
127.0.0.1 ansible_python_interpreter=/usr/local/bin/python
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment