Skip to content

Commit

Permalink
Merge branch 'delegated-facts' into 'master'
Browse files Browse the repository at this point in the history
feat: add gathering facts from all keeaplived host

See merge request dsi/interne/devops/ansible/simple-keepalived-ansible-role!1
  • Loading branch information
ggambini committed Feb 22, 2023
2 parents c9776ff + 3fcfd54 commit 396c249
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
---
- name: When unicast enable, gather facts from hosts regardless of limit or tags
setup:
delegate_to: "{{ item }}"
delegate_facts: True
when:
- hostvars[item]['ansible_default_ipv4'] is not defined
- keepalived_unicast|default(false)|bool
with_items:
- "{{ keepalived_master }}"
- "{{ keepalived_backup }}"
tags: always

- name: Main configuration file from template
template:
src: "keepalived.conf.j2"
Expand Down

0 comments on commit 396c249

Please sign in to comment.