hpc-cloud/mariadb.yml

14 lines
792 B
YAML
Raw Normal View History

---
# Run all plays as root.
- hosts: databases
become: True
roles:
- mariadb
2017-10-17 17:12:52 +02:00
vars:
hostname_node0: "{{ hostvars[groups['databases'][0]]['ansible_hostname'] }}"
hostname_node1: "{{ hostvars[groups['databases'][1]]['ansible_hostname'] }}"
hostname_node2: "{{ hostvars[groups['databases'][2]]['ansible_hostname'] }}"
ip_node0: "{{ hostvars[groups['databases'][0]]['listen_ip'] | default(hostvars[groups['databases'][0]]['ansible_default_ipv4']['address']) }}"
ip_node1: "{{ hostvars[groups['databases'][1]]['listen_ip'] | default(hostvars[groups['databases'][1]]['ansible_default_ipv4']['address']) }}"
ip_node2: "{{ hostvars[groups['databases'][2]]['listen_ip'] | default(hostvars[groups['databases'][2]]['ansible_default_ipv4']['address']) }}"