Skip to content

Commit

Permalink
docs: vpn_ipaddr filter requires vpn_ipaddr.yml for docs
Browse files Browse the repository at this point in the history
Docs for filters must be in a separate file named the same as the
filter filename but with a .yml extension.

Signed-off-by: Rich Megginson <[email protected]>
  • Loading branch information
richm committed Nov 5, 2024
1 parent 47f7b5c commit 2934f41
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions filter_plugins/vpn_ipaddr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
DOCUMENTATION:
name: vpn_ipaddr
author: system roles team
version_added: 'historical'
short_description: Works like the regular ipaddr filter but limited to vpn use cases
description:
- IP address manipulations.
- Like ansible.netcommon.ipaddr but tailored to vpn use cases
positional: _input
options:
_input:
description: An IP address
type: string
required: true

EXAMPLES: |
# Extract subnet from ip address
subnet: "{{ ip_with_prefix | vpn_ipaddr('subnet') }}"
# Check if given value is an IP address
is_ip_address: "{{ maybe_ip_value | vpn_ipaddr }}"
RETURN:
_value:
description: The requested value.
type: string

0 comments on commit 2934f41

Please sign in to comment.