Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Ubuntu 24.04 #833

Merged
merged 12 commits into from
Sep 9, 2024
2 changes: 1 addition & 1 deletion ansible/group_vars/all/vars.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
supported_ansible_version: {full: 2.10.3, major: 2, minor: 10, revision: 3}
supported_ansible_version: {full: 2.17.3, major: 2, minor: 17, revision: 3}
matthewandrews marked this conversation as resolved.
Show resolved Hide resolved
14 changes: 14 additions & 0 deletions ansible/roles/augeas/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,17 @@
- packages
- augeas

- name: install augeas (Ubuntu 24.04)
apt:
pkg:
- libaugeas0
- augeas-lenses
- augeas-tools
- python3-augeas
- python3-libxml2
- libpython3.10
matthewandrews marked this conversation as resolved.
Show resolved Hide resolved
state: latest
when: ansible_os_family == "Debian" and ansible_distribution_version == "24.04"
tags:
- packages
- augeas
35 changes: 35 additions & 0 deletions ansible/roles/common/tasks/setfacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,41 @@
tags:
- setfacts

- name: set ubuntu-24.04 variables - overrides
set_fact:
tomcat: "{{ tomcat | default('tomcat10') }}"
tomcat_user: "{{ tomcat_user | default('tomcat') }}"
when: ansible_os_family == "Debian" and ansible_distribution_version == "24.04"
tags:
- setfacts

- name: set ubuntu-24.04 variables
set_fact:
libtcnative: "libtcnative-1"
tomcat_package: "{{ tomcat }}"
tomcat_user: "{{ tomcat_user }}"
tomcat_conf: "/etc/default/{{ tomcat }}"
tomcat_conf_dir: "/etc/{{ tomcat }}"
tomcat_log_dir: "/var/log/{{ tomcat }}"
apache: "apache2"
nginx: "nginx"
postfix: "postfix"
mysql_service: "mysql"
mysql: "mysql-server-8.0"
cassandra_yaml: "/etc/cassandra/cassandra.yaml"
cassandra_user: "cassandra"
python_software_properties: "python3-software-properties"
tomcat_dir: "/var/lib/{{ tomcat }}"
tomcat_webapps: "/var/lib/{{ tomcat }}/webapps/"
psycopg2_package: "python3-psycopg2"
pg_version: "{{ pg_version | default('16') }}"
postgis_version: "{{ postgis_version | default('3') }}"
postgis_version_folder: "{{ postgis_version_folder | default('3') }}"
postgis_scripts_version: "{{ postgis_scripts_version | default('3.4') }}"
vjrj marked this conversation as resolved.
Show resolved Hide resolved
when: ansible_os_family == "Debian" and ansible_distribution_version == "24.04"
tags:
- setfacts

- name: set java defaults for openjdk11 (amd64)
set_fact:
java_security_opts: -Dlog4j2.formatMsgNoLookups=true
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/mysql-server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@

- name: Install mysql-server 8.0 for Ubuntu 20.04
include_role: name=mysql-8.0
when: ansible_os_family == "Debian" and ansible_distribution_version == "20.04"
when: ansible_os_family == "Debian" and (ansible_distribution_version == "20.04" or ansible_distribution_version == "22.04" or ansible_distribution_version == "24.04")
tags: mysql-server
5 changes: 3 additions & 2 deletions ansible/roles/nginx/tasks/setup-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
state: present
when:
- nginx_ppa_use is defined and nginx_ppa_use | bool == True
- ansible_os_family == "Debian" and (ansible_distribution_version == "16.04" or ansible_distribution_version == "18.04" or ansible_distribution_version == "20.04")
- ansible_os_family == "Debian" and ansible_distribution_version|int >= 16


- name: Add PPA key for Nginx repository
apt_key:
Expand Down Expand Up @@ -34,7 +35,7 @@
register: nginx_ppa_added_mainline
when:
- nginx_ppa_use is defined and nginx_ppa_use | bool == True
- ansible_os_family == "Debian" and (ansible_distribution_version == "16.04" or ansible_distribution_version == "18.04" or ansible_distribution_version == "20.04")
- ansible_os_family == "Debian" and ansible_distribution_version|int >= 16

- name: Ensure nginx will reinstall if the PPA was just added.
apt:
Expand Down
7 changes: 7 additions & 0 deletions ansible/roles/nginx_vhost/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
tags:
- nginx_vhost

- name: set ubuntu-24.04 variables
set_fact:
nginx_tls_v1_3_enabled: True
when: ansible_os_family == "Debian" and ansible_distribution_version == "24.04"
tags:
- nginx_vhost

#- name: determine if a virtual host is required (vhost not required for localhost, 127.0.0.1 or any hostname with a colon in it)
# set_fact: vhost_required={{ hostname.find(':') == -1 and hostname.find('localhost') == -1 and hostname.find('127.0.0.1') == -1 }}
# tags:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/tomcat/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@
- tomcat
- tomcat-security

- name: configure tomcat (Debian) in 18.04
- name: configure tomcat (Debian) in >= 18.04
blockinfile:
path={{tomcat_conf}}
marker="# {mark} Configure Tomcat Memory (Ansible managed)"
block='JAVA_OPTS="-Djava.awt.headless=true -XX:+UseG1GC {{tomcat_java_opts}} {{java_security_opts}}"'
backup=yes
notify:
- restart tomcat
when: ansible_os_family == "Debian" and ansible_distribution_version == "18.04" and tomcat == "tomcat9"
when: ansible_os_family == "Debian" and ansible_distribution_version|int >= 18 and tomcat == "tomcat9"
tags:
- tomcat
- tomcat-security
Expand Down