ansible.plugins.filter package¶
Submodules¶
ansible.plugins.filter.core module¶
-
class
ansible.plugins.filter.core.AnsibleJSONEncoder(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, encoding='utf-8', default=None)[source]¶ Bases:
json.encoder.JSONEncoderSimple encoder class to deal with JSON encoding of internal types like HostVars
-
ansible.plugins.filter.core.to_nice_yaml(a, indent=4, *args, **kw)[source]¶ Make verbose, human readable yaml
-
ansible.plugins.filter.core.to_nice_json(a, indent=4, *args, **kw)[source]¶ Make verbose, human readable JSON
-
ansible.plugins.filter.core.regex_replace(value='', pattern='', replacement='', ignorecase=False)[source]¶ Perform a re.sub returning a string
-
ansible.plugins.filter.core.regex_findall(value, regex, multiline=False, ignorecase=False)[source]¶ Perform re.findall and return the list of matches
-
ansible.plugins.filter.core.regex_search(value, regex, *args, **kwargs)[source]¶ Perform re.search and return the list of matches or a backref
-
ansible.plugins.filter.core.ternary(value, true_val, false_val)[source]¶ value ? true_val : false_val
-
ansible.plugins.filter.core.version_compare(value, version, operator='eq', strict=False)[source]¶ Perform a version comparison on a value
ansible.plugins.filter.ipaddr module¶
-
class
ansible.plugins.filter.ipaddr.mac_linux[source]¶ Bases:
netaddr.strategy.eui48.mac_unix-
word_fmt= '%.2x'¶
-
-
ansible.plugins.filter.ipaddr.ipaddr(value, query='', version=False, alias='ipaddr')[source]¶ Check if string is an IP address or network and filter it
-
ansible.plugins.filter.ipaddr.ipsubnet(value, query='', index='x')[source]¶ Manipulate IPv4/IPv6 subnets
-
ansible.plugins.filter.ipaddr.nthhost(value, query='')[source]¶ Get the nth host within a given network
-
ansible.plugins.filter.ipaddr.slaac(value, query='')[source]¶ Get the SLAAC address within given network
-
ansible.plugins.filter.ipaddr.hwaddr(value, query='', alias='hwaddr')[source]¶ Check if string is a HW/MAC address and filter it
-
class
ansible.plugins.filter.ipaddr.FilterModule[source]¶ Bases:
objectIP address and network manipulation filters
-
filter_map= {'hwaddr': <function hwaddr at 0x1031e27d0>, 'macaddr': <function macaddr at 0x1031e2848>, 'ipsubnet': <function ipsubnet at 0x1031e2668>, 'ipwrap': <function ipwrap at 0x1031e2500>, 'ipv6': <function ipv6 at 0x1031e25f0>, 'ip4_hex': <function ip4_hex at 0x1031e2938>, 'nthhost': <function nthhost at 0x1031e26e0>, 'ipaddr': <function ipaddr at 0x1031e2488>, 'slaac': <function slaac at 0x1031e2758>, 'ipv4': <function ipv4 at 0x1031e2578>}¶
-