From 86b9c1c075c4b4a39dfb7329a7c8c2736782fb96 Mon Sep 17 00:00:00 2001 From: Akiyamov <116005851+Akiyamov@users.noreply.github.com> Date: Thu, 5 Dec 2024 18:35:01 +0500 Subject: [PATCH] Major release for ansible --- tasks/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 09509ae..7e2a130 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -11,6 +11,10 @@ register: dnsmasq_confdir ignore_errors: true + - name: Get openwrt major release + shell: cat /etc/openwrt_release | grep -Eo [0-9]{2}[.][0-9]{2}[.][0-9]* | cut -d '.' -f 1 | tail -n 1 + register: openwrt_major_release + - name: debug debug: var: ansible_distribution_major_version @@ -74,7 +78,7 @@ key: dhcp.@dnsmasq[0] value: confdir: "/tmp/dnsmasq.d" - when: dnsmasq_confdir.stdout != "/tmp/dnsmasq.d" + when: dnsmasq_confdir.stdout != "/tmp/dnsmasq.d" and openwrt_major_release >= 24 # Getdomains script configure