You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/filter_plugins/domain_relative_to.py

11 lines
268 B
Python

def domain_relative_to(domain, zone):
if domain == '@':
return zone
if domain[-1] != '.':
return f"{domain}.{zone}"
return domain
class FilterModule(object):
def filters(self):
return {'domain_relative_to': domain_relative_to}