fix: improve SUSE detection

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-07-01 21:56:44 +02:00
parent 4332b6d1de
commit 1a481b7686
Signed by: mfocko
GPG key ID: 7C47D46246790496
2 changed files with 3 additions and 3 deletions

View file

@ -25,12 +25,12 @@
- name: Set dns_command for co-openSUSE - name: Set dns_command for co-openSUSE
ansible.builtin.set_fact: ansible.builtin.set_fact:
wg_dns_command: "resolvectl dns %i 10.42.0.1; resolvectl domain %i ~admin" wg_dns_command: "resolvectl dns %i 10.42.0.1; resolvectl domain %i ~admin"
when: ansible_distribution != "openSUSE" when: '"openSUSE" not in ansible_distribution'
- name: Set dns_command for openSUSE - name: Set dns_command for openSUSE
ansible.builtin.set_fact: ansible.builtin.set_fact:
wg_dns_command: "nmcli con mod %i ipv4.dns 10.42.0.1; nmcli con mod %i ipv4.dns-search ~admin" wg_dns_command: "nmcli con mod %i ipv4.dns 10.42.0.1; nmcli con mod %i ipv4.dns-search ~admin"
when: ansible_distribution == "openSUSE" when: '"openSUSE" in ansible_distribution'
- name: Create the config - name: Create the config
vars: vars:

View file

@ -20,4 +20,4 @@
name: yad name: yad
state: present state: present
become: true become: true
when: ansible_distribution not in [ "AlmaLinux" ] when: 'ansible_distribution not in [ "AlmaLinux" ] and "openSUSE" not in ansible_distribution'