{"id":19402396,"url":"https://github.com/robertdebock/ansible-role-keepalived","last_synced_at":"2025-04-24T07:31:53.055Z","repository":{"id":40413750,"uuid":"311624800","full_name":"robertdebock/ansible-role-keepalived","owner":"robertdebock","description":"Install and configure keepalived","archived":false,"fork":false,"pushed_at":"2024-04-26T13:52:21.000Z","size":127,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T02:19:52.831Z","etag":null,"topics":["ansible","keepalived","molecule","networking","playbook","tox"],"latest_commit_sha":null,"homepage":"https://robertdebock.nl/","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertdebock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"robertdebock"}},"created_at":"2020-11-10T10:35:36.000Z","updated_at":"2024-05-27T10:56:18.578Z","dependencies_parsed_at":"2023-11-11T10:22:42.311Z","dependency_job_id":"7d5a37ae-33fa-477b-92e8-083830eaf475","html_url":"https://github.com/robertdebock/ansible-role-keepalived","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-keepalived","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-keepalived/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-keepalived/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-keepalived/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertdebock","download_url":"https://codeload.github.com/robertdebock/ansible-role-keepalived/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223944932,"owners_count":17229545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","keepalived","molecule","networking","playbook","tox"],"created_at":"2024-11-10T11:23:29.904Z","updated_at":"2024-11-10T11:23:30.493Z","avatar_url":"https://github.com/robertdebock.png","language":"Jinja","funding_links":["https://github.com/sponsors/robertdebock"],"categories":[],"sub_categories":[],"readme":"# [Ansible role keepalived](#keepalived)\n\nInstall and configure keepalived\n\n|GitHub|GitLab|Downloads|Version|\n|------|------|---------|-------|\n|[![github](https://github.com/robertdebock/ansible-role-keepalived/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-keepalived/actions)|[![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-keepalived/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-keepalived)|[![downloads](https://img.shields.io/ansible/role/d/robertdebock/keepalived)](https://galaxy.ansible.com/robertdebock/keepalived)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-keepalived.svg)](https://github.com/robertdebock/ansible-role-keepalived/releases/)|\n\n## [Example Playbook](#example-playbook)\n\nThis example is taken from [`molecule/default/converge.yml`](https://github.com/robertdebock/ansible-role-keepalived/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release.\n\n```yaml\n---\n- name: Converge\n  hosts: all\n  become: true\n  gather_facts: true\n\n  roles:\n    - role: robertdebock.keepalived\n      keepalived_vrrp_instances:\n        - name: VI_1\n          state: MASTER\n          interface: eth0\n          unicast_src_ip: \"172.17.0.6\"\n          secondary_private_ip: \"172.17.0.7\"\n          virtual_router_id: 51\n          priority: 255\n          authentication:\n            auth_type: PASS\n            auth_pass: \"12345\"\n          virtual_ipaddresses:\n            - name: \"172.17.0.8\"\n              cidr: 16\n```\n\nThe machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/robertdebock/ansible-role-keepalived/blob/master/molecule/default/prepare.yml):\n\n```yaml\n---\n- name: Prepare\n  hosts: all\n  become: true\n  gather_facts: false\n\n  roles:\n    - role: robertdebock.bootstrap\n```\n\nAlso see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles.\n\n## [Role Variables](#role-variables)\n\nThe default values for the variables are set in [`defaults/main.yml`](https://github.com/robertdebock/ansible-role-keepalived/blob/master/defaults/main.yml):\n\n```yaml\n---\n# defaults file for keepalived\n\n# By default, there is not configuration, because there is no \"sane default\" to\n# set. You'll have to set it yourself. Here are a few hints.\n#\n# Have a look in `molecule/default/converge.yml` for an example.\n# You do not need to set the state to `MASTER`, all nodes can also be set to\n# `BACKUP`, in which case a random host will be selected to configure the\n# virtual IP. Setting `state` to `MASTER` only initially sets that host to be\n# the master. Over time, other nodes will likely become master.\n#\n# You can see the configure virtual IP using `ip addr list eth0`.\n\n# keepalived_vrrp_instances:\n#   # `name` defines an individual instance of the VRRP protocol running on an interface.\n#   - name: VI_1\n#   # `state` defines the initial state that the instance should start in.\n#     state: MASTER\n#   # `interface` defines the interface that VRRP runs on.\n#     interface: eth0\n#   # `unicast_src_ip` contains the primary address for unicasts.\n#     unicast_src_ip: \"192.168.1.1\"\n#   # `secondary_private_ip` refers the the peer's unicast address.\n#     secondary_private_ip: \"192.168.1.2\"\n#   # `virtual_router_id` is the unique identifier.\n#     virtual_router_id: 51\n#   # `priority` is the advertised priority.\n#     priority: 255\n#   # `check_status_command` will make +3 to priority if command return is 0 (optional). example:\n#     check_status_command: /sbin/postfix status\n#   # `authentication` specifies the information necessary for servers participating in VRRP to authenticate with each other.\n#     authentication:\n#       auth_type: PASS\n#       auth_pass: 12345\n#   # `virtual_ipaddress` defines the IP addresses (there can be multiple) that VRRP is responsible for.\n#     virtual_ipaddresses:\n#       - name: \"192.168.122.200\"\n#         cidr: 24\nkeepalived_vrrp_instances: []\n```\n\n## [Requirements](#requirements)\n\n- pip packages listed in [requirements.txt](https://github.com/robertdebock/ansible-role-keepalived/blob/master/requirements.txt).\n\n## [State of used roles](#state-of-used-roles)\n\nThe following roles are used to prepare a system. You can prepare your system in another way.\n\n| Requirement | GitHub | GitLab |\n|-------------|--------|--------|\n|[robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap)|\n\n## [Context](#context)\n\nThis role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information.\n\nHere is an overview of related roles:\n![dependencies](https://raw.githubusercontent.com/robertdebock/ansible-role-keepalived/png/requirements.png \"Dependencies\")\n\n## [Compatibility](#compatibility)\n\nThis role has been tested on these [container images](https://hub.docker.com/u/robertdebock):\n\n|container|tags|\n|---------|----|\n|[Alpine](https://hub.docker.com/r/robertdebock/alpine)|all|\n|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|9|\n|[Debian](https://hub.docker.com/r/robertdebock/debian)|all|\n|[Fedora](https://hub.docker.com/r/robertdebock/fedora)|all|\n|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|all|\n\nThe minimum version of Ansible required is 2.12, tests have been done to:\n\n- The previous version.\n- The current version.\n- The development version.\n\nIf you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-keepalived/issues).\n\n## [License](#license)\n\n[Apache-2.0](https://github.com/robertdebock/ansible-role-keepalived/blob/master/LICENSE).\n\n## [Author Information](#author-information)\n\n[robertdebock](https://robertdebock.nl/)\n\nPlease consider [sponsoring me](https://github.com/sponsors/robertdebock).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdebock%2Fansible-role-keepalived","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertdebock%2Fansible-role-keepalived","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdebock%2Fansible-role-keepalived/lists"}