From cfc5cf01836f6819cec4316d99adefbfdd8354ae Mon Sep 17 00:00:00 2001 From: kbcz1989 Date: Wed, 4 Sep 2024 16:20:09 +0200 Subject: [PATCH 1/2] Add support for Ubuntu 24.04 Noble Numbat --- tasks/main.yml | 3 ++- vars/Ubuntu-24.04.yml | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 vars/Ubuntu-24.04.yml diff --git a/tasks/main.yml b/tasks/main.yml index a6de3d5..35a5966 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,7 +2,8 @@ - name: Include OS-specific variables. include_vars: "{{ item }}" with_first_found: - - "{{ ansible_facts['os_family'] + '-' + ansible_facts['distribution_major_version'] }}.yml" + - "{{ ansible_facts['distribution'] + '-' + ansible_facts['distribution_version'] }}.yml" + - "{{ ansible_facts['distribution'] + '-' + ansible_facts['distribution_major_version'] }}.yml" - "{{ ansible_facts['os_family'] }}.yml" - name: Set the ntp_driftfile variable. diff --git a/vars/Ubuntu-24.04.yml b/vars/Ubuntu-24.04.yml new file mode 100644 index 0000000..0abcb4a --- /dev/null +++ b/vars/Ubuntu-24.04.yml @@ -0,0 +1,7 @@ +--- +__ntp_daemon: ntpsec +ntp_tzdata_package: tzdata +__ntp_package: ntpsec +__ntp_config_file: /etc/ntpsec/ntp.conf +__ntp_driftfile: /var/lib/ntpsec/ntp.drift +ntp_cron_daemon: cron From 0d13d58648c2acd7366f17075fc8382d206a0d50 Mon Sep 17 00:00:00 2001 From: kbcz1989 Date: Thu, 5 Sep 2024 09:26:46 +0200 Subject: [PATCH 2/2] Revert to os_family/major for wider potential support, like centos 8 --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 35a5966..8592098 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,7 +3,7 @@ include_vars: "{{ item }}" with_first_found: - "{{ ansible_facts['distribution'] + '-' + ansible_facts['distribution_version'] }}.yml" - - "{{ ansible_facts['distribution'] + '-' + ansible_facts['distribution_major_version'] }}.yml" + - "{{ ansible_facts['os_family'] + '-' + ansible_facts['distribution_major_version'] }}.yml" - "{{ ansible_facts['os_family'] }}.yml" - name: Set the ntp_driftfile variable.