mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-30 21:41:53 +08:00
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>
39 lines
989 B
YAML
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
|