blob: 30df26162f992c234783e08141bb7ddd370938ad [file] [log] [blame]
---
- name: Determine whether host is in Region 1
set_fact:
region: 'dc-1'
when: groups['dc-1'] is defined and inventory_hostname in groups['dc-1']
- name: Determine whether host is in Region 2
set_fact:
region: 'dc-2'
when: groups['dc-2'] is defined and inventory_hostname in groups['dc-2']
- name: Determine whether host is in Region 3
set_fact:
region: 'dc-3'
when: groups['dc-3'] is defined and inventory_hostname in groups['dc-3']
- name: Add region to cache
cache:
key: "region"
value: "{{ region }}"