Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tleguern/ansible-role-keepalived
Configure keepalived with Ansible the way you want
https://github.com/tleguern/ansible-role-keepalived
ansible ansible-role keepalived
Last synced: 21 days ago
JSON representation
Configure keepalived with Ansible the way you want
- Host: GitHub
- URL: https://github.com/tleguern/ansible-role-keepalived
- Owner: tleguern
- License: isc
- Created: 2019-09-09T14:19:52.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-18T12:53:15.000Z (8 months ago)
- Last Synced: 2024-10-11T02:45:24.160Z (about 1 month ago)
- Topics: ansible, ansible-role, keepalived
- Homepage:
- Size: 20.5 KB
- Stars: 4
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ansible-keepalived
[![builds.sr.ht status](https://builds.sr.ht/~tleguern/ansible-role-keepalived.svg)](https://builds.sr.ht/~tleguern/ansible-role-keepalived?)
This role configures keepalived without arm twisting. Write the configuration the way you want.
Automatic testing is provided using molecule's delegated driver and .
## Requirements
Another role or deployment method must be devised to use notification scripts such as `notify_backup`, `notify_fault` and `notify_master`.
## Role Variables
* `keepalived_global_defs`: configure the `global_defs` block ;
* `keepalived_vrrp_scripts`: configure one or more `vrrp_script` ;
* `keepalived_vrrp_instances`: configure one or more `vrrp_instance`.
* `keepalived_virtual_servers`: configure one or more `virtual_servers`.
* `keepalived_vrrp_sync_group`: configure one or more `vrrp_sync_group`.
* `keepalived_flags`: flags to pass to the keepalived daemon (set `--log-detail --log-facility=7` by default)## Dependencies
The `keepalived` package should be installed first using a tool such as Packer.
However if it is not part of your toolchain the variable `keepalived_install` can be set to `True` to provoke an installation.## Example Playbook
```yaml
- hosts: wwwmaster
vars:
- keepalived_global_defs: |
router_id 1
- keepalived_vrrp_scripts:
- name: haproxy
content: |
script "killall -0 haproxy"
- keepalived_vrrp_instances:
- name: HAPROXY
content: |
virtual_router_id 42
state MASTER
unicast_src_ip "{{ master_ip }}"
unicast_peer {
"{{ backup_ip }}"
}
interface eth0
virtual_ipaddress {
"{{ vip_front }}"
}
track_script {
haproxy
}
- keepalived_vrrp_sync_group:
- name: VRRP-GRP-01
vrrp_group_instances_member:
- HAPROXY
- WEB
roles:
- role: ansible-keepalived
```## License
ISC
## Contributing
Either send [send GitHub pull requests](https://github.com/tleguern/ansible-role-keepalived) or [send patches on SourceHut](https://lists.sr.ht/~tleguern/misc).
## Author Information
This role was created in 2018 by Tristan Le Guern on the behalf of Deveryware.