-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add documentation for filter plugins. * Use non-deprecated documentation fragments for modules. * Bump the collection version to 4.0.1.
- Loading branch information
Showing
15 changed files
with
131 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
DOCUMENTATION: | ||
name: dictfilter | ||
short_description: filter a dictionary to return only the specified keys | ||
description: | ||
- The input dictionary will be returned with only the specified keys present. | ||
positional: _input, keys | ||
options: | ||
_input: | ||
description: A dictionary to filter. | ||
type: dict | ||
required: true | ||
keys: | ||
description: The list of dictionary keys to preserve. | ||
type: list | ||
elements: str | ||
required: true | ||
|
||
EXAMPLES: | | ||
- '{} | mattclay.aws.dictfilter([]) == {}' | ||
- '{} | mattclay.aws.dictfilter(["a"]) == {}' | ||
- '{"a": 1} | mattclay.aws.dictfilter(["a"]) == {"a": 1}' | ||
- '{"a": 1, "b": 2} | mattclay.aws.dictfilter(["a"]) == {"a": 1}' | ||
- '{"a": 1, "b": 2} | mattclay.aws.dictfilter(["a", "b"]) == {"a": 1, "b": 2}' | ||
- '{"a": 1, "b": 2} | mattclay.aws.dictfilter(["c"]) == {}' | ||
RETURN: | ||
_value: | ||
description: The dictionary with only the specified keys present. | ||
type: dict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
DOCUMENTATION: | ||
name: ec2_az_vpc_route_tables_subnets | ||
short_description: generate a list of subnets from availability zones | ||
description: | ||
- Use the input zones dictionary and provided subnet format string to build a list of subnets. | ||
positional: _input, subnet | ||
options: | ||
_input: | ||
description: A dictionary of availability zones. The key is the zone name. The value is unused. | ||
type: dict | ||
required: true | ||
subnet: | ||
description: The subnet format string. The placeholder will be replaced with a number representing the availability zone, with ``a`` being ``0``. | ||
type: str | ||
required: true | ||
|
||
EXAMPLES: | | ||
- '{"us-east-1a": {}, "us-east-1b": {}} | mattclay.aws.ec2_az_vpc_route_tables_subnets("192.168.%s.0/24") == ["192.168.0.0/24", "192.168.1.0/24"]' | ||
- '{"us-east-1f": {}} | mattclay.aws.ec2_az_vpc_route_tables_subnets("192.168.%s.0/24") == ["192.168.5.0/24"]' | ||
RETURN: | ||
_value: | ||
description: A list of subnets. | ||
type: list | ||
elements: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
DOCUMENTATION: | ||
name: ec2_az_vpc_subnets | ||
short_description: generate a list of availability zones and subnets | ||
description: | ||
- Use the input zones dictionary, provided subnet format string and tag name to build a list of availiability zones with subnets. | ||
positional: _input, subnet, name | ||
options: | ||
_input: | ||
description: A dictionary of availability zones. The key is the zone name. The value is unused. | ||
type: dict | ||
required: true | ||
subnet: | ||
description: The subnet format string. The placeholder will be replaced with a number representing the availability zone, with ``a`` being ``0``. | ||
type: str | ||
required: true | ||
name: | ||
description: The name (tag) to apply to the subnet. | ||
type: str | ||
required: true | ||
|
||
EXAMPLES: | | ||
- '{"us-east-1a": {}} | mattclay.aws.ec2_az_vpc_subnets("192.168.%s.0/24", "Bob") == [{ "az": "us-east-1a", "cidr": "192.168.0.0/24", "resource_tags": {"Name": "Bob"}}]' | ||
- '{"us-east-1f": {}} | mattclay.aws.ec2_az_vpc_subnets("192.168.%s.0/24", "Bob") == [{ "az": "us-east-1f", "cidr": "192.168.5.0/24", "resource_tags": {"Name": "Bob"}}]' | ||
RETURN: | ||
_value: | ||
description: A list of dictionaries representing the generated availability zones and subnets. | ||
type: list | ||
elements: dict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
DOCUMENTATION: | ||
name: map_format | ||
short_description: format a string using | ||
description: | ||
- Use a dictionary of input values to render the given format string. | ||
positional: _input, fmt | ||
options: | ||
_input: | ||
description: A dictionary of values available to be used in the format string. | ||
type: dict | ||
required: true | ||
fmt: | ||
description: A format string to render. | ||
type: str | ||
required: true | ||
|
||
EXAMPLES: | | ||
- '{} | mattclay.aws.map_format("Hello") == "Hello"' | ||
- '{"age": 21} | mattclay.aws.map_format("Hello {name} {age}", name="Bob") == "Hello Bob 21"' | ||
- '{"name": "World"} | mattclay.aws.map_format("Hello {name}") == "Hello World"' | ||
- '{"name": "World"} | mattclay.aws.map_format("Hello {name}", name="Bob") == "Hello Bob"' | ||
- '{"name": "World"} | mattclay.aws.map_format("Hello {name} {0}", 3) == "Hello World 3"' | ||
RETURN: | ||
_value: | ||
description: Rendered string. | ||
type: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters