Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evrardjp/ansible-keepalived
Keepalived role for ansible deployment
https://github.com/evrardjp/ansible-keepalived
ansible ansible-role centos7 centos8 debian high-availability keepalived keepalived-role notification-script openstack-ansible opensuse ubuntu1604 ubuntu1804 ubuntu2004 ubuntu2204 vrrp
Last synced: 23 days ago
JSON representation
Keepalived role for ansible deployment
- Host: GitHub
- URL: https://github.com/evrardjp/ansible-keepalived
- Owner: evrardjp
- License: apache-2.0
- Created: 2015-08-27T10:37:43.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-08-25T08:51:35.000Z (about 1 year ago)
- Last Synced: 2024-09-30T17:41:41.140Z (about 1 month ago)
- Topics: ansible, ansible-role, centos7, centos8, debian, high-availability, keepalived, keepalived-role, notification-script, openstack-ansible, opensuse, ubuntu1604, ubuntu1804, ubuntu2004, ubuntu2204, vrrp
- Language: Jinja
- Homepage:
- Size: 272 KB
- Stars: 98
- Watchers: 5
- Forks: 98
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Keepalived
=========This role installs keepalived and configures it according to the variables you'll pass to the role.
Requirements
------------No fancy requirements. Only package and file management in the role.
Starting with this role version 4.0.0, the following minimum OS versions are required:
- Ubuntu: 15.04 or above
- Debian: Jessie or above
- CentOS: 7 or aboveFor older OSes, please use a previous version of this role.
Role Variables
--------------By default, this role doesn't configure keepalived, it barely installs it. This way keepalived is fully flexible based on what you give as input.
Examples are given in the vars folder. Don't try them immediately, they won't work! (You need to define VIPs, passwords, etc.). The examples are only a source of inspiration.The main variables are:
* keepalived_instances: This is a mandatory dict. It gathers information about the vips, the prefered state (master/backup), the VRRIP IDs and priorities, the password used for authentication... This is where things like nopreempt are configured. nopreempt allows to stay in backup state (instead of preempting to configured master) on a master return of availability, after its failure. Please check the template for additional settings support, and original keepalived documentation for their configuration.
* keepalived_sync_groups: This is an optional dict. It groups items defined in keepalived_instances, and (if desired) allow the configuration of notifications scripts per group of keepalived_instances. Notification scripts are triggered on keepalived's state change and are facultative.
* keepalived_virtual_servers: This is an optional dict. It sets up a virtual server + port and balances traffic over real_servers given in a sub dict. Checkout the _example.yaml files in vars/ to see a sample on how to use this dict. The official documentation for keepalived's virtual_server can be found [here](https://github.com/acassen/keepalived/blob/master/doc/keepalived.conf.SYNOPSIS#L393).
* keepalived_scripts: This is an optional dict where you could have checking scripts that can trigger the notifications scripts.
* keepalived_bind_on_non_local: This variable (defaulted to "False") determines whether the system that host keepalived will allow its apps to bind on non-local addresses. If you set it to true, this allows apps to bind (and start) even if they don't currently have the VIP for example.Please check the examples for more explanations on how these dicts must be configured.
You can find an example playbook in this README, and other examples in `tests/`, including
examples on the variables configuration.Other editable variables are listed in the defaults/main.yml. Please read the explanation there if you want to override them.
An example of a notification script is also given, in the files folder.Antoher good source of informations is the official keepalived [GIT repo](https://github.com/acassen/keepalived) where you can find a fully commented [keepalived.conf](https://github.com/acassen/keepalived/blob/master/doc/keepalived.conf.SYNOPSIS). Also various official samples are [provided](https://github.com/acassen/keepalived/tree/master/doc/samples).
Dependencies
------------No dependency
Example Playbook
----------------See it in tests/keepalived-install-example.yml
License
-------Apache2
Author Information
------------------Jean-Philippe Evrard