diff --git a/changelogs/fragments/default_options.yml b/changelogs/fragments/default_options.yml new file mode 100644 index 0000000..bbec4e2 --- /dev/null +++ b/changelogs/fragments/default_options.yml @@ -0,0 +1,5 @@ +minor_changes: + - >- + Added ``group/microsoft.ad.domain`` module defaults group for the ``computer``, ``group``, ``object_info``, + ``object``, ``ou``, and ``user`` module. Users can use this defaults group to set common connection options + for these modules such as the ``domain_server``, ``domain_username``, and ``domain_password`` options. diff --git a/meta/runtime.yml b/meta/runtime.yml index 6c376f8..b62c124 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1 +1,9 @@ -requires_ansible: '>=2.14' \ No newline at end of file +requires_ansible: '>=2.14' +action_groups: + domain: + - computer + - group + - object_info + - object + - ou + - user \ No newline at end of file diff --git a/plugins/doc_fragments/ad_object.py b/plugins/doc_fragments/ad_object.py index 30e8689..0db26a7 100644 --- a/plugins/doc_fragments/ad_object.py +++ b/plugins/doc_fragments/ad_object.py @@ -79,12 +79,16 @@ class ModuleDocFragment: domain_password: description: - The password for I(domain_username). + - This can be set under the R(play's module defaults,module_defaults_groups) + under the C(group/microsoft.ad.domain) group. type: str domain_server: description: - Specified the Active Directory Domain Services instance to connect to. - Can be in the form of an FQDN or NetBIOS name. - If not specified then the value is based on the default domain of the computer running PowerShell. + - This can be set under the R(play's module defaults,module_defaults_groups) + under the C(group/microsoft.ad.domain) group. type: str domain_username: description: @@ -92,6 +96,8 @@ class ModuleDocFragment: - If this is not set then the user that is used for authentication will be the connection user. - Ansible will be unable to use the connection user unless auth is Kerberos with credential delegation or CredSSP, or become is used on the task. + - This can be set under the R(play's module defaults,module_defaults_groups) + under the C(group/microsoft.ad.domain) group. type: str identity: description: diff --git a/plugins/modules/object_info.py b/plugins/modules/object_info.py index 146fa30..d25d4e0 100644 --- a/plugins/modules/object_info.py +++ b/plugins/modules/object_info.py @@ -16,12 +16,16 @@ domain_password: description: - The password for I(domain_username). + - This can be set under the R(play's module defaults,module_defaults_groups) + under the C(group/microsoft.ad.domain) group. type: str domain_server: description: - Specified the Active Directory Domain Services instance to connect to. - Can be in the form of an FQDN or NetBIOS name. - If not specified then the value is based on the default domain of the computer running PowerShell. + - This can be set under the R(play's module defaults,module_defaults_groups) + under the C(group/microsoft.ad.domain) group. type: str domain_username: description: @@ -29,6 +33,8 @@ - If this is not set then the user that is used for authentication will be the connection user. - Ansible will be unable to use the connection user unless auth is Kerberos with credential delegation or CredSSP, or become is used on the task. + - This can be set under the R(play's module defaults,module_defaults_groups) + under the C(group/microsoft.ad.domain) group. type: str filter: description: