main.yaml 1.1 KB

123456789101112131415161718192021222324
  1. ---
  2. etcd_service: "{{ 'etcd' if not openshift.common.is_containerized else 'etcd_container' }}"
  3. etcd_interface: "{{ ansible_default_ipv4.interface }}"
  4. etcd_client_port: 2379
  5. etcd_peer_port: 2380
  6. etcd_url_scheme: http
  7. etcd_peer_url_scheme: http
  8. etcd_initial_cluster_state: new
  9. etcd_initial_cluster_token: etcd-cluster-1
  10. etcd_initial_advertise_peer_urls: "{{ etcd_peer_url_scheme }}://{{ hostvars[inventory_hostname]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_peer_port }}"
  11. etcd_listen_peer_urls: "{{ etcd_peer_url_scheme }}://{{ hostvars[inventory_hostname]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_peer_port }}"
  12. etcd_advertise_client_urls: "{{ etcd_url_scheme }}://{{ hostvars[inventory_hostname]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_client_port }}"
  13. etcd_listen_client_urls: "{{ etcd_url_scheme }}://{{ hostvars[inventory_hostname]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_client_port }}"
  14. etcd_data_dir: /var/lib/etcd/
  15. os_firewall_use_firewalld: False
  16. os_firewall_allow:
  17. - service: etcd
  18. port: "{{etcd_client_port}}/tcp"
  19. - service: etcd peering
  20. port: "{{ etcd_peer_port }}/tcp"