From ad63bda778a7e97fcb60051531da1c307db536c0 Mon Sep 17 00:00:00 2001 From: Alex Reid Date: Tue, 11 Jul 2023 12:08:30 +0200 Subject: [PATCH] Newer os compatiblity with os dependent vars Added a functionality to the task in main.yml that includes the os dependent vars whereby you can speficie the os version of the vars that you want. The corresponding file(s) for that os version must be created in the vars folder. The compatibility with Debian12 was also created in the vars folder. --- tasks/main.yml | 1 + vars/Debian-12.yml | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 vars/Debian-12.yml diff --git a/tasks/main.yml b/tasks/main.yml index d3d0f62..84fb62a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,6 +3,7 @@ - name: include OS dependent vars include_vars: "{{ item }}" with_first_found: + - "../vars/{{ ansible_os_family }}-{{ ansible_distribution_major_version }}" - "../vars/{{ ansible_os_family }}.yml" - "../vars/empty.yml" when: nginx_load_default_vars diff --git a/vars/Debian-12.yml b/vars/Debian-12.yml new file mode 100644 index 0000000..ed18eb1 --- /dev/null +++ b/vars/Debian-12.yml @@ -0,0 +1,8 @@ +--- +nginx_user: www-data + +nginx_python_selinux_pkgs: + - python3-selinux + - python3-semanage + +nginx_modules_location: /usr/lib/nginx/modules