From da5913d151ed81ec276263fa5c293b0fe9df0fd6 Mon Sep 17 00:00:00 2001 From: 56ghluf <79640260+56ghluf@users.noreply.github.com> Date: Sun, 17 Dec 2023 22:27:09 +0100 Subject: [PATCH] Newer os compatiblity with os dependent vars (#245) 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. Co-authored-by: Alex Reid --- 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