diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b86c65be..634981d93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ BREAKING CHANGES: FEATURES: - Add support for installing NGINX Open Source on Alpine Linux 3.20. +- Add support for installing NGINX Agent on Ubuntu noble. DOCUMENTATION: diff --git a/README.md b/README.md index 068908597..0e07bd5c7 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ To use the role, include the following task in your playbook: ## Platforms -The NGINX Ansible role supports almost all platforms supported by [NGINX Open Source](https://nginx.org/en/linux_packages.html), [NGINX Plus](https://docs.nginx.com/nginx/technical-specs/), the [NGINX Agent](https://docs.nginx.com/nginx-agent/technical-specifications/), and the [NGINX Amplify agent](https://github.com/nginxinc/nginx-amplify-doc/blob/master/amplify-faq.md#21-what-operating-systems-are-supported): +The NGINX Ansible role supports almost all platforms supported by [NGINX Open Source](https://nginx.org/en/linux_packages.html), [NGINX Plus](https://docs.nginx.com/nginx/technical-specs/), [NGINX Agent](https://docs.nginx.com/nginx-agent/technical-specifications/), and the [NGINX Amplify agent](https://github.com/nginxinc/nginx-amplify-doc/blob/master/amplify-faq.md#21-what-operating-systems-are-supported): ### NGINX Open Source @@ -267,6 +267,7 @@ SUSE/SLES: Ubuntu: - focal (20.04) - jammy (22.04) + - noble (24.04) ``` ### NGINX Amplify Agent @@ -315,7 +316,7 @@ Working functional playbook examples can be found in the **[`molecule/`](https:/ | Name | Description | | ---- | ----------- | -| **[`agent/converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/agent/converge.yml)** | Install and configure the NGINX Agent to connect to the NGINX One SaaS control plane on F5 Distributed Cloud | +| **[`agent/converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/agent/converge.yml)** | Install and configure NGINX Agent to connect to the NGINX One SaaS control plane on F5 Distributed Cloud | | **[`amplify/converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/amplify/converge.yml)** | Install and configure the NGINX Amplify agent | | **[`default/converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/default/converge.yml)** | Install a specific version of NGINX, install various NGINX supported modules, tweak systemd and set up logrotate | | **[`distribution/converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/distribution/converge.yml)** | Install NGINX from the distribution's package repository instead of NGINX's package repository | diff --git a/molecule/agent/cleanup.yml b/molecule/agent/cleanup.yml index 502f5b0e7..de49d3397 100644 --- a/molecule/agent/cleanup.yml +++ b/molecule/agent/cleanup.yml @@ -25,7 +25,7 @@ - name: Get list of NGINX One dangling instance IDs ansible.builtin.uri: - url: https://{{ lookup('env', 'ONE_TENANT') }}.console.ves.volterra.io/api/nginx/one/namespaces/default/instances?paginated=false&filter_fields=hostname&filter_ops=IN&filter_values=almalinux-8|almalinux-9|alpine-3.17|alpine-3.18|alpine-3.19|alpine-3.20|amazonlinux-2|debian-bullseye|debian-bookworm|oraclelinux-8|oraclelinux-9|rhel-8|rhel-9|rockylinux-8|rockylinux-9|sles-15|ubuntu-focal|ubuntu-jammy + url: https://{{ lookup('env', 'ONE_TENANT') }}.console.ves.volterra.io/api/nginx/one/namespaces/default/instances?paginated=false&filter_fields=hostname&filter_ops=IN&filter_values=almalinux-8|almalinux-9|alpine-3.17|alpine-3.18|alpine-3.19|alpine-3.20|amazonlinux-2|debian-bullseye|debian-bookworm|oraclelinux-8|oraclelinux-9|rhel-8|rhel-9|rockylinux-8|rockylinux-9|sles-15|ubuntu-focal|ubuntu-jammy|ubuntu-noble method: GET headers: Authorization: APIToken {{ lookup('env', 'ONE_API_TOKEN') }} diff --git a/molecule/agent/molecule.yml b/molecule/agent/molecule.yml index 1aa45c733..2adbf4b1a 100644 --- a/molecule/agent/molecule.yml +++ b/molecule/agent/molecule.yml @@ -156,6 +156,14 @@ platforms: volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /sbin/init + - name: ubuntu-noble + image: ubuntu:noble + dockerfile: ../common/Dockerfile.j2 + privileged: true + cgroupns_mode: host + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:rw + command: /sbin/init provisioner: name: ansible log: true diff --git a/tasks/agent/install-agent.yml b/tasks/agent/install-agent.yml index 1eb704a43..00dfa5c3e 100644 --- a/tasks/agent/install-agent.yml +++ b/tasks/agent/install-agent.yml @@ -1,5 +1,5 @@ --- -- name: Configure NGINX Agent repository +- name: Manage NGINX Agent repository ansible.builtin.include_tasks: "{{ role_path }}/tasks/agent/setup-{{ ansible_facts['os_family'] | lower }}.yml" when: ansible_facts['os_family'] in ['Alpine', 'Debian', 'RedHat', 'Suse'] diff --git a/tasks/agent/setup-alpine.yml b/tasks/agent/setup-alpine.yml index d6f54b110..c50d405b8 100644 --- a/tasks/agent/setup-alpine.yml +++ b/tasks/agent/setup-alpine.yml @@ -1,5 +1,5 @@ --- -- name: (Alpine Linux) Add NGINX Agent repository +- name: (Alpine Linux) Configure NGINX Agent repository ansible.builtin.lineinfile: path: /etc/apk/repositories insertafter: EOF diff --git a/tasks/agent/setup-debian.yml b/tasks/agent/setup-debian.yml index e302343cc..8fb6a7d68 100644 --- a/tasks/agent/setup-debian.yml +++ b/tasks/agent/setup-debian.yml @@ -1,5 +1,5 @@ --- -- name: (Debian/Ubuntu) Add NGINX Agent repository +- name: (Debian/Ubuntu) Configure NGINX Agent repository ansible.builtin.apt_repository: filename: nginx-agent repo: deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://packages.nginx.org/nginx-agent/{{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_release'] | lower }} agent diff --git a/tasks/agent/setup-redhat.yml b/tasks/agent/setup-redhat.yml index b2c3a3e59..384c507f5 100644 --- a/tasks/agent/setup-redhat.yml +++ b/tasks/agent/setup-redhat.yml @@ -1,5 +1,5 @@ --- -- name: (AlmaLinux/Amazon Linux/Oracle Linux/RHEL/Rocky Linux) Add NGINX Agent repository +- name: (AlmaLinux/Amazon Linux/Oracle Linux/RHEL/Rocky Linux) Configure NGINX Agent repository ansible.builtin.yum_repository: name: nginx-agent file: nginx-agent diff --git a/tasks/agent/setup-suse.yml b/tasks/agent/setup-suse.yml index 44acae52e..713310dcc 100644 --- a/tasks/agent/setup-suse.yml +++ b/tasks/agent/setup-suse.yml @@ -1,5 +1,5 @@ --- -- name: (SLES) Add NGINX Agent repository +- name: (SLES) Configure NGINX Agent repository community.general.zypper_repository: name: nginx-agent repo: https://packages.nginx.org/nginx-agent/sles/{{ ansible_facts['distribution_major_version'] }} diff --git a/tasks/main.yml b/tasks/main.yml index be3cbeeda..3f82430f2 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -81,6 +81,5 @@ - name: Install NGINX Agent ansible.builtin.include_tasks: "{{ role_path }}/tasks/agent/install-agent.yml" - when: - - nginx_agent_enable | bool + when: nginx_agent_enable | bool tags: nginx_install_agent