Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

docs: vpn_ipaddr filter requires vpn_ipaddr.yml for docs #176

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading