Files
fedora-infra_ansible/roles/keepalived/tasks/main.yml
Michal Konecny 2ec055db6f Use first uppercase letter for all handlers
This will unify all the handlers to use first uppercase letter for
ansible-lint to stop complaining.

I went through all `notify:` occurrences and fixed them by running
```
set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep
-rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g"
```

Then I went through all the changes and removed the ones that wasn't
expected to be changed.

Fixes https://pagure.io/fedora-infrastructure/issue/12391

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-02-10 20:31:49 +00:00

39 lines
989 B
YAML

#
# role for keepalived
# This role needs several variables defined:
#
# keepalived_interface - interface to listen on
# keepalived_priority - priority of this host
# keepalived_ipaddress - virtual ip address on master host
#
---
- name: Install keepalived package
ansible.builtin.package: state=present name=keepalived
tags:
- packages
- keepalived
- name: Install keepalived template
ansible.builtin.template: src=keepalived.conf.j2 dest=/etc/keepalived/keepalived.conf
tags:
- config
- keepalived
notify:
- Restart keepalived
- name: Install keepalived failover script for host (or default)
ansible.builtin.copy: src={{ item }} dest=/usr/local/bin/keepalived-notify.sh mode=755
with_first_found:
- keepalived-notify.sh.{{ inventory_hostname }}
- keepalived-notify.sh
tags:
- config
- keepalived
- name: Make sure keepalived is set to start and is running
service: state=started enabled=true name=keepalived
tags:
- service
- keepalived