Skip to content

Commit 50dcf97

Browse files
committed
feat: Install NGINX Plus HA keepalived
1 parent 4fb4402 commit 50dcf97

File tree

5 files changed

+21
-3
lines changed

5 files changed

+21
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ BREAKING CHANGES:
1010

1111
FEATURES:
1212

13-
- Add support for installing the NGINX Plus HA keepalived package.
14-
- Add validation tasks to check the Ansible version, the Jinja2 version, and whether the required Ansible collections for this role are installed.
13+
- Add support for installing the NGINX Plus HA keepalived module.
14+
- Add validation tasks to check the Ansible version, the Jinja2 version, whether the required Ansible collections for this role are installed, and whether you are trying to install a valid NGINX module.
1515
- Add support for installing NGINX Open Source on Alpine Linux 3.20.
1616
- Add support for installing NGINX Agent on Ubuntu noble.
1717
- Bump the minimum version of Ansible supported to `2.16`, whilst clarifying that Ansible `2.18` is not supported at this stage.

defaults/main/keepalived.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
nginx_keepalived_conf_enable: false

molecule/plus/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
- encrypted-session
1818
- geoip
1919
- geoip2
20-
- ha-keepalived
2120
- headers-more
2221
- image-filter
2322
- lua
@@ -30,3 +29,4 @@
3029
- set-misc
3130
- subs-filter
3231
- xslt
32+
nginx_keepalived_conf_enable: true

tasks/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@
7474
- nginx_state != 'absent'
7575
tags: nginx_logrotate_config
7676

77+
- name: Configure NGINX Plus keepalived HA
78+
ansible.builtin.include_tasks: "{{ role_path }}/tasks/modules/install-keepalived.yml"
79+
when:
80+
- nginx_keepalived_conf_enable | bool
81+
- nginx_type == 'plus'
82+
- nginx_state != 'absent'
83+
tags: nginx_logrotate_config
84+
7785
- name: Install NGINX Amplify
7886
ansible.builtin.include_tasks: "{{ role_path }}/tasks/amplify/install-amplify.yml"
7987
when: nginx_amplify_enable | bool

tasks/modules/install-keepalived.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
- name: Install NGINX Plus HA keepalived package
3+
ansible.builtin.package:
4+
name: nginx-ha-keepalived
5+
state: present
6+
when:
7+
- ansible_facts['os_family'] == 'Alpine'
8+
- ansible_facts['distribution'] == 'Amazon'

0 commit comments

Comments
 (0)