Apache License 2.0

项目介绍

evrardjp/ansible-keepalived 是一个托管在 GitHub 上的开源项目,主要使用 Jinja 编写,采用 Apache License 2.0 许可证,目前获得 108 个 Star、104 次 Fork。

仓库全名
evrardjp/ansible-keepalived
开源许可证
Apache License 2.0
Star 数
108
Fork 数
104
未关闭 Issue
6

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 above For older OSes, please use a previous version of this role…

完整内容见 GitHub 原始 README 或本页 。

常见问题

ansible-keepalived 用什么语言开发?

主要使用 Jinja 编写,采用 Apache License 2.0 许可证,目前有 108 个 Star。

ansible-keepalived 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 ansible-keepalived 的源码?

可以直接克隆仓库:git clone https://github.com/evrardjp/ansible-keepalived.git,默认分支为 master;安装与运行步骤见仓库 README。

ansible-keepalived 最近还在维护吗?

仓库最近一次更新为 2025年2月14日,当前有 6 个未关闭 Issue;Star 数为 108,可作为社区活跃度的参考。

关于

Keepalived role for ansible deployment

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

Jinja
Shell

Release

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 above

For 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.
  • 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 where you can find a fully commented keepalived.conf. Also various official samples are provided.

Dependencies

No dependency

Example Playbook

See it in tests/keepalived-install-example.yml for a simple example (the one used in CI gating). Please also check tests/keepalived-install-complex-example.yml for a more detailed example with more features (not gated).

Contributing

Please read our CONTRIBUTING.md

License

Apache2

Author Information

Jean-Philippe Evrard

评论

暂无评论