cluster_hosts.yml 1.1 KB

1234567891011121314151617181920
  1. ---
  2. etcd_hosts: "{{ (groups['tag_host-type-etcd']|default([]))
  3. | intersect((groups['tag_clusterid-' ~ cluster_id]|default([])))
  4. | intersect((groups['tag_environment-' ~ cluster_env]|default([]))) }}"
  5. lb_hosts: "{{ (groups['tag_host-type-lb']|default([]))
  6. | intersect((groups['tag_clusterid-' ~ cluster_id]|default([])))
  7. | intersect((groups['tag_environment-' ~ cluster_env]|default([]))) }}"
  8. master_hosts: "{{ (groups['tag_host-type-master']|default([]))
  9. | intersect((groups['tag_clusterid-' ~ cluster_id]|default([])))
  10. | intersect((groups['tag_environment-' ~ cluster_env]|default([]))) }}"
  11. node_hosts: "{{ (groups['tag_host-type-node']|default([]))
  12. | intersect((groups['tag_clusterid-' ~ cluster_id]|default([])))
  13. | intersect((groups['tag_environment-' ~ cluster_env]|default([]))) }}"
  14. nfs_hosts: "{{ (groups['tag_host-type-node']|default([]))
  15. | intersect((groups['tag_env-' ~ cluster_id]|default([]))) }}"