Configure /etc/network/interfaces and /etc/resolv.conf using Ansible #98

Merged
jeltz merged 7 commits from ifupdown2 into master 2022-08-27 04:55:31 +02:00
2 changed files with 14 additions and 0 deletions
Showing only changes of commit 15e2db49f3 - Show all commits

View file

@ -3,6 +3,7 @@ ask_vault_pass = True
roles_path = ./roles roles_path = ./roles
retry_files_enabled = False retry_files_enabled = False
inventory = ./hosts inventory = ./hosts
filter_plugins = ./filter_plugins
ansible_managed = Ansible managed, modified on %Y-%m-%d %H:%M:%S ansible_managed = Ansible managed, modified on %Y-%m-%d %H:%M:%S
nocows = 1 nocows = 1
forks = 15 forks = 15

View file

@ -0,0 +1,13 @@
import dns.name
class FilterModule:
def filters(self):
return {
"remove_domain_suffix": remove_domain_suffix,
}
def remove_domain_suffix(name):
parent = dns.name.from_text(name).parent()
return parent.to_text()