community / community.dns / 2.8.3 / filter / remove_public_suffix Removes the public suffix from a DNS name | "added in version" 0.1.0 of community.dns" Authors: Felix Fontein (@felixfontein)community.dns.remove_public_suffix (2.8.3) — filter
Install with ansible-galaxy collection install community.dns:==2.8.3
collections: - name: community.dns version: 2.8.3
Removes the public suffix from a DNS name.
- name: Remove the public suffix from a DNS name ansible.builtin.set_fact: public_suffix: "{{ 'www.ansible.co.uk' | community.dns.remove_public_suffix }}"
_input: description: - A DNS name. required: true type: string icann_only: default: false description: - This controls whether only entries from the ICANN section of the Public Suffix List are used, or also entries from the Private section. For example, C(.co.uk) is in the ICANN section, but C(github.io) is in the Private section. type: boolean keep_unknown_suffix: default: true description: - This treats unknown TLDs as valid public suffixes. So for example the public suffix of C(example.tlddoesnotexist) is C(.tlddoesnotexist) if this is V(true). If set to V(false), it will return an empty string in this case. - This option corresponds to whether the global wildcard rule C(*) in the Public Suffix List is used or not. type: boolean keep_trailing_period: default: false description: - This controls whether the trailing period of the prefix (that is, the part before the public suffix) is preserved or not. type: boolean
_value: description: The part of the DNS name before the public suffix. type: string