Skip to content

Commit

Permalink
Empty commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
aybarsm committed Jun 27, 2024
1 parent 3a2753c commit af5035f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/posix/defaults/sysctl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}"
4 changes: 4 additions & 0 deletions roles/systemd/defaults/network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@ 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$"
- "^({{ linux_systemd_network_names | select('match', '.*\\.network$') | map('replace', '.network', '') | join('|') }})\\.network$"
# 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('|') }})"]

0 comments on commit af5035f

Please sign in to comment.