-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds filters that can be used to escape values for use inside a DN attribute value and to parse a DN string into a more structured object. These filters are useful with the `microsoft.ad.ldap` inventory plugin as well as when forming values like the `path` or other DN attributes.
- Loading branch information
Showing
9 changed files
with
558 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,7 @@ | |
"[powershell]": { | ||
"editor.formatOnSave": true, | ||
}, | ||
"[python]": { | ||
"editor.formatOnSave": false | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Copyright (c) 2023 Ansible Project | ||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
|
||
DOCUMENTATION: | ||
name: dn_escape | ||
author: | ||
- Jordan Borean (@jborean93) | ||
short_description: Escape an LDAP DistinguishedName value string. | ||
version_added: 1.5.0 | ||
seealso: | ||
- ref: microsoft.ad.parse_dn <ansible_collections.microsoft.ad.parse_dn_filter> | ||
description: microsoft.ad.parse_dn filter | ||
- ref: microsoft.ad.ldap <ansible_collections.microsoft.ad.ldap_inventory> | ||
description: microsoft.ad.ldap inventory | ||
description: | ||
- Escapes a string value for use in an LDAP DistinguishedName. | ||
- This can be used to escape special characters when building a | ||
DistinguishedName value. | ||
positional: _input | ||
options: | ||
_input: | ||
description: | ||
- The string value to escape. | ||
- This should be just the RDN value not including the attribute type | ||
that prefixes the value, for example C(MyValue) and not C(CN=MyValue). | ||
type: str | ||
required: true | ||
|
||
EXAMPLES: | | ||
# This is an example used in the microsoft.ad.ldap plugin | ||
search_base: OU={{ my_ou_variable | microsoft.ad.dn_escape }},DC=domain,DC=com | ||
# This is an example with the microsoft.ad.user module | ||
- microsoft.ad.user: | ||
name: MyUser | ||
password: MyPassword123 | ||
state: present | ||
path: OU={{ my_ou_variable | microsoft.ad.dn_escape }},DC=domain,DC=com | ||
RETURN: | ||
_value: | ||
description: | ||
- The escaped RDN attribute value. | ||
type: string |
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
Oops, something went wrong.