You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
698 B

  1. ---
  2. - set_fact: etcd_access_address="{{ access_ip | default(ip | default(ansible_default_ipv4['address'])) }}"
  3. - set_fact: etcd_peer_url="http://{{ etcd_access_address }}:2380"
  4. - set_fact: etcd_client_url="http://{{ etcd_access_address }}:2379"
  5. - set_fact:
  6. etcd_access_addresses: |-
  7. {% for item in groups['etcd'] -%}
  8. http://{{ hostvars[item].etcd_access_address }}:2379{% if not loop.last %},{% endif %}
  9. {%- endfor %}
  10. - set_fact:
  11. etcd_member_name: |-
  12. {% for host in groups['etcd'] %}
  13. {% if inventory_hostname == host %}{{"etcd"+loop.index|string }}{% endif %}
  14. {% endfor %}
  15. - set_fact:
  16. is_etcd_master: "{{ inventory_hostname in groups['etcd'] }}"