From af5035fa1632b377362ded674d1f782cef49d1ff Mon Sep 17 00:00:00 2001 From: Murat Aybars <39916128+aybarsm@users.noreply.github.com> Date: Thu, 27 Jun 2024 12:39:24 +0100 Subject: [PATCH] Empty commit message --- roles/posix/defaults/sysctl.yml | 2 ++ roles/systemd/defaults/network.yml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/roles/posix/defaults/sysctl.yml b/roles/posix/defaults/sysctl.yml index 646d705..ee3f64b 100644 --- a/roles/posix/defaults/sysctl.yml +++ b/roles/posix/defaults/sysctl.yml @@ -3,4 +3,6 @@ linux_manage_posix_sysctl: false linux_posix_sysctl_default: [] linux_posix_sysctl_group: [] linux_posix_sysctl_host: [] +# The combination strategy below is highly nested hierarchy compliant and recommended (Example provided below) +# linux_posix_sysctl_host > linux_posix_sysctl_group > linux_posix_sysctl_default linux_posix_sysctl_all: "{{ (linux_posix_sysctl_host + linux_posix_sysctl_group + linux_posix_sysctl_default) | unique(attribute='name') }}" \ No newline at end of file diff --git a/roles/systemd/defaults/network.yml b/roles/systemd/defaults/network.yml index 068d55b..db01258 100644 --- a/roles/systemd/defaults/network.yml +++ b/roles/systemd/defaults/network.yml @@ -16,11 +16,14 @@ linux_systemd_network_template: network.j2 linux_systemd_network_default: [] linux_systemd_network_group: [] linux_systemd_network_host: [] +# The combination strategy below is highly nested hierarchy compliant and recommended +# linux_systemd_network_host > linux_systemd_network_group > linux_systemd_network_default linux_systemd_network_all: "{{ (linux_systemd_network_host + linux_systemd_network_group + linux_systemd_network_default) | selectattr('name', 'defined') | selectattr('name', 'search', '\\.(network|link|netdev)$') | selectattr('config', 'defined') | unique(attribute='name') }}" linux_systemd_network_names: "{{ linux_systemd_network_all | map(attribute='name') }}" +# Escape file names defined in linux_systemd_network_all linux_systemd_network_cleanup_regex: - "^({{ linux_systemd_network_names | select('match', '.*\\.link$') | map('replace', '.link', '') | join('|') }})\\.link$" - "^({{ linux_systemd_network_names | select('match', '.*\\.netdev$') | map('replace', '.netdev', '') | join('|') }})\\.netdev$" @@ -28,4 +31,5 @@ linux_systemd_network_cleanup_regex: # Escape backup files: - "^.*\\.\\d+\\.\\d{4}-\\d{2}-\\d{2}@\\d{2}:\\d{2}:\\d{2}~$" +# Join regex expressions linux_systemd_network_cleanup_patterns: ["(?!{{ linux_systemd_network_cleanup_regex | join('|') }})"]