diff --git a/.github/workflows/rst-pr.yml b/.github/workflows/rst-pr.yml deleted file mode 100644 index c648fb8e..00000000 --- a/.github/workflows/rst-pr.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: RST PR -on: - pull_request_target: - types: [opened, synchronize, reopened] - paths: - - "docs/*.rst" - -jobs: - notify: - permissions: - pull-requests: write - runs-on: ubuntu-latest - steps: - - name: Look for an existing comment - id: fc - uses: peter-evans/find-comment@v1 - with: - issue-number: ${{ github.event.number }} - body-includes: '### Generated Docs Modified' - comment-author: 'github-actions[bot]' - - - name: Notify the author - id: comment - uses: peter-evans/create-or-update-comment@v1 - with: - comment-id: ${{ steps.fc.outputs.comment-id }} - issue-number: ${{ github.event.number }} - edit-mode: replace - body: | - ### Generated Docs Modified - - This PR with commit ${{ github.event.pull_request.head.sha }} is directly editing an RST file. - These files are auto-generated and will be overwritten on release. - - To update documentation, please edit the appropriate `.py` file(s) used to generate the documentation. diff --git a/README.md b/README.md index f431040d..a1fdd6cd 100644 --- a/README.md +++ b/README.md @@ -20,102 +20,10 @@ PEP440 is the schema used to describe the versions of Ansible. ## Included content -### Lookup plugins -Name | Description ---- | --- -[community.windows.laps_password](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.laps_password_lookup.rst)|Retrieves the LAPS password for a server. - -### Modules -Name | Description ---- | --- -[community.windows.psexec](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.psexec_module.rst)|Runs commands on a remote Windows host based on the PsExec model -[community.windows.win_audit_policy_system](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_audit_policy_system_module.rst)|Used to make changes to the system wide Audit Policy -[community.windows.win_audit_rule](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_audit_rule_module.rst)|Adds an audit rule to files, folders, or registry keys -[community.windows.win_auto_logon](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_auto_logon_module.rst)|Adds or Sets auto logon registry keys. -[community.windows.win_certificate_info](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_certificate_info_module.rst)|Get information on certificates from a Windows Certificate Store -[community.windows.win_computer_description](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_computer_description_module.rst)|Set windows description, owner and organization -[community.windows.win_credential](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_credential_module.rst)|Manages Windows Credentials in the Credential Manager -[community.windows.win_data_deduplication](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_data_deduplication_module.rst)|Module to enable Data Deduplication on a volume. -[community.windows.win_defrag](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_defrag_module.rst)|Consolidate fragmented files on local volumes -[community.windows.win_dhcp_lease](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_dhcp_lease_module.rst)|Manage Windows Server DHCP Leases -[community.windows.win_disk_facts](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_disk_facts_module.rst)|Show the attached disks and disk information of the target host -[community.windows.win_disk_image](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_disk_image_module.rst)|Manage ISO/VHD/VHDX mounts on Windows hosts -[community.windows.win_dns_record](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_dns_record_module.rst)|Manage Windows Server DNS records -[community.windows.win_dns_zone](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_dns_zone_module.rst)|Manage Windows Server DNS Zones -[community.windows.win_domain_computer](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_domain_computer_module.rst)|Manage computers in Active Directory -[community.windows.win_domain_group](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_domain_group_module.rst)|Creates, modifies or removes domain groups -[community.windows.win_domain_group_membership](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_domain_group_membership_module.rst)|Manage Windows domain group membership -[community.windows.win_domain_object_info](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_domain_object_info_module.rst)|Gather information an Active Directory object -[community.windows.win_domain_ou](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_domain_ou_module.rst)|Manage Active Directory Organizational Units -[community.windows.win_domain_user](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_domain_user_module.rst)|Manages Windows Active Directory user accounts -[community.windows.win_dotnet_ngen](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_dotnet_ngen_module.rst)|Runs ngen to recompile DLLs after .NET updates -[community.windows.win_eventlog](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_eventlog_module.rst)|Manage Windows event logs -[community.windows.win_eventlog_entry](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_eventlog_entry_module.rst)|Write entries to Windows event logs -[community.windows.win_feature_info](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_feature_info_module.rst)|Gather information about Windows features -[community.windows.win_file_compression](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_file_compression_module.rst)|Alters the compression of files and directories on NTFS partitions. -[community.windows.win_file_version](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_file_version_module.rst)|Get DLL or EXE file build version -[community.windows.win_firewall](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_firewall_module.rst)|Enable or disable the Windows Firewall -[community.windows.win_firewall_rule](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_firewall_rule_module.rst)|Windows firewall automation -[community.windows.win_format](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_format_module.rst)|Formats an existing volume or a new volume on an existing partition on Windows -[community.windows.win_hosts](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_hosts_module.rst)|Manages hosts file entries on Windows. -[community.windows.win_hotfix](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_hotfix_module.rst)|Install and uninstalls Windows hotfixes -[community.windows.win_http_proxy](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_http_proxy_module.rst)|Manages proxy settings for WinHTTP -[community.windows.win_iis_virtualdirectory](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_iis_virtualdirectory_module.rst)|Configures a virtual directory in IIS -[community.windows.win_iis_webapplication](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_iis_webapplication_module.rst)|Configures IIS web applications -[community.windows.win_iis_webapppool](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_iis_webapppool_module.rst)|Configure IIS Web Application Pools -[community.windows.win_iis_webbinding](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_iis_webbinding_module.rst)|Configures a IIS Web site binding -[community.windows.win_iis_website](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_iis_website_module.rst)|Configures a IIS Web site -[community.windows.win_inet_proxy](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_inet_proxy_module.rst)|Manages proxy settings for WinINet and Internet Explorer -[community.windows.win_initialize_disk](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_initialize_disk_module.rst)|Initializes disks on Windows Server -[community.windows.win_lineinfile](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_lineinfile_module.rst)|Ensure a particular line is in a file, or replace an existing line using a back-referenced regular expression -[community.windows.win_listen_ports_facts](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_listen_ports_facts_module.rst)|Recopilates the facts of the listening ports of the machine -[community.windows.win_mapped_drive](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_mapped_drive_module.rst)|Map network drives for users -[community.windows.win_msg](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_msg_module.rst)|Sends a message to logged in users on Windows hosts -[community.windows.win_net_adapter_feature](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_net_adapter_feature_module.rst)|Enable or disable certain network adapters. -[community.windows.win_netbios](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_netbios_module.rst)|Manage NetBIOS over TCP/IP settings on Windows. -[community.windows.win_nssm](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_nssm_module.rst)|Install a service using NSSM -[community.windows.win_pagefile](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_pagefile_module.rst)|Query or change pagefile configuration -[community.windows.win_partition](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_partition_module.rst)|Creates, changes and removes partitions on Windows Server -[community.windows.win_pester](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_pester_module.rst)|Run Pester tests on Windows hosts -[community.windows.win_power_plan](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_power_plan_module.rst)|Changes the power plan of a Windows system -[community.windows.win_product_facts](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_product_facts_module.rst)|Provides Windows product and license information -[community.windows.win_psexec](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_psexec_module.rst)|Runs commands (remotely) as another (privileged) user -[community.windows.win_psmodule](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_psmodule_module.rst)|Adds or removes a Windows PowerShell module -[community.windows.win_psmodule_info](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_psmodule_info_module.rst)|Gather information about PowerShell Modules -[community.windows.win_psrepository](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_psrepository_module.rst)|Adds, removes or updates a Windows PowerShell repository. -[community.windows.win_psrepository_copy](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_psrepository_copy_module.rst)|Copies registered PSRepositories to other user profiles -[community.windows.win_psrepository_info](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_psrepository_info_module.rst)|Gather information about PSRepositories -[community.windows.win_psscript](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_psscript_module.rst)|Install and manage PowerShell scripts from a PSRepository -[community.windows.win_psscript_info](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_psscript_info_module.rst)|Gather information about installed PowerShell Scripts -[community.windows.win_pssession_configuration](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_pssession_configuration_module.rst)|Manage PSSession Configurations -[community.windows.win_rabbitmq_plugin](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_rabbitmq_plugin_module.rst)|Manage RabbitMQ plugins -[community.windows.win_rds_cap](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_rds_cap_module.rst)|Manage Connection Authorization Policies (CAP) on a Remote Desktop Gateway server -[community.windows.win_rds_rap](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_rds_rap_module.rst)|Manage Resource Authorization Policies (RAP) on a Remote Desktop Gateway server -[community.windows.win_rds_settings](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_rds_settings_module.rst)|Manage main settings of a Remote Desktop Gateway server -[community.windows.win_region](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_region_module.rst)|Set the region and format settings -[community.windows.win_regmerge](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_regmerge_module.rst)|Merges the contents of a registry file into the Windows registry -[community.windows.win_robocopy](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_robocopy_module.rst)|Synchronizes the contents of two directories using Robocopy -[community.windows.win_route](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_route_module.rst)|Add or remove a static route -[community.windows.win_say](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_say_module.rst)|Text to speech module for Windows to speak messages and optionally play sounds -[community.windows.win_scheduled_task](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_scheduled_task_module.rst)|Manage scheduled tasks -[community.windows.win_scheduled_task_stat](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_scheduled_task_stat_module.rst)|Get information about Windows Scheduled Tasks -[community.windows.win_scoop](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_scoop_module.rst)|Manage packages using Scoop -[community.windows.win_scoop_bucket](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_scoop_bucket_module.rst)|Manage Scoop buckets -[community.windows.win_security_policy](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_security_policy_module.rst)|Change local security policy settings -[community.windows.win_shortcut](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_shortcut_module.rst)|Manage shortcuts on Windows -[community.windows.win_snmp](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_snmp_module.rst)|Configures the Windows SNMP service -[community.windows.win_timezone](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_timezone_module.rst)|Sets Windows machine timezone -[community.windows.win_toast](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_toast_module.rst)|Sends Toast windows notification to logged in users on Windows 10 or later hosts -[community.windows.win_unzip](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_unzip_module.rst)|Unzips compressed files and archives on the Windows node -[community.windows.win_user_profile](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_user_profile_module.rst)|Manages the Windows user profiles. -[community.windows.win_wait_for_process](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_wait_for_process_module.rst)|Waits for a process to exist or not exist before continuing. -[community.windows.win_wakeonlan](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_wakeonlan_module.rst)|Send a magic Wake-on-LAN (WoL) broadcast packet -[community.windows.win_webpicmd](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_webpicmd_module.rst)|Installs packages using Web Platform Installer command-line -[community.windows.win_xml](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_xml_module.rst)|Manages XML file content on Windows hosts -[community.windows.win_zip](https://github.com/ansible-collections/community.windows/blob/main/docs/community.windows.win_zip_module.rst)|Compress file or directory as zip archive on the Windows node - +See the complete list of collection content in the [Plugin Index](https://ansible-collections.github.io/community.windows/branch/main/collections/community/windows/index.html#plugin-index). + ## Installation and Usage diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index f52cc2fe..00000000 --- a/docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Generated Documentation -The `docs/` directory contains **automatically generated** documentation from the plugins and modules in this collection. - -**Please do not submit pull requests to edit this documentation directly.** Instead, open a pull request to the `.py` file that contains the content these files are generated from. diff --git a/docs/community.windows.laps_password_lookup.rst b/docs/community.windows.laps_password_lookup.rst deleted file mode 100644 index 2725ee40..00000000 --- a/docs/community.windows.laps_password_lookup.rst +++ /dev/null @@ -1,413 +0,0 @@ -.. _community.windows.laps_password_lookup: - - -******************************* -community.windows.laps_password -******************************* - -**Retrieves the LAPS password for a server.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This lookup returns the LAPS password set for a server from the Active Directory database. -- See https://github.com/jborean93/ansible-lookup-laps_password for more information around installing pre-requisites and testing. - - - -Requirements ------------- -The below requirements are needed on the local Ansible controller node that executes this lookup. - -- python-ldap - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsConfigurationComments
-
- _terms - -
- string - / required -
-
- - -
The host name to retrieve the LAPS password for.
-
This is the Common Name (CN) of the host.
-
-
- allow_plaintext - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
When set to yes, will allow traffic to be sent unencrypted.
-
It is highly recommended to not touch this to avoid any credentials being exposed over the network.
-
Use scheme=ldaps, auth=gssapi, or start_tls=yes to ensure the traffic is encrypted.
-
-
- auth - -
- string -
-
-
    Choices: -
  • simple
  • -
  • gssapi ←
  • -
-
- -
The type of authentication to use when connecting to the Active Directory server
-
When using simple, the username and password options must be set. If not using scheme=ldaps or start_tls=True then these credentials are exposed in plaintext in the network traffic.
-
It is recommended ot use gssapi as it will encrypt the traffic automatically.
-
When using gssapi, run kinit before running Ansible to get a valid Kerberos ticket.
-
You cannot use gssapi when either scheme=ldaps or start_tls=True is set.
-
-
- ca_cert - -
- string -
-
- - -
The path to a CA certificate PEM file to use for certificate validation.
-
Certificate validation is used when scheme=ldaps or start_tls=yes.
-
This may fail on hosts with an older OpenLDAP install like MacOS, this will have to be updated before reinstalling python-ldap to get working again.
-

aliases: cacert_file
-
-
- domain - -
- string - / required -
-
- - -
The domain to search in to retrieve the LAPS password.
-
This could either be a Windows domain name visible to the Ansible controller from DNS or a specific domain controller FQDN.
-
Supports either just the domain/host name or an explicit LDAP URI with the domain/host already filled in.
-
If the URI is set, port and scheme are ignored.
-
-
- password - -
- string -
-
- - -
The password for username.
-
Required when username is set.
-
-
- port - -
- integer -
-
- - -
The LDAP port to communicate over.
-
If kdc is already an LDAP URI then this is ignored.
-
-
- scheme - -
- - -
-
-
    Choices: -
  • ldap ←
  • -
  • ldaps
  • -
-
- -
The LDAP scheme to use.
-
When using ldap, it is recommended to set auth=gssapi, or start_tls=yes, otherwise traffic will be in plaintext.
-
The Active Directory host must be configured for ldaps with a certificate before it can be used.
-
If kdc is already an LDAP URI then this is ignored.
-
-
- search_base - -
- string -
-
- - -
Changes the search base used when searching for the host in Active Directory.
-
Will default to search in the defaultNamingContext of the Active Directory server.
-
If multiple matches are found then a more explicit search_base is required so only 1 host is found.
-
If searching a larger Active Directory database, it is recommended to narrow the search_base for performance reasons.
-
-
- start_tls - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
When scheme=ldap, will use the StartTLS extension to encrypt traffic sent over the wire.
-
This requires the Active Directory to be set up with a certificate that supports StartTLS.
-
This is ignored when scheme=ldaps as the traffic is already encrypted.
-
-
- username - -
- string -
-
- - -
Required when using auth=simple.
-
The username to authenticate with.
-
Recommended to use the username in the UPN format, e.g. username@DOMAIN.COM.
-
This is required when auth=simple and is not supported when auth=gssapi.
-
Call kinit outside of Ansible if auth=gssapi is required.
-
-
- validate_certs - -
- string -
-
-
    Choices: -
  • never
  • -
  • allow
  • -
  • try
  • -
  • demand ←
  • -
-
- -
When using scheme=ldaps or start_tls=yes, this controls the certificate validation behaviour.
-
demand will fail if no certificate or an invalid certificate is provided.
-
try will fail for invalid certificates but will continue if no certificate is provided.
-
allow will request and check a certificate but will continue even if it is invalid.
-
never will not request a certificate from the server so no validation occurs.
-
-
- - -Notes ------ - -.. note:: - - If a host was found but had no LAPS password attribute ``ms-Mcs-AdmPwd``, the lookup will fail. - - Due to the sensitive nature of the data travelling across the network, it is highly recommended to run with either ``auth=gssapi``, ``scheme=ldaps``, or ``start_tls=yes``. - - Failing to run with one of the above settings will result in the account credentials as well as the LAPS password to be sent in plaintext. - - Some scenarios may not work when running on a host with an older OpenLDAP install like MacOS. It is recommended to install the latest OpenLDAP version and build python-ldap against this, see https://keathmilligan.net/python-ldap-and-macos for more information. - - - -Examples --------- - -.. code-block:: yaml - - # This isn't mandatory but it is a way to call kinit from within Ansible before calling the lookup - - name: call kinit to retrieve Kerberos token - expect: - command: kinit username@ANSIBLE.COM - responses: - (?i)password: SecretPass1 - no_log: True - - - name: Get the LAPS password using Kerberos auth, relies on kinit already being called - set_fact: - ansible_password: "{{ lookup('community.windows.laps_password', 'SERVER', domain='dc01.ansible.com') }}" - - - name: Specific the domain host using an explicit LDAP URI - set_fact: - ansible_password: "{{ lookup('community.windows.laps_password', 'SERVER', domain='ldap://ansible.com:389') }}" - - - name: Use Simple auth over LDAPS - set_fact: - ansible_password: "{{ lookup('community.windows.laps_password', 'server', - domain='dc01.ansible.com', - auth='simple', - scheme='ldaps', - username='username@ANSIBLE.COM', - password='SuperSecret123') }}" - - - name: Use Simple auth with LDAP and StartTLS - set_fact: - ansible_password: "{{ lookup('community.windows.laps_password', 'app01', - domain='dc01.ansible.com', - auth='simple', - start_tls=True, - username='username@ANSIBLE.COM', - password='SuperSecret123') }}" - - - name: Narrow down the search base to a an OU - set_fact: - ansible_password: "{{ lookup('community.windows.laps_password', 'sql10', - domain='dc01.ansible.com', - search_base='OU=Databases,DC=ansible,DC=com') }}" - - - name: Set certificate file to use when validating the TLS certificate - set_fact: - ansible_password: "{{ lookup('community.windows.laps_password', 'windows-pc', - domain='dc01.ansible.com', - start_tls=True, - ca_cert='/usr/local/share/certs/ad.pem') }}" - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this lookup: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- _raw - -
- string -
-
-
The LAPS password(s) for the host(s) requested.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Jordan Borean (@jborean93) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/community.windows.psexec_module.rst b/docs/community.windows.psexec_module.rst deleted file mode 100644 index 38649dba..00000000 --- a/docs/community.windows.psexec_module.rst +++ /dev/null @@ -1,635 +0,0 @@ -.. _community.windows.psexec_module: - - -************************ -community.windows.psexec -************************ - -**Runs commands on a remote Windows host based on the PsExec model** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Runs a remote command from a Linux host to a Windows host without WinRM being set up. -- Can be run on the Ansible controller to bootstrap Windows hosts to get them ready for WinRM. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- pypsexec -- smbprotocol[kerberos] for optional Kerberos authentication - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- arguments - -
- string -
-
- -
Any arguments as a single string to use when running the executable.
-
-
- asynchronous - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Will run the command as a detached process and the module returns immediately after starting the process while the process continues to run in the background.
-
The stdout and stderr return values will be null when this is set to yes.
-
The stdin option does not work with this type of process.
-
The rc return value is not set when this is yes
-
-
- connection_password - -
- string -
-
- -
The password for connection_user.
-
Required if the Kerberos requirements are not installed or the username is a local account to the Windows host.
-
Can be omitted to use a Kerberos principal ticket for the principal set by connection_user if the Kerberos library is installed and the ticket has already been retrieved with the kinit command before.
-
-
- connection_timeout - -
- integer -
-
- Default:
60
-
-
The timeout in seconds to wait when receiving the initial SMB negotiate response from the server.
-
-
- connection_username - -
- string -
-
- -
The username to use when connecting to the remote Windows host.
-
This user must be a member of the Administrators group of the Windows host.
-
Required if the Kerberos requirements are not installed or the username is a local account to the Windows host.
-
Can be omitted to use the default Kerberos principal ticket in the local credential cache if the Kerberos library is installed.
-
If process_username is not specified, then the remote process will run under a Network Logon under this account.
-
-
- encrypt - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Will use SMB encryption to encrypt the SMB messages sent to and from the host.
-
This requires the SMB 3 protocol which is only supported from Windows Server 2012 or Windows 8, older versions like Windows 7 or Windows Server 2008 (R2) must set this to no and use no encryption.
-
When setting to no, the packets are in plaintext and can be seen by anyone sniffing the network, any process options are included in this.
-
-
- executable - -
- string - / required -
-
- -
The executable to run on the Windows host.
-
-
- hostname - -
- string - / required -
-
- -
The remote Windows host to connect to, can be either an IP address or a hostname.
-
-
- integrity_level - -
- string -
-
-
    Choices: -
  • limited
  • -
  • default ←
  • -
  • elevated
  • -
-
-
The integrity level of the process when process_username is defined and is not equal to System.
-
When default, the default integrity level based on the system setup.
-
When elevated, the command will be run with Administrative rights.
-
When limited, the command will be forced to run with non-Administrative rights.
-
-
- interactive - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Will run the process as an interactive process that shows a process Window of the Windows session specified by interactive_session.
-
The stdout and stderr return values will be null when this is set to yes.
-
The stdin option does not work with this type of process.
-
-
- interactive_session - -
- integer -
-
- Default:
0
-
-
The Windows session ID to use when displaying the interactive process on the remote Windows host.
-
This is only valid when interactive is yes.
-
The default is 0 which is the console session of the Windows host.
-
-
- load_profile - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Runs the remote command with the user's profile loaded.
-
-
- port - -
- integer -
-
- Default:
445
-
-
The port that the remote SMB service is listening on.
-
-
- priority - -
- string -
-
-
    Choices: -
  • above_normal
  • -
  • below_normal
  • -
  • high
  • -
  • idle
  • -
  • normal ←
  • -
  • realtime
  • -
-
-
Set the command's priority on the Windows host.
- -
-
- process_password - -
- string -
-
- -
The password for process_username.
-
Required if process_username is defined and not System.
-
-
- process_timeout - -
- integer -
-
- Default:
0
-
-
The timeout in seconds that is placed upon the running process.
-
A value of 0 means no timeout.
-
-
- process_username - -
- string -
-
- -
The user to run the process as.
-
This can be set to run the process under an Interactive logon of the specified account which bypasses limitations of a Network logon used when this isn't specified.
-
If omitted then the process is run under the same account as connection_username with a Network logon.
-
Set to System to run as the builtin SYSTEM account, no password is required with this account.
-
If encrypt is no, the username and password are sent as a simple XOR scrambled byte string that is not encrypted. No special tools are required to get the username and password just knowledge of the protocol.
-
-
- show_ui_on_logon_screen - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Shows the process UI on the Winlogon secure desktop when process_username is System.
-
-
- stdin - -
- string -
-
- -
Data to send on the stdin pipe once the process has started.
-
This option has no effect when interactive or asynchronous is yes.
-
-
- working_directory - -
- string -
-
- Default:
"C:\\Windows\\System32"
-
-
Changes the working directory set when starting the process.
-
-
- - -Notes ------ - -.. note:: - - This module requires the Windows host to have SMB configured and enabled, and port 445 opened on the firewall. - - This module will wait until the process is finished unless *asynchronous* is ``yes``, ensure the process is run as a non-interactive command to avoid infinite hangs waiting for input. - - The *connection_username* must be a member of the local Administrator group of the Windows host. For non-domain joined hosts, the ``LocalAccountTokenFilterPolicy`` should be set to ``1`` to ensure this works, see https://support.microsoft.com/en-us/help/951016/description-of-user-account-control-and-remote-restrictions-in-windows. - - For more information on this module and the various host requirements, see https://github.com/jborean93/pypsexec. - - -See Also --------- - -.. seealso:: - - :ref:`ansible.builtin.raw_module` - The official documentation on the **ansible.builtin.raw** module. - :ref:`ansible.windows.win_command_module` - The official documentation on the **ansible.windows.win_command** module. - :ref:`community.windows.win_psexec_module` - The official documentation on the **community.windows.win_psexec** module. - :ref:`ansible.windows.win_shell_module` - The official documentation on the **ansible.windows.win_shell** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Run a cmd.exe command - community.windows.psexec: - hostname: server - connection_username: username - connection_password: password - executable: cmd.exe - arguments: /c echo Hello World - - - name: Run a PowerShell command - community.windows.psexec: - hostname: server.domain.local - connection_username: username@DOMAIN.LOCAL - connection_password: password - executable: powershell.exe - arguments: Write-Host Hello World - - - name: Send data through stdin - community.windows.psexec: - hostname: 192.168.1.2 - connection_username: username - connection_password: password - executable: powershell.exe - arguments: '-' - stdin: | - Write-Host Hello World - Write-Error Error Message - exit 0 - - - name: Run the process as a different user - community.windows.psexec: - hostname: server - connection_user: username - connection_password: password - executable: whoami.exe - arguments: /all - process_username: anotheruser - process_password: anotherpassword - - - name: Run the process asynchronously - community.windows.psexec: - hostname: server - connection_username: username - connection_password: password - executable: cmd.exe - arguments: /c rmdir C:\temp - asynchronous: yes - - - name: Use Kerberos authentication for the connection (requires smbprotocol[kerberos]) - community.windows.psexec: - hostname: host.domain.local - connection_username: user@DOMAIN.LOCAL - executable: C:\some\path\to\executable.exe - arguments: /s - - - name: Disable encryption to work with WIndows 7/Server 2008 (R2) - community.windows.psexec: - hostanme: windows-pc - connection_username: Administrator - connection_password: Password01 - encrypt: no - integrity_level: elevated - process_username: Administrator - process_password: Password01 - executable: powershell.exe - arguments: (New-Object -ComObject Microsoft.Update.Session).CreateUpdateInstaller().IsBusy - - - name: Download and run ConfigureRemotingForAnsible.ps1 to setup WinRM - community.windows.psexec: - hostname: '{{ hostvars[inventory_hostname]["ansible_host"] | default(inventory_hostname) }}' - connection_username: '{{ ansible_user }}' - connection_password: '{{ ansible_password }}' - encrypt: yes - executable: powershell.exe - arguments: '-' - stdin: | - $ErrorActionPreference = "Stop" - $sec_protocols = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::SystemDefault - $sec_protocols = $sec_protocols -bor [Net.SecurityProtocolType]::Tls12 - [Net.ServicePointManager]::SecurityProtocol = $sec_protocols - $url = "https://github.com/ansible/ansible/raw/devel/examples/scripts/ConfigureRemotingForAnsible.ps1" - Invoke-Expression ((New-Object Net.WebClient).DownloadString($url)) - exit - delegate_to: localhost - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- msg - -
- string -
-
module failed -
Any exception details when trying to run the process
-
-
Sample:
-
Received exception from remote PAExec service: Failed to start "invalid.exe". The system cannot find the file specified. [Err=0x2, 2]
-
-
- pid - -
- integer -
-
success and asynchronous is 'yes' -
The process ID of the asynchronous process that was created
-
-
Sample:
-
719
-
-
- rc - -
- integer -
-
success and asynchronous is 'no' -
The return code of the remote process
-
-
-
- stderr - -
- string -
-
success and interactive or asynchronous is 'no' -
The stderr from the remote process
-
-
Sample:
-
Error [10] running process
-
-
- stdout - -
- string -
-
success and interactive or asynchronous is 'no' -
The stdout from the remote process
-
-
Sample:
-
Hello World
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Jordan Borean (@jborean93) diff --git a/docs/community.windows.win_audit_policy_system_module.rst b/docs/community.windows.win_audit_policy_system_module.rst deleted file mode 100644 index a537ea2f..00000000 --- a/docs/community.windows.win_audit_policy_system_module.rst +++ /dev/null @@ -1,176 +0,0 @@ -.. _community.windows.win_audit_policy_system_module: - - -***************************************** -community.windows.win_audit_policy_system -***************************************** - -**Used to make changes to the system wide Audit Policy** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Used to make changes to the system wide Audit Policy. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- audit_type - -
- list - / elements=string - / required -
-
-
    Choices: -
  • failure
  • -
  • none
  • -
  • success
  • -
-
-
The type of event you would like to audit for.
-
Accepts a list. See examples.
-
-
- category - -
- string -
-
- -
Single string value for the category you would like to adjust the policy on.
-
Cannot be used with subcategory. You must define one or the other.
-
Changing this setting causes all subcategories to be adjusted to the defined audit_type.
-
-
- subcategory - -
- string -
-
- -
Single string value for the subcategory you would like to adjust the policy on.
-
Cannot be used with category. You must define one or the other.
-
-
- - -Notes ------ - -.. note:: - - It is recommended to take a backup of the policies before adjusting them for the first time. - - See this page for in depth information https://technet.microsoft.com/en-us/library/cc766468.aspx. - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_audit_rule_module` - The official documentation on the **community.windows.win_audit_rule** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Enable failure auditing for the subcategory "File System" - community.windows.win_audit_policy_system: - subcategory: File System - audit_type: failure - - - name: Enable all auditing types for the category "Account logon events" - community.windows.win_audit_policy_system: - category: Account logon events - audit_type: success, failure - - - name: Disable auditing for the subcategory "File System" - community.windows.win_audit_policy_system: - subcategory: File System - audit_type: none - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- current_audit_policy - -
- dictionary -
-
always -
details on the policy being targetted
-
-
Sample:
-
{ - "File Share":"failure" - }
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Noah Sparks (@nwsparks) diff --git a/docs/community.windows.win_audit_rule_module.rst b/docs/community.windows.win_audit_rule_module.rst deleted file mode 100644 index c076e118..00000000 --- a/docs/community.windows.win_audit_rule_module.rst +++ /dev/null @@ -1,298 +0,0 @@ -.. _community.windows.win_audit_rule_module: - - -******************************** -community.windows.win_audit_rule -******************************** - -**Adds an audit rule to files, folders, or registry keys** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Used to apply audit rules to files, folders or registry keys. -- Once applied, it will begin recording the user who performed the operation defined into the Security Log in the Event viewer. -- The behavior is designed to ignore inherited rules since those cannot be adjusted without first disabling the inheritance behavior. It will still print inherited rules in the output though for debugging purposes. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- audit_flags - -
- list - / elements=string - / required -
-
-
    Choices: -
  • Failure
  • -
  • Success
  • -
-
-
Defines whether to log on failure, success, or both.
-
To log both define as comma separated list "Success, Failure".
-
-
- inheritance_flags - -
- list - / elements=string -
-
-
    Choices: -
  • ContainerInherit
  • -
  • ObjectInherit
  • -
- Default:
"ContainerInherit,ObjectInherit"
-
-
Defines what objects inside of a folder or registry key will inherit the settings.
-
If you are setting a rule on a file, this value has to be changed to none.
-
For more information on the choices see MSDN PropagationFlags enumeration at https://msdn.microsoft.com/en-us/library/system.security.accesscontrol.inheritanceflags.aspx.
-
-
- path - -
- path - / required -
-
- -
Path to the file, folder, or registry key.
-
Registry paths should be in Powershell format, beginning with an abbreviation for the root such as, HKLM:\Software.
-

aliases: dest, destination
-
-
- propagation_flags - -
- - -
-
-
    Choices: -
  • None ←
  • -
  • InherityOnly
  • -
  • NoPropagateInherit
  • -
-
-
Propagation flag on the audit rules.
-
This value is ignored when the path type is a file.
-
For more information on the choices see MSDN PropagationFlags enumeration at https://msdn.microsoft.com/en-us/library/system.security.accesscontrol.propagationflags.aspx.
-
-
- rights - -
- list - / elements=string - / required -
-
- -
Comma separated list of the rights desired. Only required for adding a rule.
-
If path is a file or directory, rights can be any right under MSDN FileSystemRights https://msdn.microsoft.com/en-us/library/system.security.accesscontrol.filesystemrights.aspx.
-
If path is a registry key, rights can be any right under MSDN RegistryRights https://msdn.microsoft.com/en-us/library/system.security.accesscontrol.registryrights.aspx.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Whether the rule should be present or absent.
-
For absent, only path, user, and state are required.
-
Specifying absent will remove all rules matching the defined user.
-
-
- user - -
- string - / required -
-
- -
The user or group to adjust rules for.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_audit_policy_system_module` - The official documentation on the **community.windows.win_audit_policy_system** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Add filesystem audit rule for a folder - community.windows.win_audit_rule: - path: C:\inetpub\wwwroot\website - user: BUILTIN\Users - rights: write,delete,changepermissions - audit_flags: success,failure - inheritance_flags: ContainerInherit,ObjectInherit - - - name: Add filesystem audit rule for a file - community.windows.win_audit_rule: - path: C:\inetpub\wwwroot\website\web.config - user: BUILTIN\Users - rights: write,delete,changepermissions - audit_flags: success,failure - inheritance_flags: None - - - name: Add registry audit rule - community.windows.win_audit_rule: - path: HKLM:\software - user: BUILTIN\Users - rights: delete - audit_flags: 'success' - - - name: Remove filesystem audit rule - community.windows.win_audit_rule: - path: C:\inetpub\wwwroot\website - user: BUILTIN\Users - state: absent - - - name: Remove registry audit rule - community.windows.win_audit_rule: - path: HKLM:\software - user: BUILTIN\Users - state: absent - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- current_audit_rules - -
- dictionary -
-
always -
The current rules on the defined path
-
Will return "No audit rules defined on path"
-
-
Sample:
-
{ - "audit_flags": "Success", - "user": "Everyone", - "inheritance_flags": "False", - "is_inherited": "False", - "propagation_flags": "None", - "rights": "Delete" - }
-
-
- path_type - -
- string -
-
always -
The type of path being targetted.
-
Will be one of file, directory, registry.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Noah Sparks (@nwsparks) diff --git a/docs/community.windows.win_auto_logon_module.rst b/docs/community.windows.win_auto_logon_module.rst deleted file mode 100644 index 5b59578b..00000000 --- a/docs/community.windows.win_auto_logon_module.rst +++ /dev/null @@ -1,147 +0,0 @@ -.. _community.windows.win_auto_logon_module: - - -******************************** -community.windows.win_auto_logon -******************************** - -**Adds or Sets auto logon registry keys.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Used to apply auto logon registry setting. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- logon_count - -
- integer -
-
- -
The number of times to do an automatic logon.
-
This count is deremented by Windows everytime an automatic logon is performed.
-
Once the count reaches 0 then the automatic logon process is disabled.
-
-
- password - -
- string -
-
- -
Password to be used for automatic login.
-
Must be set when state=present.
-
Value of this input will be used as password for username.
-
While this value is encrypted by LSA it is decryptable to any user who is an Administrator on the remote host.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Whether the registry key should be present or absent.
-
-
- username - -
- string -
-
- -
Username to login automatically.
-
Must be set when state=present.
-
This can be the Netlogon or UPN of a domain account and is automatically parsed to the DefaultUserName and DefaultDomainName registry properties.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - - name: Set autologon for user1 - community.windows.win_auto_logon: - username: User1 - password: str0ngp@ssword - - - name: Set autologon for abc.com\user1 - community.windows.win_auto_logon: - username: abc.com\User1 - password: str0ngp@ssword - - - name: Remove autologon for user1 - community.windows.win_auto_logon: - state: absent - - - name: Set autologon for user1 with a limited logon count - community.windows.win_auto_logon: - username: User1 - password: str0ngp@ssword - logon_count: 5 - - - - -Status ------- - - -Authors -~~~~~~~ - -- Prasoon Karunan V (@prasoonkarunan) diff --git a/docs/community.windows.win_certificate_info_module.rst b/docs/community.windows.win_certificate_info_module.rst deleted file mode 100644 index 2d541a34..00000000 --- a/docs/community.windows.win_certificate_info_module.rst +++ /dev/null @@ -1,627 +0,0 @@ -.. _community.windows.win_certificate_info_module: - - -************************************** -community.windows.win_certificate_info -************************************** - -**Get information on certificates from a Windows Certificate Store** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Returns information about certificates in a Windows Certificate Store. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- store_location - -
- string -
-
-
    Choices: -
  • CurrentUser
  • -
  • LocalMachine ←
  • -
-
-
The location of the store to search.
-
-
- store_name - -
- string -
-
- Default:
"My"
-
-
The name of the store to search.
- -
-
- thumbprint - -
- string -
-
- -
The thumbprint as a hex string of a certificate to find.
-
When specified, filters the certificates return value to a single certificate
-
See the examples for how to format the thumbprint.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`ansible.windows.win_certificate_store_module` - The official documentation on the **ansible.windows.win_certificate_store** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Obtain information about a particular certificate in the computer's personal store - community.windows.win_certificate_info: - thumbprint: BD7AF104CF1872BDB518D95C9534EA941665FD27 - register: mycert - - # thumbprint can also be lower case - - name: Obtain information about a particular certificate in the computer's personal store - community.windows.win_certificate_info: - thumbprint: bd7af104cf1872bdb518d95c9534ea941665fd27 - register: mycert - - - name: Obtain information about all certificates in the root store - community.windows.win_certificate_info: - store_name: Root - register: ca - - # Import a pfx and then get information on the certificates - - name: Import pfx certificate that is password protected - ansible.windows.win_certificate_store: - path: C:\Temp\cert.pfx - state: present - password: VeryStrongPasswordHere! - become: yes - become_method: runas - register: mycert - - - name: Obtain information on each certificate that was touched - community.windows.win_certificate_info: - thumbprint: "{{ item }}" - register: mycert_stats - loop: "{{ mycert.thumbprints }}" - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- certificates - -
- list - / elements=dictionary -
-
success -
A list of information about certificates found in the store, sorted by thumbprint.
-
-
  -
- archived - -
- boolean -
-
-
Indicates that the certificate is archived.
-
-
  -
- cert_data - -
- string -
-
-
The base64 encoded data of the entire certificate.
-
-
  -
- dns_names - -
- list - / elements=string -
-
-
Lists the registered dns names for the certificate.
-
-
Sample:
-
['*.m.wikiquote.org', '*.wikipedia.org']
-
  -
- extensions - -
- list - / elements=dictionary -
-
-
The collection of the certificates extensions.
-
-
Sample:
-
[{'critical': False, 'field': 'Subject Key Identifier', 'value': '88 27 17 09 a9 b6 18 60 8b ec eb ba f6 47 59 c5 52 54 a3 b7'}, {'critical': True, 'field': 'Basic Constraints', 'value': 'Subject Type=CA, Path Length Constraint=None'}, {'critical': False, 'field': 'Authority Key Identifier', 'value': 'KeyID=2b d0 69 47 94 76 09 fe f4 6b 8d 2e 40 a6 f7 47 4d 7f 08 5e'}, {'critical': False, 'field': 'CRL Distribution Points', 'value': '[1]CRL Distribution Point: Distribution Point Name:Full Name:URL=http://crl.apple.com/root.crl'}, {'critical': True, 'field': 'Key Usage', 'value': 'Digital Signature, Certificate Signing, Off-line CRL Signing, CRL Signing (86)'}, {'critical': False, 'field': None, 'value': '05 00'}]
-
  -
- friendly_name - -
- string -
-
-
The associated alias for the certificate.
-
-
Sample:
-
Microsoft Root Authority
-
  -
- has_private_key - -
- boolean -
-
-
Indicates that the certificate contains a private key.
-
-
  -
- intended_purposes - -
- list -
-
enhanced key usages extension exists. -
lists the intended applications for the certificate.
-
-
Sample:
-
['Server Authentication']
-
  -
- is_ca - -
- boolean -
-
basic constraints extension exists. -
Indicates that the certificate is a certificate authority (CA) certificate.
-
-
Sample:
-
True
-
  -
- issued_by - -
- string -
-
-
The certificate issuer's common name.
-
-
Sample:
-
Apple Root CA
-
  -
- issued_to - -
- string -
-
-
The certificate's common name.
-
-
Sample:
-
Apple Worldwide Developer Relations Certification Authority
-
  -
- issuer - -
- string -
-
-
The certificate issuer's distinguished name.
-
-
Sample:
-
CN=Apple Root CA, OU=Apple Certification Authority, O=Apple Inc., C=US
-
  -
- key_usages - -
- list - / elements=string -
-
key usages extension exists. -
Defines how the certificate key can be used.
-
If this value is not defined, the key can be used for any purpose.
-
-
Sample:
-
['CrlSign', 'KeyCertSign', 'DigitalSignature']
-
  -
- path_length_constraint - -
- integer -
-
basic constraints extension exists -
The number of levels allowed in a certificates path.
-
If this value is 0, the certificate does not have a restriction.
-
-
  -
- public_key - -
- string -
-
-
The base64 encoded public key of the certificate.
-
-
  -
- serial_number - -
- string -
-
-
The serial number of the certificate represented as a hexadecimal string
-
-
Sample:
-
01DEBCC4396DA010
-
  -
- signature_algorithm - -
- string -
-
-
The algorithm used to create the certificate's signature
-
-
Sample:
-
sha1RSA
-
  -
- ski - -
- string -
-
subject key identifier extension exists. -
The certificate's subject key identifier
-
-
Sample:
-
88271709A9B618608BECEBBAF64759C55254A3B7
-
  -
- subject - -
- string -
-
-
The certificate's distinguished name.
-
-
Sample:
-
CN=Apple Worldwide Developer Relations Certification Authority, OU=Apple Worldwide Developer Relations, O=Apple Inc., C=US
-
  -
- thumbprint - -
- string -
-
-
The thumbprint as a hex string of the certificate.
-
The return format will always be upper case.
-
-
Sample:
-
FF6797793A3CD798DC5B2ABEF56F73EDC9F83A64
-
  -
- valid_from - -
- float -
-
-
The start date of the certificate represented in seconds since epoch.
-
-
Sample:
-
1360255727
-
  -
- valid_from_iso8601 - -
- string -
-
-
The start date of the certificate represented as an iso8601 formatted date.
-
-
Sample:
-
2017-12-15T08:39:32Z
-
  -
- valid_to - -
- float -
-
-
The expiry date of the certificate represented in seconds since epoch.
-
-
Sample:
-
1675788527
-
  -
- valid_to_iso8601 - -
- string -
-
-
The expiry date of the certificate represented as an iso8601 formatted date.
-
-
Sample:
-
2086-01-02T08:39:32Z
-
  -
- version - -
- integer -
-
-
The x509 format version of the certificate
-
-
Sample:
-
3
-
-
- exists - -
- boolean -
-
success -
Whether any certificates were found in the store.
-
When thumbprint is specified, returns true only if the certificate mathing the thumbprint exists.
-
-
Sample:
-
True
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Micah Hunsberger (@mhunsber) diff --git a/docs/community.windows.win_computer_description_module.rst b/docs/community.windows.win_computer_description_module.rst deleted file mode 100644 index 1f8a5c8a..00000000 --- a/docs/community.windows.win_computer_description_module.rst +++ /dev/null @@ -1,125 +0,0 @@ -.. _community.windows.win_computer_description_module: - - -****************************************** -community.windows.win_computer_description -****************************************** - -**Set windows description, owner and organization** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module sets Windows description that is shown under My Computer properties. Module also sets Windows license owner and organization. License information can be viewed by running winver commad. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- description - -
- string -
-
- -
String value to apply to Windows descripton. Specify value of "" to clear the value.
-
-
- organization - -
- string -
-
- -
String value of organization that the Windows is licensed to. Specify value of "" to clear the value.
-
-
- owner - -
- string -
-
- -
String value of the persona that the Windows is licensed to. Specify value of "" to clear the value.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - - name: Set Windows description, owner and organization - community.windows.win_computer_description: - description: Best Box - owner: RusoSova - organization: MyOrg - register: result - - - name: Set Windows description only - community.windows.win_computer_description: - description: This is my Windows machine - register: result - - - name: Set organization and clear owner field - community.windows.win_computer_description: - owner: '' - organization: Black Mesa - - - name: Clear organization, description and owner - community.windows.win_computer_description: - organization: "" - owner: "" - description: "" - register: result - - - - -Status ------- - - -Authors -~~~~~~~ - -- RusoSova (@RusoSova) diff --git a/docs/community.windows.win_credential_module.rst b/docs/community.windows.win_credential_module.rst deleted file mode 100644 index 8571d354..00000000 --- a/docs/community.windows.win_credential_module.rst +++ /dev/null @@ -1,394 +0,0 @@ -.. _community.windows.win_credential_module: - - -******************************** -community.windows.win_credential -******************************** - -**Manages Windows Credentials in the Credential Manager** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Used to create and remove Windows Credentials in the Credential Manager. -- This module can manage both standard username/password credentials as well as certificate credentials. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- alias - -
- string -
-
- -
Adds an alias for the credential.
-
Typically this is the NetBIOS name of a host if name is set to the DNS name.
-
-
- attributes - -
- list - / elements=dictionary -
-
- -
A list of dicts that set application specific attributes for a credential.
-
When set, existing attributes will be compared to the list as a whole, any differences means all attributes will be replaced.
-
-
- data - -
- string -
-
- -
The value for the attribute.
-
-
- data_format - -
- string -
-
-
    Choices: -
  • base64
  • -
  • text ←
  • -
-
-
Controls the input type for data.
-
If text, data is a text string that is UTF-16LE encoded to bytes.
-
If base64, data is a base64 string that is base64 decoded to bytes.
-
-
- name - -
- string - / required -
-
- -
The key for the attribute.
-
This is not a unique identifier as multiple attributes can have the same key.
-
-
- comment - -
- string -
-
- -
A user defined comment for the credential.
-
-
- name - -
- string - / required -
-
- -
The target that identifies the server or servers that the credential is to be used for.
-
If the value can be a NetBIOS name, DNS server name, DNS host name suffix with a wildcard character (*), a NetBIOS of DNS domain name that contains a wildcard character sequence, or an asterisk.
-
See TargetName in https://docs.microsoft.com/en-us/windows/win32/api/wincred/ns-wincred-credentiala for more details on what this value can be.
-
This is used with type to produce a unique credential.
-
-
- persistence - -
- string -
-
-
    Choices: -
  • enterprise
  • -
  • local ←
  • -
-
-
Defines the persistence of the credential.
-
If local, the credential will persist for all logons of the same user on the same host.
-
enterprise is the same as local but the credential is visible to the same domain user when running on other hosts and not just localhost.
-
-
- secret - -
- string -
-
- -
The secret for the credential.
-
When omitted, then no secret is used for the credential if a new credentials is created.
-
When type is a password type, this is the password for username.
-
When type is a certificate type, this is the pin for the certificate.
-
-
- secret_format - -
- string -
-
-
    Choices: -
  • base64
  • -
  • text ←
  • -
-
-
Controls the input type for secret.
-
If text, secret is a text string that is UTF-16LE encoded to bytes.
-
If base64, secret is a base64 string that is base64 decoded to bytes.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
When absent, the credential specified by name and type is removed.
-
When present, the credential specified by name and type is removed.
-
-
- type - -
- string - / required -
-
-
    Choices: -
  • domain_certificate
  • -
  • domain_password
  • -
  • generic_certificate
  • -
  • generic_password
  • -
-
-
The type of credential to store.
-
This is used with name to produce a unique credential.
-
When the type is a domain type, the credential is used by Microsoft authentication packages like Negotiate.
-
When the type is a generic type, the credential is not used by any particular authentication package.
-
It is recommended to use a domain type as only authentication providers can access the secret.
-
-
- update_secret - -
- string -
-
-
    Choices: -
  • always ←
  • -
  • on_create
  • -
-
-
When always, the secret will always be updated if they differ.
-
When on_create, the secret will only be checked/updated when it is first created.
-
If the secret cannot be retrieved and this is set to always, the module will always result in a change.
-
-
- username - -
- string -
-
- -
When type is a password type, then this is the username to store for the credential.
-
When type is a credential type, then this is the thumbprint as a hex string of the certificate to use.
-
When type=domain_password, this should be in the form of a Netlogon (DOMAIN\Username) or a UPN (username@DOMAIN).
-
If using a certificate thumbprint, the certificate must exist in the CurrentUser\My certificate store for the executing user.
-
-
- - -Notes ------ - -.. note:: - - This module requires to be run with ``become`` so it can access the user's credential store. - - There can only be one credential per host and type. if a second credential is defined that uses the same host and type, then the original credential is overwritten. - - -See Also --------- - -.. seealso:: - - :ref:`ansible.windows.win_user_right_module` - The official documentation on the **ansible.windows.win_user_right** module. - :ref:`ansible.windows.win_whoami_module` - The official documentation on the **ansible.windows.win_whoami** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Create a local only credential - community.windows.win_credential: - name: server.domain.com - type: domain_password - username: DOMAIN\username - secret: Password01 - state: present - - - name: Remove a credential - community.windows.win_credential: - name: server.domain.com - type: domain_password - state: absent - - - name: Create a credential with full values - community.windows.win_credential: - name: server.domain.com - type: domain_password - alias: server - username: username@DOMAIN.COM - secret: Password01 - comment: Credential for server.domain.com - persistence: enterprise - attributes: - - name: Source - data: Ansible - - name: Unique Identifier - data: Y3VzdG9tIGF0dHJpYnV0ZQ== - data_format: base64 - - - name: Create a certificate credential - community.windows.win_credential: - name: '*.domain.com' - type: domain_certificate - username: 0074CC4F200D27DC3877C24A92BA8EA21E6C7AF4 - state: present - - - name: Create a generic credential - community.windows.win_credential: - name: smbhost - type: generic_password - username: smbuser - secret: smbuser - state: present - - - name: Remove a generic credential - community.windows.win_credential: - name: smbhost - type: generic_password - state: absent - - - - -Status ------- - - -Authors -~~~~~~~ - -- Jordan Borean (@jborean93) diff --git a/docs/community.windows.win_data_deduplication_module.rst b/docs/community.windows.win_data_deduplication_module.rst deleted file mode 100644 index 4aefede8..00000000 --- a/docs/community.windows.win_data_deduplication_module.rst +++ /dev/null @@ -1,219 +0,0 @@ -.. _community.windows.win_data_deduplication_module: - - -**************************************** -community.windows.win_data_deduplication -**************************************** - -**Module to enable Data Deduplication on a volume.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to enable Data Deduplication on a Windows volume. -- The module will install the FS-Data-Deduplication feature (a reboot will be necessary). - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- drive_letter - -
- string - / required -
-
- -
Windows drive letter on which to enable data deduplication.
-
-
- settings - -
- dictionary -
-
- -
Dictionary of settings to pass to the Set-DedupVolume powershell command.
-
-
- minimum_file_age_days - -
- integer -
-
- Default:
2
-
-
Minimum file age you want to target for deduplication.
-
-
- minimum_file_size - -
- integer -
-
- Default:
32768
-
-
Minimum file size you want to target for deduplication.
-
It will default to 32768 if not defined or if the value is less than 32768.
-
-
- no_compress - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Wether you want to enabled filesystem compression or not.
-
-
- optimize_in_use_files - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates that the server attempts to optimize currently open files.
-
-
- verify - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates whether the deduplication engine performs a byte-for-byte verification for each duplicate chunk that optimization creates, rather than relying on a cryptographically strong hash.
-
This option is not recommend.
-
Setting this parameter to True can degrade optimization performance.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Wether to enable or disable data deduplication on the selected volume.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - - name: Enable Data Deduplication on D - community.windows.win_data_deduplication: - drive_letter: 'D' - state: present - - - name: Enable Data Deduplication on D - community.windows.win_data_deduplication: - drive_letter: 'D' - state: present - settings: - no_compress: true - minimum_file_age_days: 1 - minimum_file_size: 0 - - - - -Status ------- - - -Authors -~~~~~~~ - -- rnsc (@rnsc) diff --git a/docs/community.windows.win_defrag_module.rst b/docs/community.windows.win_defrag_module.rst deleted file mode 100644 index 0bd590b0..00000000 --- a/docs/community.windows.win_defrag_module.rst +++ /dev/null @@ -1,283 +0,0 @@ -.. _community.windows.win_defrag_module: - - -**************************** -community.windows.win_defrag -**************************** - -**Consolidate fragmented files on local volumes** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Locates and consolidates fragmented files on local volumes to improve system performance. -- More information regarding ``win_defrag`` is available from: https://technet.microsoft.com/en-us/library/cc731650(v=ws.11.aspx) - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- defrag.exe - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- exclude_volumes - -
- list - / elements=string -
-
- -
A list of drive letters or mount point paths to exclude from defragmentation.
-
-
- freespace_consolidation - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Perform free space consolidation on the specified volumes.
-
-
- include_volumes - -
- list - / elements=string -
-
- -
A list of drive letters or mount point paths of the volumes to be defragmented.
-
If this parameter is omitted, all volumes (not excluded) will be fragmented.
-
-
- parallel - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Run the operation on each volume in parallel in the background.
-
-
- priority - -
- string -
-
-
    Choices: -
  • low ←
  • -
  • normal
  • -
-
-
Run the operation at low or normal priority.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - - name: Defragment all local volumes (in parallel) - community.windows.win_defrag: - parallel: yes - - - name: 'Defragment all local volumes, except C: and D:' - community.windows.win_defrag: - exclude_volumes: [ C, D ] - - - name: 'Defragment volume D: with normal priority' - community.windows.win_defrag: - include_volumes: D - priority: normal - - - name: Consolidate free space (useful when reducing volumes) - community.windows.win_defrag: - freespace_consolidation: yes - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- changed - -
- boolean -
-
always -
Whether or not any changes were made.
-
-
Sample:
-
True
-
-
- cmd - -
- string -
-
always -
The complete command line used by the module.
-
-
Sample:
-
defrag.exe /C /V
-
-
- msg - -
- string -
-
failed -
Possible error message on failure.
-
-
Sample:
-
Command 'defrag.exe' not found in $env:PATH.
-
-
- rc - -
- integer -
-
always -
The return code for the command.
-
-
-
- stderr - -
- string -
-
always -
The error output from the command.
-
-
-
- stdout - -
- string -
-
always -
The standard output from the command.
-
-
Sample:
-
Success.
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Dag Wieers (@dagwieers) diff --git a/docs/community.windows.win_dhcp_lease_module.rst b/docs/community.windows.win_dhcp_lease_module.rst deleted file mode 100644 index 41149c26..00000000 --- a/docs/community.windows.win_dhcp_lease_module.rst +++ /dev/null @@ -1,307 +0,0 @@ -.. _community.windows.win_dhcp_lease_module: - - -******************************** -community.windows.win_dhcp_lease -******************************** - -**Manage Windows Server DHCP Leases** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manage Windows Server DHCP Leases (IPv4 Only) -- Adds, Removes and Modifies DHCP Leases and Reservations -- Task should be delegated to a Windows DHCP Server - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- This module requires Windows Server 2012 or Newer - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- description - -
- string -
-
- -
Specifies the description for reservation being created.
-
Only applicable to l(type=reservation).
-
-
- dns_hostname - -
- string -
-
- -
Specifies the DNS hostname of the client for which the IP address lease is to be added.
-
-
- dns_regtype - -
- string -
-
-
    Choices: -
  • aptr ←
  • -
  • a
  • -
  • noreg
  • -
-
-
Indicates the type of DNS record to be registered by the DHCP. server service for this lease.
-
l(a) results in an A record being registered.
-
l(aptr) results in both A and PTR records to be registered.
-
l(noreg) results in no DNS records being registered.
-
-
- duration - -
- integer -
-
- -
Specifies the duration of the DHCP lease in days.
-
The duration value only applies to l(type=lease).
-
Defaults to the duration specified by the DHCP server configuration.
-
Only applicable to l(type=lease).
-
-
- ip - -
- string -
-
- -
The IPv4 address of the client server/computer.
-
This is a required parameter, if l(mac) is not set.
-
Can be used to identify an existing lease/reservation, instead of l(mac).
-
-
- mac - -
- string -
-
- -
Specifies the client identifier to be set on the IPv4 address.
-
This is a required parameter, if l(ip) is not set.
-
Windows clients use the MAC address as the client ID.
-
Linux and other operating systems can use other types of identifiers.
-
Can be used to identify an existing lease/reservation, instead of l(ip).
-
-
- reservation_name - -
- string -
-
- -
Specifies the name of the reservation being created.
-
Only applicable to l(type=reservation).
-
-
- scope_id - -
- string -
-
- -
Specifies the scope identifier as defined by the DHCP server.
-
This is a required parameter, if l(state=present) and the reservation or lease doesn't already exist. Not required if updating an existing lease or reservation.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Specifies the desired state of the DHCP lease or reservation.
-
-
- type - -
- string -
-
-
    Choices: -
  • reservation ←
  • -
  • lease
  • -
-
-
The type of DHCP address.
-
Leases expire as defined by l(duration).
-
When l(duration) is not specified, the server default is used.
-
Reservations are permanent.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - - name: Ensure DHCP reservation exists - community.windows.win_dhcp_lease: - type: reservation - ip: 192.168.100.205 - scope_id: 192.168.100.0 - mac: 00:B1:8A:D1:5A:1F - dns_hostname: "{{ ansible_inventory }}" - description: Testing Server - - - name: Ensure DHCP lease or reservation does not exist - community.windows.win_dhcp_lease: - mac: 00:B1:8A:D1:5A:1F - state: absent - - - name: Ensure DHCP lease or reservation does not exist - community.windows.win_dhcp_lease: - ip: 192.168.100.205 - state: absent - - - name: Convert DHCP lease to reservation & update description - community.windows.win_dhcp_lease: - type: reservation - ip: 192.168.100.205 - description: Testing Server - - - name: Convert DHCP reservation to lease - community.windows.win_dhcp_lease: - type: lease - ip: 192.168.100.205 - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- lease - -
- dictionary -
-
When l(state=present) -
New/Updated DHCP object parameters
-
-
Sample:
-
{'address_state': 'InactiveReservation', 'client_id': '0a-0b-0c-04-05-aa', 'description': 'Really Fancy', 'ip_address': '172.16.98.230', 'name': None, 'scope_id': '172.16.98.0'}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Joe Zollo (@joezollo) diff --git a/docs/community.windows.win_disk_facts_module.rst b/docs/community.windows.win_disk_facts_module.rst deleted file mode 100644 index a2283364..00000000 --- a/docs/community.windows.win_disk_facts_module.rst +++ /dev/null @@ -1,3247 +0,0 @@ -.. _community.windows.win_disk_facts_module: - - -******************************** -community.windows.win_disk_facts -******************************** - -**Show the attached disks and disk information of the target host** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- With the module you can retrieve and output detailed information about the attached disks of the target and its volumes and partitions if existent. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- Windows 8.1 / Windows 2012 (NT 6.2) - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- filter - -
- list - / elements=string -
-
added in 1.9.0
-
-
    Choices: -
  • physical_disk ←
  • -
  • virtual_disk ←
  • -
  • win32_disk_drive ←
  • -
  • partitions ←
  • -
  • volumes ←
  • -
- Default:
["physical_disk", "virtual_disk", "win32_disk_drive", "partitions", "volumes"]
-
-
Allows to filter returned facts by type of disk information.
-
If volumes are selected partitions will be returned as well.
-
-
- - -Notes ------ - -.. note:: - - In order to understand all the returned properties and values please visit the following site and open the respective MSFT class https://msdn.microsoft.com/en-us/library/windows/desktop/hh830612.aspx - - - -Examples --------- - -.. code-block:: yaml - - - name: Get disk facts - community.windows.win_disk_facts: - - - name: Output first disk size - debug: - var: ansible_facts.disks[0].size - - - name: Convert first system disk into various formats - debug: - msg: '{{ disksize_gib }} vs {{ disksize_gib_human }}' - vars: - # Get first system disk - disk: '{{ ansible_facts.disks|selectattr("system_disk")|first }}' - - # Show disk size in Gibibytes - disksize_gib_human: '{{ disk.size|filesizeformat(true) }}' # returns "223.6 GiB" (human readable) - disksize_gib: '{{ (disk.size/1024|pow(3))|round|int }} GiB' # returns "224 GiB" (value in GiB) - - # Show disk size in Gigabytes - disksize_gb_human: '{{ disk.size|filesizeformat }}' # returns "240.1 GB" (human readable) - disksize_gb: '{{ (disk.size/1000|pow(3))|round|int }} GB' # returns "240 GB" (value in GB) - - - name: Output second disk serial number - debug: - var: ansible_facts.disks[1].serial_number - - - name: get disk physical_disk and partition facts on the target - win_disk_facts: - filter: - - physical_disk - - partitions - - -Returned Facts --------------- -Facts returned by this module are added/updated in the ``hostvars`` host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them. - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FactReturnedDescription
-
- ansible_disks - -
- list -
-
if disks were found -
Detailed information about one particular disk. -
-
-
-
- bootable - -
- boolean -
-
always -
Information whether the particular disk is a bootable disk. -
-
-
-
- bus_type - -
- string -
-
always -
Bus type of the particular disk. -
-
-
Sample:
-
SCSI
-
-
- clustered - -
- boolean -
-
always -
Information whether the particular disk is clustered (part of a failover cluster). -
-
-
-
- firmware_version - -
- string -
-
always -
Firmware version of the particular disk. -
-
-
Sample:
-
0001
-
-
- friendly_name - -
- string -
-
always -
Friendly name of the particular disk. -
-
-
Sample:
-
Red Hat VirtIO SCSI Disk Device
-
-
- guid - -
- string -
-
if existent -
GUID of the particular disk on the target. -
-
-
Sample:
-
{efa5f928-57b9-47fc-ae3e-902e85fbe77f}
-
-
- location - -
- string -
-
always -
Location of the particular disk on the target. -
-
-
Sample:
-
PCIROOT(0)#PC0400#SCSP00T00L00
-
-
- manufacturer - -
- string -
-
always -
Manufacturer of the particular disk. -
-
-
Sample:
-
Red Hat
-
-
- model - -
- string -
-
always -
Model specification of the particular disk. -
-
-
Sample:
-
VirtIO
-
-
- number - -
- integer -
-
always -
Disk number of the particular disk. -
-
-
-
- operational_status - -
- string -
-
always -
Operational status of the particular disk. -
-
-
Sample:
-
Online
-
-
- partition_count - -
- integer -
-
always -
Number of partitions on the particular disk. -
-
-
Sample:
-
4
-
-
- partition_style - -
- string -
-
always -
Partition style of the particular disk. -
-
-
Sample:
-
MBR
-
-
- partitions - -
- list -
-
if existent -
Detailed information about one particular partition on the specified disk. -
-
-
-
- access_paths - -
- string -
-
if existent -
Access paths of the particular partition. -
-
-
Sample:
-
\\?\Volume{85bdc4a8-f8eb-11e6-80fa-806e6f6e6963}\
-
-
- active - -
- boolean -
-
if partition_style property of the particular disk has value "MBR" -
Information whether the particular partition is an active partition or not. -
-
-
Sample:
-
True
-
-
- drive_letter - -
- string -
-
if existent -
Drive letter of the particular partition. -
-
-
Sample:
-
C
-
-
- gpt_type - -
- string -
-
if partition_style property of the particular disk has value "GPT" -
gpt type of the particular partition. -
-
-
Sample:
-
{e3c9e316-0b5c-4db8-817d-f92df00215ae}
-
-
- guid - -
- string -
-
if existent -
GUID of the particular partition. -
-
-
Sample:
-
{302e475c-6e64-4674-a8e2-2f1c7018bf97}
-
-
- hidden - -
- boolean -
-
always -
Information whether the particular partition is hidden or not. -
-
-
Sample:
-
True
-
-
- mbr_type - -
- integer -
-
if partition_style property of the particular disk has value "MBR" -
mbr type of the particular partition. -
-
-
Sample:
-
7
-
-
- no_default_driveletter - -
- boolean -
-
if partition_style property of the particular disk has value "GPT" -
Information whether the particular partition has a default drive letter or not. -
-
-
Sample:
-
True
-
-
- number - -
- integer -
-
always -
Number of the particular partition. -
-
-
Sample:
-
1
-
-
- offset - -
- integer -
-
always -
Offset of the particular partition. -
-
-
Sample:
-
368050176
-
-
- shadow_copy - -
- boolean -
-
always -
Information whether the particular partition is a shadow copy of another partition. -
-
-
-
- size - -
- integer -
-
always -
Size in bytes of the particular partition. -
-
-
Sample:
-
838860800
-
-
- transition_state - -
- integer -
-
always -
Transition state of the particular partition. -
-
-
Sample:
-
1
-
-
- type - -
- string -
-
always -
Type of the particular partition. -
-
-
Sample:
-
IFS
-
-
- volumes - -
- list -
-
if existent -
Detailed information about one particular volume on the specified partition. -
-
-
-
- allocation_unit_size - -
- integer -
-
always -
Allocation unit size in bytes of the particular volume. -
-
-
Sample:
-
4096
-
-
- drive_type - -
- string -
-
always -
Drive type of the particular volume. -
-
-
Sample:
-
Fixed
-
-
- health_status - -
- string -
-
always -
Health status of the particular volume. -
-
-
Sample:
-
Healthy
-
-
- label - -
- string -
-
always -
File system label of the particular volume. -
-
-
Sample:
-
System Reserved
-
-
- object_id - -
- string -
-
always -
Object ID of the particular volume. -
-
-
Sample:
-
\\?\Volume{85bdc4a9-f8eb-11e6-80fa-806e6f6e6963}\
-
-
- path - -
- string -
-
always -
Path of the particular volume. -
-
-
Sample:
-
\\?\Volume{85bdc4a9-f8eb-11e6-80fa-806e6f6e6963}\
-
-
- size - -
- integer -
-
always -
Size in bytes of the particular volume. -
-
-
Sample:
-
838856704
-
-
- size_remaining - -
- integer -
-
always -
Remaining size in bytes of the particular volume. -
-
-
Sample:
-
395620352
-
-
- type - -
- string -
-
always -
File system type of the particular volume. -
-
-
Sample:
-
NTFS
-
-
- path - -
- string -
-
always -
Path of the particular disk on the target. -
-
-
Sample:
-
\\?\scsi#disk&ven_red_hat&prod_virtio#4&23208fd0&1&000000#{<id>}
-
-
- physical_disk - -
- complex -
-
if existent -
Detailed information about physical disk properties of the particular disk. -
-
-
-
- allocated_size - -
- integer -
-
always -
Allocated size in bytes of the particular physical disk. -
-
-
Sample:
-
240057409536
-
-
- bus_type - -
- string -
-
always -
Bus type of the particular physical disk. -
-
-
Sample:
-
SCSI
-
-
- can_pool - -
- boolean -
-
always -
Information whether the particular physical disk can be added to a storage pool. -
-
-
-
- cannot_pool_reason - -
- string -
-
if can_pool property has value false -
Information why the particular physical disk can not be added to a storage pool. -
-
-
Sample:
-
Insufficient Capacity
-
-
- device_id - -
- string -
-
always -
Device ID of the particular physical disk. -
-
-
Sample:
-
0
-
-
- friendly_name - -
- string -
-
always -
Friendly name of the particular physical disk. -
-
-
Sample:
-
PhysicalDisk0
-
-
- health_status - -
- string -
-
always -
Health status of the particular physical disk. -
-
-
Sample:
-
Healthy
-
-
- indication_enabled - -
- boolean -
-
always -
Information whether indication is enabled for the particular physical disk. -
-
-
Sample:
-
True
-
-
- manufacturer - -
- string -
-
always -
Manufacturer of the particular physical disk. -
-
-
Sample:
-
SUSE
-
-
- media_type - -
- string -
-
always -
Media type of the particular physical disk. -
-
-
Sample:
-
UnSpecified
-
-
- model - -
- string -
-
always -
Model of the particular physical disk. -
-
-
Sample:
-
Xen Block
-
-
- object_id - -
- string -
-
always -
Object ID of the particular physical disk. -
-
-
Sample:
-
{1}\\\\HOST\\root/Microsoft/Windows/Storage/Providers_v2\\SPACES_PhysicalDisk.ObjectId=\"{<object_id>}:PD:{<pd>}\"
-
-
- operational_status - -
- string -
-
always -
Operational status of the particular physical disk. -
-
-
Sample:
-
OK
-
-
- partial - -
- boolean -
-
always -
Information whether the particular physical disk is partial. -
-
-
-
- physical_location - -
- string -
-
always -
Physical location of the particular physical disk. -
-
-
Sample:
-
Integrated : Adapter 3 : Port 0 : Target 0 : LUN 0
-
-
- serial_number - -
- string -
-
always -
Serial number of the particular physical disk. -
-
-
Sample:
-
b62beac80c3645e5877f
-
-
- size - -
- integer -
-
always -
Size in bytes of the particular physical disk. -
-
-
Sample:
-
240057409536
-
-
- spindle_speed - -
- integer -
-
always -
Spindle speed in rpm of the particular physical disk. -
-
-
Sample:
-
4294967295
-
-
- supported_usages - -
- complex -
-
always -
Supported usage types of the particular physical disk. -
-
-
-
- Count - -
- integer -
-
always -
Count of supported usage types. -
-
-
Sample:
-
5
-
-
- value - -
- string -
-
always -
List of supported usage types. -
-
-
Sample:
-
Auto-Select, Hot Spare
-
-
- unique_id - -
- string -
-
always -
Unique ID of the particular physical disk. -
-
-
Sample:
-
3141463431303031
-
-
- usage_type - -
- string -
-
always -
Usage type of the particular physical disk. -
-
-
Sample:
-
Auto-Select
-
-
- read_only - -
- boolean -
-
always -
Read only status of the particular disk. -
-
-
Sample:
-
True
-
-
- sector_size - -
- integer -
-
always -
Sector size in bytes of the particular disk. -
-
-
Sample:
-
4096
-
-
- serial_number - -
- string -
-
always -
Serial number of the particular disk on the target. -
-
-
Sample:
-
b62beac80c3645e5877f
-
-
- size - -
- integer -
-
always -
Size in bytes of the particular disk. -
-
-
Sample:
-
227727638528
-
-
- system_disk - -
- boolean -
-
always -
Information whether the particular disk is a system disk. -
-
-
Sample:
-
True
-
-
- unique_id - -
- string -
-
always -
Unique ID of the particular disk on the target. -
-
-
Sample:
-
3141463431303031
-
-
- virtual_disk - -
- complex -
-
if existent -
Detailed information about virtual disk properties of the particular disk. -
-
-
-
- access - -
- string -
-
always -
Access of the particular virtual disk. -
-
-
Sample:
-
Read/Write
-
-
- allocated_size - -
- integer -
-
always -
Allocated size in bytes of the particular virtual disk. -
-
-
Sample:
-
240057409536
-
-
- allocation_unit_size - -
- integer -
-
always -
Allocation unit size in bytes of the particular virtual disk. -
-
-
Sample:
-
4096
-
-
- available_copies - -
- integer -
-
if existent -
Number of the available copies of the particular virtual disk. -
-
-
Sample:
-
1
-
-
- columns - -
- integer -
-
always -
Number of the columns of the particular virtual disk. -
-
-
Sample:
-
2
-
-
- deduplication_enabled - -
- boolean -
-
always -
Information whether deduplication is enabled for the particular virtual disk. -
-
-
Sample:
-
True
-
-
- detached_reason - -
- string -
-
always -
Detached reason of the particular virtual disk. -
-
-
Sample:
-
None
-
-
- enclosure_aware - -
- boolean -
-
always -
Information whether the particular virtual disk is enclosure aware. -
-
-
-
- fault_domain_awareness - -
- string -
-
always -
Fault domain awareness of the particular virtual disk. -
-
-
Sample:
-
PhysicalDisk
-
-
- footprint_on_pool - -
- integer -
-
always -
Footprint on pool in bytes of the particular virtual disk. -
-
-
Sample:
-
240057409536
-
-
- friendly_name - -
- string -
-
always -
Friendly name of the particular virtual disk. -
-
-
Sample:
-
Prod2 Virtual Disk
-
-
- groups - -
- integer -
-
always -
Number of the groups of the particular virtual disk. -
-
-
Sample:
-
1
-
-
- health_status - -
- string -
-
always -
Health status of the particular virtual disk. -
-
-
Sample:
-
Healthy
-
-
- inter_leave - -
- integer -
-
always -
Inter leave in bytes of the particular virtual disk. -
-
-
Sample:
-
102400
-
-
- logical_sector_size - -
- integer -
-
always -
Logical sector size in byte of the particular virtual disk. -
-
-
Sample:
-
512
-
-
- manual_attach - -
- boolean -
-
always -
Information whether the particular virtual disk is manual attached. -
-
-
Sample:
-
True
-
-
- media_type - -
- string -
-
always -
Media type of the particular virtual disk. -
-
-
Sample:
-
Unspecified
-
-
- name - -
- string -
-
always -
Name of the particular virtual disk. -
-
-
Sample:
-
vDisk1
-
-
- object_id - -
- string -
-
always -
Object ID of the particular virtual disk. -
-
-
Sample:
-
{1}\\\\HOST\\root/Microsoft/Windows/Storage/Providers_v2\\SPACES_VirtualDisk.ObjectId=\"{<object_id>}:VD:{<vd>}\"
-
-
- operational_status - -
- string -
-
always -
Operational status of the particular virtual disk. -
-
-
Sample:
-
OK
-
-
- parity_layout - -
- integer -
-
if existent -
Parity layout of the particular virtual disk. -
-
-
Sample:
-
1
-
-
- physical_disk_redundancy - -
- integer -
-
always -
Type of the physical disk redundancy of the particular virtual disk. -
-
-
Sample:
-
1
-
-
- physical_sector_size - -
- integer -
-
always -
Physical sector size in bytes of the particular virtual disk. -
-
-
Sample:
-
4096
-
-
- provisioning_type - -
- string -
-
always -
Provisioning type of the particular virtual disk. -
-
-
Sample:
-
Thin
-
-
- read_cache_size - -
- integer -
-
always -
Read cache size in byte of the particular virtual disk. -
-
-
-
- request_no_spof - -
- boolean -
-
always -
Information whether the particular virtual disk requests no single point of failure. -
-
-
Sample:
-
True
-
-
- resiliency_setting_name - -
- integer -
-
always -
Type of the physical disk redundancy of the particular virtual disk. -
-
-
Sample:
-
1
-
-
- size - -
- integer -
-
always -
Size in bytes of the particular virtual disk. -
-
-
Sample:
-
240057409536
-
-
- snapshot - -
- boolean -
-
always -
Information whether the particular virtual disk is a snapshot. -
-
-
-
- tiered - -
- boolean -
-
always -
Information whether the particular virtual disk is tiered. -
-
-
Sample:
-
True
-
-
- unique_id - -
- string -
-
always -
Unique ID of the particular virtual disk. -
-
-
Sample:
-
260542E4C6B01D47A8FA7630FD90FFDE
-
-
- unique_id_format - -
- string -
-
always -
Unique ID format of the particular virtual disk. -
-
-
Sample:
-
Vendor Specific
-
-
- write_cache_size - -
- integer -
-
always -
Write cache size in byte of the particular virtual disk. -
-
-
Sample:
-
100
-
-
- win32_disk_drive - -
- complex -
-
if existent -
Representation of the Win32_DiskDrive class. -
-
-
-
- availability - -
- integer -
-
always -
Availability and status of the device. -
-
-
-
- bytes_per_sector - -
- integer -
-
always -
Number of bytes in each sector for the physical disk drive. -
-
-
Sample:
-
512
-
-
- capabilities - -
- list -
-
always -
Array of capabilities of the media access device. -
-
For example, the device may support random access (3), removable media (7), and automatic cleaning (9). -
-
-
Sample:
-
[3, 4]
-
-
- capability_descriptions - -
- list -
-
always -
List of more detailed explanations for any of the access device features indicated in the Capabilities array. -
-
Note, each entry of this array is related to the entry in the Capabilities array that is located at the same index. -
-
-
Sample:
-
['Random Access', 'Supports Writing']
-
-
- caption - -
- string -
-
always -
Short description of the object. -
-
-
Sample:
-
VMware Virtual disk SCSI Disk Device
-
-
- compression_method - -
- string -
-
always -
Algorithm or tool used by the device to support compression. -
-
-
Sample:
-
Compressed
-
-
- config_manager_error_code - -
- integer -
-
always -
Windows Configuration Manager error code. -
-
-
-
- config_manager_user_config - -
- boolean -
-
always -
If True, the device is using a user-defined configuration. -
-
-
Sample:
-
True
-
-
- creation_class_name - -
- string -
-
always -
Name of the first concrete class to appear in the inheritance chain used in the creation of an instance. -
-
When used with the other key properties of the class, the property allows all instances of this class -
-
and its subclasses to be uniquely identified. -
-
-
Sample:
-
Win32_DiskDrive
-
-
- default_block_size - -
- integer -
-
always -
Default block size, in bytes, for this device. -
-
-
Sample:
-
512
-
-
- description - -
- string -
-
always -
Description of the object. -
-
-
Sample:
-
Disk drive
-
-
- device_id - -
- string -
-
always -
Unique identifier of the disk drive with other devices on the system. -
-
-
Sample:
-
\\.\PHYSICALDRIVE0
-
-
- error_cleared - -
- boolean -
-
always -
If True, the error reported in LastErrorCode is now cleared. -
-
-
Sample:
-
True
-
-
- error_description - -
- string -
-
always -
More information about the error recorded in LastErrorCode, -
-
and information on any corrective actions that may be taken. -
-
-
-
- error_methodology - -
- string -
-
always -
Type of error detection and correction supported by this device. -
-
-
-
- firmware_revision - -
- string -
-
always -
Revision for the disk drive firmware that is assigned by the manufacturer. -
-
-
Sample:
-
1.0
-
-
- index - -
- integer -
-
always -
Physical drive number of the given drive. -
-
This property is filled by the STORAGE_DEVICE_NUMBER structure returned from the IOCTL_STORAGE_GET_DEVICE_NUMBER control code -
-
A value of 0xffffffff indicates that the given drive does not map to a physical drive. -
-
-
-
- install_date - -
- string -
-
always -
Date and time the object was installed. This property does not need a value to indicate that the object is installed. -
-
-
-
- interface_type - -
- string -
-
always -
Interface type of physical disk drive. -
-
-
Sample:
-
SCSI
-
-
- last_error_code - -
- integer -
-
always -
Last error code reported by the logical device. -
-
-
-
- manufacturer - -
- string -
-
always -
Name of the disk drive manufacturer. -
-
-
Sample:
-
Seagate
-
-
- max_block_size - -
- integer -
-
always -
Maximum block size, in bytes, for media accessed by this device. -
-
-
-
- max_media_size - -
- integer -
-
always -
Maximum media size, in kilobytes, of media supported by this device. -
-
-
-
- media_loaded - -
- boolean -
-
always -
If True, the media for a disk drive is loaded, which means that the device has a readable file system and is accessible. -
-
For fixed disk drives, this property will always be TRUE. -
-
-
Sample:
-
True
-
-
- media_type - -
- string -
-
always -
Type of media used or accessed by this device. -
-
-
Sample:
-
Fixed hard disk media
-
-
- min_block_size - -
- integer -
-
always -
Minimum block size, in bytes, for media accessed by this device. -
-
-
-
- model - -
- string -
-
always -
Manufacturer's model number of the disk drive. -
-
-
Sample:
-
ST32171W
-
-
- name - -
- string -
-
always -
Label by which the object is known. When subclassed, the property can be overridden to be a key property. -
-
-
Sample:
-
\\\\.\\PHYSICALDRIVE0
-
-
- needs_cleaning - -
- boolean -
-
always -
If True, the media access device needs cleaning. -
-
Whether manual or automatic cleaning is possible is indicated in the Capabilities property. -
-
-
-
- number_of_media_supported - -
- integer -
-
always -
Maximum number of media which can be supported or inserted -
-
(when the media access device supports multiple individual media). -
-
-
-
- partitions - -
- integer -
-
always -
Number of partitions on this physical disk drive that are recognized by the operating system. -
-
-
Sample:
-
3
-
-
- pnp_device_id - -
- string -
-
always -
Windows Plug and Play device identifier of the logical device. -
-
-
Sample:
-
SCSI\DISK&VEN_VMWARE&PROD_VIRTUAL_DISK\5&1982005&0&000000
-
-
- power_management_capabilities - -
- list -
-
always -
Array of the specific power-related capabilities of a logical device. -
-
-
-
- power_management_supported - -
- boolean -
-
always -
If True, the device can be power-managed (can be put into suspend mode, and so on). -
-
The property does not indicate that power management features are currently enabled, -
-
only that the logical device is capable of power management. -
-
-
-
- scsi_bus - -
- integer -
-
always -
SCSI bus number of the disk drive. -
-
-
-
- scsi_logical_unit - -
- integer -
-
always -
SCSI logical unit number (LUN) of the disk drive. -
-
-
-
- scsi_port - -
- integer -
-
always -
SCSI port number of the disk drive. -
-
-
-
- scsi_target_id - -
- integer -
-
always -
SCSI identifier number of the disk drive. -
-
-
-
- sectors_per_track - -
- integer -
-
always -
Number of sectors in each track for this physical disk drive. -
-
-
Sample:
-
63
-
-
- serial_number - -
- string -
-
always -
Number allocated by the manufacturer to identify the physical media. -
-
-
Sample:
-
6000c298f34101b38cb2b2508926b9de
-
-
- signature - -
- integer -
-
always -
Disk identification. This property can be used to identify a shared resource. -
-
-
-
- size - -
- integer -
-
always -
Size of the disk drive. It is calculated by multiplying the total number of cylinders, tracks in each cylinder, -
-
sectors in each track, and bytes in each sector. -
-
-
Sample:
-
53686402560
-
-
- status - -
- string -
-
always -
Current status of the object. Various operational and nonoperational statuses can be defined. -
-
Operational statuses include: "OK", "Degraded", and "Pred Fail" -
-
(an element, such as a SMART-enabled hard disk drive, may be functioning properly but predicting a failure in the near future). -
-
Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". -
-
"Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. -
-
Not all such work is online, yet the managed element is neither "OK" nor in one of the other states. -
-
-
Sample:
-
OK
-
-
- status_info - -
- integer -
-
always -
State of the logical device. If this property does not apply to the logical device, the value 5 (Not Applicable) should be used. -
-
-
-
- system_creation_class_name - -
- string -
-
always -
Value of the scoping computer's CreationClassName property. -
-
-
Sample:
-
Win32_ComputerSystem
-
-
- system_name - -
- string -
-
always -
Name of the scoping system. -
-
-
Sample:
-
WILMAR-TEST-123
-
-
- total_cylinders - -
- integer -
-
always -
Total number of cylinders on the physical disk drive. -
-
Note: the value for this property is obtained through extended functions of BIOS interrupt 13h. -
-
The value may be inaccurate if the drive uses a translation scheme to support high-capacity disk sizes. -
-
Consult the manufacturer for accurate drive specifications. -
-
-
Sample:
-
6527
-
-
- total_heads - -
- integer -
-
always -
Total number of heads on the disk drive. -
-
Note: the value for this property is obtained through extended functions of BIOS interrupt 13h. -
-
The value may be inaccurate if the drive uses a translation scheme to support high-capacity disk sizes. -
-
Consult the manufacturer for accurate drive specifications. -
-
-
Sample:
-
255
-
-
- total_sectors - -
- integer -
-
always -
Total number of sectors on the physical disk drive. -
-
Note: the value for this property is obtained through extended functions of BIOS interrupt 13h. -
-
The value may be inaccurate if the drive uses a translation scheme to support high-capacity disk sizes. -
-
Consult the manufacturer for accurate drive specifications. -
-
-
Sample:
-
104856255
-
-
- total_tracks - -
- integer -
-
always -
Total number of tracks on the physical disk drive. -
-
Note: the value for this property is obtained through extended functions of BIOS interrupt 13h. -
-
The value may be inaccurate if the drive uses a translation scheme to support high-capacity disk sizes. -
-
Consult the manufacturer for accurate drive specifications. -
-
-
Sample:
-
1664385
-
-
- tracks_per_cylinder - -
- integer -
-
always -
Number of tracks in each cylinder on the physical disk drive. -
-
Note: the value for this property is obtained through extended functions of BIOS interrupt 13h. -
-
The value may be inaccurate if the drive uses a translation scheme to support high-capacity disk sizes. -
-
Consult the manufacturer for accurate drive specifications. -
-
-
Sample:
-
255
-
-

- - - -Status ------- - - -Authors -~~~~~~~ - -- Marc Tschapek (@marqelme) diff --git a/docs/community.windows.win_disk_image_module.rst b/docs/community.windows.win_disk_image_module.rst deleted file mode 100644 index 63059239..00000000 --- a/docs/community.windows.win_disk_image_module.rst +++ /dev/null @@ -1,142 +0,0 @@ -.. _community.windows.win_disk_image_module: - - -******************************** -community.windows.win_disk_image -******************************** - -**Manage ISO/VHD/VHDX mounts on Windows hosts** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages mount behavior for a specified ISO, VHD, or VHDX image on a Windows host. When ``state`` is ``present``, the image will be mounted under a system-assigned drive letter, which will be returned in the ``mount_path`` value of the module result. -- Requires Windows 8+ or Windows Server 2012+. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- image_path - -
- string - / required -
-
- -
Path to an ISO, VHD, or VHDX image on the target Windows host (the file cannot reside on a network share)
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Whether the image should be present as a drive-letter mount or not.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - # Run installer from mounted ISO, then unmount - - name: Ensure an ISO is mounted - community.windows.win_disk_image: - image_path: C:\install.iso - state: present - register: disk_image_out - - - name: Run installer from mounted ISO - ansible.windows.win_package: - path: '{{ disk_image_out.mount_paths[0] }}setup\setup.exe' - product_id: 35a4e767-0161-46b0-979f-e61f282fee21 - state: present - - - name: Unmount ISO - community.windows.win_disk_image: - image_path: C:\install.iso - state: absent - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- mount_paths - -
- list -
-
when state is present -
A list of filesystem paths mounted from the target image.
-
-
Sample:
-
['E:\\', 'F:\\']
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Matt Davis (@nitzmahone) diff --git a/docs/community.windows.win_dns_record_module.rst b/docs/community.windows.win_dns_record_module.rst deleted file mode 100644 index 7448e57a..00000000 --- a/docs/community.windows.win_dns_record_module.rst +++ /dev/null @@ -1,344 +0,0 @@ -.. _community.windows.win_dns_record_module: - - -******************************** -community.windows.win_dns_record -******************************** - -**Manage Windows Server DNS records** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manage DNS records within an existing Windows Server DNS zone. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- This module requires Windows 8, Server 2012, or newer. - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- computer_name - -
- string -
-
- -
Specifies a DNS server.
-
You can specify an IP address or any value that resolves to an IP address, such as a fully qualified domain name (FQDN), host name, or NETBIOS name.
-
-
- name - -
- string - / required -
-
- -
The name of the record.
-
-
- port - -
- integer -
-
added in 1.0.0
-
- -
The port number of the record.
-
Required when type=SRV.
-
Supported only for type=SRV.
-
-
- priority - -
- integer -
-
added in 1.0.0
-
- -
The priority number for each service in SRV record.
-
Required when type=SRV.
-
Supported only for type=SRV.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Whether the record should exist or not.
-
-
- ttl - -
- integer -
-
- Default:
3600
-
-
The "time to live" of the record, in seconds.
-
Ignored when state=absent.
-
Valid range is 1 - 31557600.
-
Note that an Active Directory forest can specify a minimum TTL, and will dynamically "round up" other values to that minimum.
-
-
- type - -
- string - / required -
-
-
    Choices: -
  • A
  • -
  • AAAA
  • -
  • CNAME
  • -
  • NS
  • -
  • PTR
  • -
  • SRV
  • -
  • TXT
  • -
-
-
The type of DNS record to manage.
-
SRV was added in the 1.0.0 release of this collection.
-
NS was added in the 1.1.0 release of this collection.
-
TXT was added in the 1.6.0 release of this collection.
-
-
- value - -
- list - / elements=string -
-
- -
The value(s) to specify. Required when state=present.
-
When type=PTR only the partial part of the IP should be given.
-
Multiple values can be passed when type=NS
-

aliases: values
-
-
- weight - -
- integer -
-
added in 1.0.0
-
- -
Weightage given to each service record in SRV record.
-
Required when type=SRV.
-
Supported only for type=SRV.
-
-
- zone - -
- string - / required -
-
- -
The name of the zone to manage (eg example.com).
-
The zone must already exist.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - # Demonstrate creating a matching A and PTR record. - - - name: Create database server record - community.windows.win_dns_record: - name: "cgyl1404p.amer.example.com" - type: "A" - value: "10.1.1.1" - zone: "amer.example.com" - - - name: Create matching PTR record - community.windows.win_dns_record: - name: "1.1.1" - type: "PTR" - value: "db1" - zone: "10.in-addr.arpa" - - # Demonstrate replacing an A record with a CNAME - - - name: Remove static record - community.windows.win_dns_record: - name: "db1" - type: "A" - state: absent - zone: "amer.example.com" - - - name: Create database server alias - community.windows.win_dns_record: - name: "db1" - type: "CNAME" - value: "cgyl1404p.amer.example.com" - zone: "amer.example.com" - - # Demonstrate creating multiple A records for the same name - - - name: Create multiple A record values for www - community.windows.win_dns_record: - name: "www" - type: "A" - values: - - 10.0.42.5 - - 10.0.42.6 - - 10.0.42.7 - zone: "example.com" - - # Demonstrates a partial update (replace some existing values with new ones) - # for a pre-existing name - - - name: Update www host with new addresses - community.windows.win_dns_record: - name: "www" - type: "A" - values: - - 10.0.42.5 # this old value was kept (others removed) - - 10.0.42.12 # this new value was added - zone: "example.com" - - # Demonstrate creating a SRV record - - - name: Creating a SRV record with port number and priority - community.windows.win_dns_record: - name: "test" - priority: 5 - port: 995 - state: present - type: "SRV" - weight: 2 - value: "amer.example.com" - zone: "example.com" - - # Demonstrate creating a NS record with multiple values - - - name: Creating NS record - community.windows.win_dns_record: - name: "ansible.prog" - state: present - type: "NS" - values: - - 10.0.0.1 - - 10.0.0.2 - - 10.0.0.3 - - 10.0.0.4 - zone: "example.com" - - # Demonstrate creating a TXT record - - - name: Creating a TXT record with descriptive Text - community.windows.win_dns_record: - name: "test" - state: present - type: "TXT" - value: "justavalue" - zone: "example.com" - - - - -Status ------- - - -Authors -~~~~~~~ - -- Sebastian Gruber (@sgruber94) -- John Nelson (@johnboy2) diff --git a/docs/community.windows.win_dns_zone_module.rst b/docs/community.windows.win_dns_zone_module.rst deleted file mode 100644 index b2112192..00000000 --- a/docs/community.windows.win_dns_zone_module.rst +++ /dev/null @@ -1,317 +0,0 @@ -.. _community.windows.win_dns_zone_module: - - -****************************** -community.windows.win_dns_zone -****************************** - -**Manage Windows Server DNS Zones** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manage Windows Server DNS Zones -- Adds, Removes and Modifies DNS Zones - Primary, Secondary, Forwarder & Stub -- Task should be delegated to a Windows DNS Server - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- This module requires Windows Server 2012R2 or Newer - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- dns_servers - -
- list - / elements=string -
-
- -
Specifies an list of IP addresses of the primary servers of the zone.
-
DNS queries for a forwarded zone are sent to primary servers.
-
Required if l(type=secondary), l(type=forwarder) or l(type=stub), otherwise ignored.
-
At least one server is required.
-
-
- dynamic_update - -
- string -
-
-
    Choices: -
  • secure
  • -
  • none
  • -
  • nonsecureandsecure
  • -
-
-
Specifies how a zone handles dynamic updates.
-
Secure DNS updates are available only for Active Directory-integrated zones.
-
When not specified during new zone creation, Windows will default this to l(none).
-
-
- forwarder_timeout - -
- integer -
-
- -
Specifies a length of time, in seconds, that a DNS server waits for a remote DNS server to resolve a query.
-
Accepts integer values between 0 and 15.
-
If the provided value is not valid, it will be omitted and a warning will be issued.
-
-
- name - -
- string - / required -
-
- -
Fully qualified name of the DNS zone.
-
-
- replication - -
- string -
-
-
    Choices: -
  • forest
  • -
  • domain
  • -
  • legacy
  • -
  • none
  • -
-
-
Specifies the replication scope for the DNS zone.
-
l(replication=forest) will replicate the DNS zone to all domain controllers in the Active Directory forest.
-
l(replication=domain) will replicate the DNS zone to all domain controllers in the Active Directory domain.
-
l(replication=none) disables Active Directory integration and creates a local file with the name of the zone.
-
This is the equivalent of selecting l(store the zone in Active Directory) in the GUI.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Specifies the desired state of the DNS zone.
-
When l(state=present) the module will attempt to create the specified DNS zone if it does not already exist.
-
When l(state=absent), the module will remove the specified DNS zone and all subsequent DNS records.
-
-
- type - -
- string -
-
-
    Choices: -
  • primary
  • -
  • secondary
  • -
  • stub
  • -
  • forwarder
  • -
-
-
Specifies the type of DNS zone.
-
When l(type=secondary), the DNS server will immediately attempt to perform a zone transfer from the servers in this list. If this initial transfer fails, then the zone will be left in an unworkable state. This module does not verify the initial transfer.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - - name: Ensure primary zone is present - community.windows.win_dns_zone: - name: wpinner.euc.vmware.com - replication: domain - type: primary - state: present - - - name: Ensure DNS zone is absent - community.windows.win_dns_zone: - name: jamals.euc.vmware.com - state: absent - - - name: Ensure forwarder has specific DNS servers - community.windows.win_dns_zone: - name: jamals.euc.vmware.com - type: forwarder - dns_servers: - - 10.245.51.100 - - 10.245.51.101 - - 10.245.51.102 - - - name: Ensure stub zone has specific DNS servers - community.windows.win_dns_zone: - name: virajp.euc.vmware.com - type: stub - dns_servers: - - 10.58.2.100 - - 10.58.2.101 - - - name: Ensure stub zone is converted to a secondary zone - community.windows.win_dns_zone: - name: virajp.euc.vmware.com - type: secondary - - - name: Ensure secondary zone is present with no replication - community.windows.win_dns_zone: - name: dgemzer.euc.vmware.com - type: secondary - replication: none - dns_servers: - - 10.19.20.1 - - - name: Ensure secondary zone is converted to a primary zone - community.windows.win_dns_zone: - name: dgemzer.euc.vmware.com - type: primary - replication: none - dns_servers: - - 10.19.20.1 - - - name: Ensure primary DNS zone is present without replication - community.windows.win_dns_zone: - name: basavaraju.euc.vmware.com - replication: none - type: primary - - - name: Ensure primary DNS zone has nonsecureandsecure dynamic updates enabled - community.windows.win_dns_zone: - name: basavaraju.euc.vmware.com - replication: none - dynamic_update: nonsecureandsecure - type: primary - - - name: Ensure DNS zone is absent - community.windows.win_dns_zone: - name: marshallb.euc.vmware.com - state: absent - - - name: Ensure DNS zones are absent - community.windows.win_dns_zone: - name: "{{ item }}" - state: absent - loop: - - jamals.euc.vmware.com - - dgemzer.euc.vmware.com - - wpinner.euc.vmware.com - - marshallb.euc.vmware.com - - basavaraju.euc.vmware.com - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- zone - -
- dictionary -
-
When l(state=present) -
New/Updated DNS zone parameters
-
-
Sample:
-
{'name': None, 'type': None, 'dynamic_update': None, 'reverse_lookup': None, 'forwarder_timeout': None, 'paused': None, 'shutdown': None, 'zone_file': None, 'replication': None, 'dns_servers': None}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Joe Zollo (@joezollo) diff --git a/docs/community.windows.win_domain_computer_module.rst b/docs/community.windows.win_domain_computer_module.rst deleted file mode 100644 index 6c948cb4..00000000 --- a/docs/community.windows.win_domain_computer_module.rst +++ /dev/null @@ -1,496 +0,0 @@ -.. _community.windows.win_domain_computer_module: - - -************************************* -community.windows.win_domain_computer -************************************* - -**Manage computers in Active Directory** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Create, read, update and delete computers in Active Directory using a windows bridge computer to launch New-ADComputer, Get-ADComputer, Set-ADComputer, Remove-ADComputer and Move-ADObject powershell commands. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- description - -
- string -
-
- Default:
""
-
-
Specifies a description of the object.
-
This parameter sets the value of the Description property for the object.
-
The LDAP display name (ldapDisplayName) for this property is description.
-
-
- dns_hostname - -
- string -
-
- -
Specifies the fully qualified domain name (FQDN) of the computer.
-
This parameter sets the DNSHostName property for a computer object.
-
The LDAP display name for this property is dNSHostName.
-
Required when state=present.
-
-
- domain_password - -
- string -
-
- -
The password for username.
-
-
- domain_server - -
- string -
-
- -
Specifies 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 domain of the computer running PowerShell.
-
-
- domain_username - -
- string -
-
- -
The username to use when interacting with AD.
-
If this is not set then the user Ansible used to log in with will be used instead when using CredSSP or Kerberos with credential delegation.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Specifies if an account is enabled.
-
An enabled account requires a password.
-
This parameter sets the Enabled property for an account object.
-
This parameter also sets the ADS_UF_ACCOUNTDISABLE flag of the Active Directory User Account Control (UAC) attribute.
-
-
- managed_by - -
- string -
-
added in 1.3.0
-
- -
The value to be assigned to the LDAP managedBy attribute.
-
This value can be in the forms Distinguished Name, objectGUID, objectSid or sAMAccountName, see examples for more details.
-
-
- name - -
- string - / required -
-
- -
Specifies the name of the object.
-
This parameter sets the Name property of the Active Directory object.
-
The LDAP display name (ldapDisplayName) of this property is name.
-
-
- odj_blob_path - -
- - -
-
- -
The path to the file where the BLOB will be saved. If omitted, a temporary file will be used.
-
If offline_domain_join=output the file will be deleted after its contents are returned.
-
The parent directory for the BLOB file must exist; intermediate directories will not be created.
-
-
- offline_domain_join - -
- string -
-
-
    Choices: -
  • none ←
  • -
  • output
  • -
  • path
  • -
-
-
Provisions a computer in the directory and provides a BLOB file that can be used on the target computer/image to join it to the domain while offline.
-
The none value doesn't do any offline join operations.
-
output returns the BLOB in output. The BLOB should be treated as secret (it contains the machine password) so use no_log when using this option.
-
path preserves the offline domain join BLOB file on the target machine for later use. The path will be returned.
-
If the computer already exists, no BLOB will be created/returned, and the module will operate as it would have without offline domain join.
-
-
- ou - -
- string -
-
- -
Specifies the X.500 path of the Organizational Unit (OU) or container where the new object is created. Required when state=present.
-
Special characters must be escaped, see Distinguished Names for details.
-
-
- sam_account_name - -
- string -
-
- -
Specifies the Security Account Manager (SAM) account name of the computer.
-
It maximum is 256 characters, 15 is advised for older operating systems compatibility.
-
The LDAP display name (ldapDisplayName) for this property is sAMAccountName.
-
If ommitted the value is the same as name.
-
Note that all computer SAMAccountNames need to end with a $.
-
If $ is omitted, it will be added to the end.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Specified whether the computer should be present or absent in Active Directory.
-
-
- - -Notes ------ - -.. note:: - - For more information on Offline Domain Join see `the step-by-step guide `_. - - When using the ODJ BLOB to join a computer to the domain, it must be written out to a file. - - The file must be UTF-16 encoded (in PowerShell this encoding is called ``Unicode``), and it must end in a null character. See examples. - - The ``djoin.exe`` part of the offline domain join process will not use *domain_server*, *domain_username*, or *domain_password*. - - -See Also --------- - -.. seealso:: - - :ref:`ansible.windows.win_domain_module` - The official documentation on the **ansible.windows.win_domain** module. - :ref:`ansible.windows.win_domain_controller_module` - The official documentation on the **ansible.windows.win_domain_controller** module. - :ref:`community.windows.win_domain_group_module` - The official documentation on the **community.windows.win_domain_group** module. - :ref:`ansible.windows.win_domain_membership_module` - The official documentation on the **ansible.windows.win_domain_membership** module. - :ref:`community.windows.win_domain_user_module` - The official documentation on the **community.windows.win_domain_user** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Add linux computer to Active Directory OU using a windows machine - community.windows.win_domain_computer: - name: one_linux_server - sam_account_name: linux_server$ - dns_hostname: one_linux_server.my_org.local - ou: "OU=servers,DC=my_org,DC=local" - description: Example of linux server - enabled: yes - state: present - delegate_to: my_windows_bridge.my_org.local - - - name: Remove linux computer from Active Directory using a windows machine - community.windows.win_domain_computer: - name: one_linux_server - state: absent - delegate_to: my_windows_bridge.my_org.local - - - name: Provision a computer for offline domain join - community.windows.win_domain_computer: - name: newhost - dns_hostname: newhost.ansible.local - ou: 'OU=A great\, big organizational unit name,DC=ansible,DC=local' - state: present - offline_domain_join: yes - odj_return_blob: yes - register: computer_status - delegate_to: windc.ansible.local - - - name: Join a workgroup computer to the domain - vars: - target_blob_file: 'C:\ODJ\blob.txt' - ansible.windows.win_shell: | - $blob = [Convert]::FromBase64String('{{ computer_status.odj_blob }}') - [IO.File]::WriteAllBytes('{{ target_blob_file }}', $blob) - & djoin.exe --% /RequestODJ /LoadFile '{{ target_blob_file }}' /LocalOS /WindowsPath "%SystemRoot%" - - - name: Restart to complete domain join - ansible.windows.win_restart: - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- djoin - -
- dictionary -
-
when offline_domain_join is True and the computer didn't exist -
Information about the invocation of djoin.exe.
-
-
  -
- invocation - -
- string -
-
always -
The full command line used to call djoin.exe
-
-
Sample:
-
djoin.exe /PROVISION /MACHINE compname /MACHINEOU OU=Hosts,DC=ansible,DC=local /DOMAIN ansible.local /SAVEFILE blobfile.txt
-
  -
- rc - -
- integer -
-
when not check mode -
The return code from djoin.exe
-
-
Sample:
-
87
-
  -
- stderr - -
- string -
-
when not check mode -
The stderr from djoin.exe
-
-
Sample:
-
Invalid input parameter combination.
-
  -
- stdout - -
- string -
-
when not check mode -
The stdout from djoin.exe
-
-
Sample:
-
Computer provisioning completed successfully.
-
-
- odj_blob - -
- string -
-
when offline_domain_join is not 'none' and the computer didn't exist -
The offline domain join BLOB. This is an empty string when in check mode or when offline_domain_join is 'path'.
-
This field contains the base64 encoded raw bytes of the offline domain join BLOB file.
-
-
Sample:
-
<a long base64 string>
-
-
- odj_blob_file - -
- string -
-
when offline_domain_join is 'path' and the computer didn't exist -
The path to the offline domain join BLOB file on the target host. If odj_blob_path was specified, this will match that path.
-
-
Sample:
-
C:\Users\admin\AppData\Local\Temp\e4vxonty.rkb
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Daniel Sánchez Fábregas (@Daniel-Sanchez-Fabregas) -- Brian Scholer (@briantist) diff --git a/docs/community.windows.win_domain_group_membership_module.rst b/docs/community.windows.win_domain_group_membership_module.rst deleted file mode 100644 index df093f2a..00000000 --- a/docs/community.windows.win_domain_group_membership_module.rst +++ /dev/null @@ -1,296 +0,0 @@ -.. _community.windows.win_domain_group_membership_module: - - -********************************************* -community.windows.win_domain_group_membership -********************************************* - -**Manage Windows domain group membership** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Allows the addition and removal of domain users and domain groups from/to a domain group. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- domain_password - -
- string -
-
- -
The password for username.
-
-
- domain_server - -
- string -
-
- -
Specifies 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 domain of the computer running PowerShell.
-
-
- domain_username - -
- string -
-
- -
The username to use when interacting with AD.
-
If this is not set then the user Ansible used to log in with will be used instead when using CredSSP or Kerberos with credential delegation.
-
-
- members - -
- list - / elements=string - / required -
-
- -
A list of members to ensure are present/absent from the group.
-
The given names must be a SamAccountName of a user, group, service account, or computer.
-
For computers, you must add "$" after the name; for example, to add "Mycomputer" to a group, use "Mycomputer$" as the member.
-
If the member object is part of another domain in a multi-domain forest, you must add the domain and "\" in front of the name.
-
-
- name - -
- string - / required -
-
- -
Name of the domain group to manage membership on.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
  • pure
  • -
-
-
Desired state of the members in the group.
-
When state is pure, only the members specified will exist, and all other existing members not specified are removed.
-
-
- - -Notes ------ - -.. note:: - - This must be run on a host that has the ActiveDirectory powershell module installed. - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_domain_user_module` - The official documentation on the **community.windows.win_domain_user** module. - :ref:`community.windows.win_domain_group_module` - The official documentation on the **community.windows.win_domain_group** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Add a domain user/group to a domain group - community.windows.win_domain_group_membership: - name: Foo - members: - - Bar - state: present - - - name: Remove a domain user/group from a domain group - community.windows.win_domain_group_membership: - name: Foo - members: - - Bar - state: absent - - - name: Ensure only a domain user/group exists in a domain group - community.windows.win_domain_group_membership: - name: Foo - members: - - Bar - state: pure - - - name: Add a computer to a domain group - community.windows.win_domain_group_membership: - name: Foo - members: - - DESKTOP$ - state: present - - - name: Add a domain user/group from another Domain in the multi-domain forest to a domain group - community.windows.win_domain_group_membership: - domain_server: DomainAAA.cloud - name: GroupinDomainAAA - members: - - DomainBBB.cloud\UserInDomainBBB - state: Present - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- added - -
- list -
-
success and state is present or pure -
A list of members added when state is present or pure; this is empty if no members are added.
-
-
Sample:
-
['UserName', 'GroupName']
-
-
- members - -
- list -
-
success -
A list of all domain group members at completion; this is empty if the group contains no members.
-
-
Sample:
-
['UserName', 'GroupName']
-
-
- name - -
- string -
-
always -
The name of the target domain group.
-
-
Sample:
-
Domain-Admins
-
-
- removed - -
- list -
-
success and state is absent or pure -
A list of members removed when state is absent or pure; this is empty if no members are removed.
-
-
Sample:
-
['UserName', 'GroupName']
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Marius Rieder (@jiuka) diff --git a/docs/community.windows.win_domain_group_module.rst b/docs/community.windows.win_domain_group_module.rst deleted file mode 100644 index dd94c829..00000000 --- a/docs/community.windows.win_domain_group_module.rst +++ /dev/null @@ -1,613 +0,0 @@ -.. _community.windows.win_domain_group_module: - - -********************************** -community.windows.win_domain_group -********************************** - -**Creates, modifies or removes domain groups** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Creates, modifies or removes groups in Active Directory. -- For local groups, use the :ref:`ansible.windows.win_group ` module instead. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- attributes - -
- dictionary -
-
- -
A dict of custom LDAP attributes to set on the group.
-
This can be used to set custom attributes that are not exposed as module parameters, e.g. mail.
-
See the examples on how to format this parameter.
-
-
- category - -
- string -
-
-
    Choices: -
  • distribution
  • -
  • security
  • -
-
-
The category of the group, this is the value to assign to the LDAP groupType attribute.
-
If a new group is created then security will be used by default.
-
-
- description - -
- string -
-
- -
The value to be assigned to the LDAP description attribute.
-
-
- display_name - -
- string -
-
- -
The value to assign to the LDAP displayName attribute.
-
-
- domain_password - -
- string -
-
- -
The password for username.
-
-
- domain_server - -
- string -
-
- -
Specifies 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 domain of the computer running PowerShell.
-
-
- domain_username - -
- string -
-
- -
The username to use when interacting with AD.
-
If this is not set then the user Ansible used to log in with will be used instead.
-
-
- ignore_protection - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Will ignore the ProtectedFromAccidentalDeletion flag when deleting or moving a group.
-
The module will fail if one of these actions need to occur and this value is set to no.
-
-
- managed_by - -
- string -
-
- -
The value to be assigned to the LDAP managedBy attribute.
-
This value can be in the forms Distinguished Name, objectGUID, objectSid or sAMAccountName, see examples for more details.
-
-
- name - -
- string - / required -
-
- -
The name of the group to create, modify or remove.
-
This value can be in the forms Distinguished Name, objectGUID, objectSid or sAMAccountName, see examples for more details.
-
-
- organizational_unit - -
- string -
-
- -
The full LDAP path to create or move the group to.
-
This should be the path to the parent object to create or move the group to.
-
See examples for details of how this path is formed.
-

aliases: ou, path
-
-
- protect - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Will set the ProtectedFromAccidentalDeletion flag based on this value.
-
This flag stops a user from deleting or moving a group to a different path.
-
-
- scope - -
- string -
-
-
    Choices: -
  • domainlocal
  • -
  • global
  • -
  • universal
  • -
-
-
The scope of the group.
-
If state=present and the group doesn't exist then this must be set.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
If state=present this module will ensure the group is created and is configured accordingly.
-
If state=absent this module will delete the group if it exists
-
-
- - -Notes ------ - -.. note:: - - This must be run on a host that has the ActiveDirectory powershell module installed. - - -See Also --------- - -.. seealso:: - - :ref:`ansible.windows.win_domain_module` - The official documentation on the **ansible.windows.win_domain** module. - :ref:`ansible.windows.win_domain_controller_module` - The official documentation on the **ansible.windows.win_domain_controller** module. - :ref:`community.windows.win_domain_computer_module` - The official documentation on the **community.windows.win_domain_computer** module. - :ref:`ansible.windows.win_domain_membership_module` - The official documentation on the **ansible.windows.win_domain_membership** module. - :ref:`community.windows.win_domain_user_module` - The official documentation on the **community.windows.win_domain_user** module. - :ref:`ansible.windows.win_group_module` - The official documentation on the **ansible.windows.win_group** module. - :ref:`ansible.windows.win_group_membership_module` - The official documentation on the **ansible.windows.win_group_membership** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Ensure the group Cow exists using sAMAccountName - community.windows.win_domain_group: - name: Cow - scope: global - path: OU=groups,DC=ansible,DC=local - - - name: Ensure the group Cow doesn't exist using the Distinguished Name - community.windows.win_domain_group: - name: CN=Cow,OU=groups,DC=ansible,DC=local - state: absent - - - name: Delete group ignoring the protection flag - community.windows.win_domain_group: - name: Cow - state: absent - ignore_protection: yes - - - name: Create group with delete protection enabled and custom attributes - community.windows.win_domain_group: - name: Ansible Users - scope: domainlocal - category: security - attributes: - mail: helpdesk@ansible.com - wWWHomePage: www.ansible.com - ignore_protection: yes - - - name: Change the OU of a group using the SID and ignore the protection flag - community.windows.win_domain_group: - name: S-1-5-21-2171456218-3732823212-122182344-1189 - scope: global - organizational_unit: OU=groups,DC=ansible,DC=local - ignore_protection: yes - - - name: Add managed_by user - community.windows.win_domain_group: - name: Group Name Here - managed_by: Domain Admins - - - name: Add group and specify the AD domain services to use for the create - community.windows.win_domain_group: - name: Test Group - domain_username: user@CORP.ANSIBLE.COM - domain_password: Password01! - domain_server: corp-DC12.corp.ansible.com - scope: domainlocal - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- attributes - -
- dictionary -
-
group exists and attributes are set on the module invocation -
Custom attributes that were set by the module. This does not show all the custom attributes rather just the ones that were set by the module.
-
-
Sample:
-
{'mail': 'helpdesk@ansible.com', 'wWWHomePage': 'www.ansible.com'}
-
-
- canonical_name - -
- string -
-
group exists -
The canonical name of the group.
-
-
Sample:
-
ansible.local/groups/Cow
-
-
- category - -
- string -
-
group exists -
The Group type value of the group, i.e. Security or Distribution.
-
-
Sample:
-
Security
-
-
- created - -
- boolean -
-
always -
Whether a group was created
-
-
Sample:
-
True
-
-
- description - -
- string -
-
group exists -
The Description of the group.
-
-
Sample:
-
Group Description
-
-
- display_name - -
- string -
-
group exists -
The Display name of the group.
-
-
Sample:
-
Users who connect through RDP
-
-
- distinguished_name - -
- string -
-
group exists -
The full Distinguished Name of the group.
-
-
Sample:
-
CN=Cow,OU=groups,DC=ansible,DC=local
-
-
- group_scope - -
- string -
-
group exists -
The Group scope value of the group.
-
-
Sample:
-
Universal
-
-
- guid - -
- string -
-
group exists -
The guid of the group.
-
-
Sample:
-
512a9adb-3fc0-4a26-9df0-e6ea1740cf45
-
-
- managed_by - -
- string -
-
group exists -
The full Distinguished Name of the AD object that is set on the managedBy attribute.
-
-
Sample:
-
CN=Domain Admins,CN=Users,DC=ansible,DC=local
-
-
- name - -
- string -
-
group exists -
The name of the group.
-
-
Sample:
-
Cow
-
-
- protected_from_accidental_deletion - -
- boolean -
-
group exists -
Whether the group is protected from accidental deletion.
-
-
Sample:
-
True
-
-
- sid - -
- string -
-
group exists -
The Security ID of the group.
-
-
Sample:
-
S-1-5-21-2171456218-3732823212-122182344-1189
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Jordan Borean (@jborean93) diff --git a/docs/community.windows.win_domain_object_info_module.rst b/docs/community.windows.win_domain_object_info_module.rst deleted file mode 100644 index 12af8706..00000000 --- a/docs/community.windows.win_domain_object_info_module.rst +++ /dev/null @@ -1,328 +0,0 @@ -.. _community.windows.win_domain_object_info_module: - - -**************************************** -community.windows.win_domain_object_info -**************************************** - -**Gather information an Active Directory object** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about multiple Active Directory object(s). - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- domain_password - -
- string -
-
- -
The password for domain_username.
-
-
- domain_server - -
- string -
-
- -
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.
-
-
- domain_username - -
- string -
-
- -
The username to use when interacting with AD.
-
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.
-
-
- filter - -
- string -
-
- -
Specifies a query string using the PowerShell Expression Language syntax.
-
This follows the same rules and formatting as the -Filter parameter for the PowerShell AD cmdlets exception there is no variable substitutions.
-
This is mutually exclusive with identity and ldap_filter.
-
-
- identity - -
- string -
-
- -
Specifies a single Active Directory object by its distinguished name or its object GUID.
-
This is mutually exclusive with filter and ldap_filter.
-
This cannot be used with either the search_base or search_scope options.
-
-
- include_deleted - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Also search for deleted Active Directory objects.
-
-
- ldap_filter - -
- string -
-
- -
Like filter but this is a tradiitional LDAP query string to filter the objects to return.
-
This is mutually exclusive with filter and identity.
-
-
- properties - -
- list - / elements=string -
-
- -
A list of properties to return.
-
If a property is *, all properties that have a set value on the AD object will be returned.
-
If a property is valid on the object but not set, it is only returned if defined explicitly in this option list.
-
The properties DistinguishedName, Name, ObjectClass, and ObjectGUID are always returned.
-
Specifying multiple properties can have a performance impact, it is best to only return what is needed.
-
If an invalid property is specified then the module will display a warning for each object it is invalid on.
-
-
- search_base - -
- string -
-
- -
Specify the Active Directory path to search for objects in.
-
This cannot be set with identity.
-
By default the search base is the default naming context of the target AD instance which is the DN returned by "(Get-ADRootDSE).defaultNamingContext".
-
-
- search_scope - -
- string -
-
-
    Choices: -
  • base
  • -
  • one_level
  • -
  • subtree
  • -
-
-
Specify the scope of when searching for an object in the search_base.
-
base will limit the search to the base object so the maximum number of objects returned is always one. This will not search any objects inside a container..
-
one_level will search the current path and any immediate objects in that path.
-
subtree will search the current path and all objects of that path recursively.
-
This cannot be set with identity.
-
-
- - -Notes ------ - -.. note:: - - The ``sAMAccountType_AnsibleFlags`` and ``userAccountControl_AnsibleFlags`` return property is something set by the module itself as an easy way to view what those flags represent. These properties cannot be used as part of the *filter* or *ldap_filter* and are automatically added if those properties were requested. - - - -Examples --------- - -.. code-block:: yaml - - - name: Get all properties for the specified account using its DistinguishedName - community.windows.win_domain_object_info: - identity: CN=Username,CN=Users,DC=domain,DC=com - properties: '*' - - - name: Get the SID for all user accounts as a filter - community.windows.win_domain_object_info: - filter: ObjectClass -eq 'user' -and objectCategory -eq 'Person' - properties: - - objectSid - - - name: Get the SID for all user accounts as a LDAP filter - community.windows.win_domain_object_info: - ldap_filter: (&(objectClass=user)(objectCategory=Person)) - properties: - - objectSid - - - name: Search all computer accounts in a specific path that were added after February 1st - community.windows.win_domain_object_info: - filter: objectClass -eq 'computer' -and whenCreated -gt '20200201000000.0Z' - properties: '*' - search_scope: one_level - search_base: CN=Computers,DC=domain,DC=com - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- objects - -
- list - / elements=dictionary -
-
always -
A list of dictionaries that are the Active Directory objects found and the properties requested.
-
The dict's keys are the property name and the value is the value for the property.
-
All date properties are return in the ISO 8601 format in the UTC timezone.
-
All SID properties are returned as a dict with the keys Sid as the SID string and Name as the translated SID account name.
-
All byte properties are returned as a base64 string.
-
All security descriptor properties are returned as the SDDL string of that descriptor.
-
The properties DistinguishedName, Name, ObjectClass, and ObjectGUID are always returned.
-
-
Sample:
-
[{ - "accountExpires": 0, - "adminCount": 1, - "CanonicalName": "domain.com/Users/Administrator", - "CN": "Administrator", - "Created": "2020-01-13T09:03:22.0000000Z", - "Description": "Built-in account for administering computer/domain", - "DisplayName": null, - "DistinguishedName": "CN=Administrator,CN=Users,DC=domain,DC=com", - "memberOf": [ - "CN=Group Policy Creator Owners,CN=Users,DC=domain,DC=com", - "CN=Domain Admins",CN=Users,DC=domain,DC=com" - ], - "Name": "Administrator", - "nTSecurityDescriptor": "O:DAG:DAD:PAA;;LCRPLORC;;;AU(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPWPLOCRSDRCWDWO;;;BA)", - "ObjectCategory": "CN=Person,CN=Schema,CN=Configuration,DC=domain,DC=com", - "ObjectClass": "user", - "ObjectGUID": "c8c6569e-4688-4f3c-8462-afc4ff60817b", - "objectSid": { - "Sid": "S-1-5-21-2959096244-3298113601-420842770-500", - "Name": "DOMAIN\Administrator" - }, - "sAMAccountName": "Administrator", - }]
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Jordan Borean (@jborean93) diff --git a/docs/community.windows.win_domain_ou_module.rst b/docs/community.windows.win_domain_ou_module.rst deleted file mode 100644 index 84f4229c..00000000 --- a/docs/community.windows.win_domain_ou_module.rst +++ /dev/null @@ -1,334 +0,0 @@ -.. _community.windows.win_domain_ou_module: - - -******************************* -community.windows.win_domain_ou -******************************* - -**Manage Active Directory Organizational Units** - - -Version added: 1.8.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manage Active Directory Organizational Units -- Adds, Removes and Modifies Active Directory Organizational Units -- Task should be delegated to a Windows Active Directory Domain Controller - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- This module requires Windows Server 2012 or Newer -- Powershell ActiveDirectory Module - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- domain_password - -
- string -
-
- -
The password for the domain you are accessing
-
-
- domain_server - -
- string -
-
- -
Specifies 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 domain of the computer running PowerShell.
-
-
- domain_username - -
- string -
-
- -
The username to use when interacting with AD.
-
If this is not set then the user Ansible used to log in with will be used instead when using CredSSP or Kerberos with credential delegation.
-
-
- filter - -
- string -
-
- Default:
"*"
-
-
filter for lookup of ou.
-
-
- name - -
- string - / required -
-
- -
The name of the Organizational Unit
-
-
- path - -
- string -
-
- -
Specifies the X.500 path of the OU or container where the new object is created.
-
defaults to adding ou at base of domain connected to.
-
-
- properties - -
- dictionary -
-
- -
Free form dict of properties for the organizational unit. Follows LDAP property names, like StreetAddress or PostalCode.
-
-
- protected - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates whether to prevent the object from being deleted. When this protected=true, you cannot delete the corresponding object without changing the value of the property.
-
-
- recursive - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Removes the OU and any child items it contains.
-
You must specify this parameter to remove an OU that is not empty.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Specifies the desired state of the OU.
-
When state=present the module will attempt to create the specified OU if it does not already exist.
-
When state=absent, the module will remove the specified OU.
-
When state=absent and recursive=true, the module will remove all the OU and all child OU's.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - --- - - name: Ensure OU is present & protected - community.windows.win_domain_ou: - name: AnsibleFest - state: present - - - name: Ensure OU is present & protected - community.windows.win_domain_ou: - name: EUC Users - path: "DC=euc,DC=vmware,DC=lan" - state: present - protected: true - delegate_to: win-ad1.euc.vmware.lab - - - name: Ensure OU is absent - community.windows.win_domain_ou: - name: EUC Users - path: "DC=euc,DC=vmware,DC=lan" - state: absent - delegate_to: win-ad1.euc.vmware.lab - - - name: Ensure OU is present with specific properties - community.windows.win_domain_ou: - name: WS1Users - path: "CN=EUC Users,DC=euc,DC=vmware,DC=lan" - protected: true - properties: - city: Sandy Springs - state: Georgia - StreetAddress: 1155 Perimeter Center West - country: US - description: EUC Business Unit - PostalCode: 30189 - delegate_to: win-ad1.euc.vmware.lab - - - name: Ensure OU updated with new properties - community.windows.win_domain_ou: - name: WS1Users - path: DC=euc,DC=vmware,DC=lan - protected: false - properties: - city: Atlanta - state: Georgia - managedBy: jzollo@vmware.com - delegate_to: win-ad1.euc.vmware.lab - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- ou - -
- dictionary -
-
When state=present -
New/Updated organizational unit parameters
-
-
Sample:
-
{'AddedProperties': [], 'City': 'Sandy Springs', 'Country': None, 'DistinguishedName': 'OU=VMW Atlanta,DC=ansible,DC=test', 'LinkedGroupPolicyObjects': [], 'ManagedBy': None, 'ModifiedProperties': [], 'Name': 'VMW Atlanta', 'ObjectClass': 'organizationalUnit', 'ObjectGUID': '3e987e30-93ad-4229-8cd0-cff6a91275e4', 'PostalCode': None, 'PropertyCount': 11, 'PropertyNames': 'City Country DistinguishedName LinkedGroupPolicyObjects ManagedBy Name ObjectClass ObjectGUID PostalCode State StreetAddress', 'RemovedProperties': [], 'State': 'Georgia', 'StreetAddress': '1155 Perimeter Center West'}
-
-
- path - -
- string -
-
always -
Base ou path used by module either when provided path=DC=Ansible,DC=Test or derived by module.
-
-
Sample:
-
{'path': 'DC=ansible,DC=test'}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Joe Zollo (@joezollo) -- Larry Lane (@gamethis) diff --git a/docs/community.windows.win_domain_user_module.rst b/docs/community.windows.win_domain_user_module.rst deleted file mode 100644 index fa727f7a..00000000 --- a/docs/community.windows.win_domain_user_module.rst +++ /dev/null @@ -1,1217 +0,0 @@ -.. _community.windows.win_domain_user_module: - - -********************************* -community.windows.win_domain_user -********************************* - -**Manages Windows Active Directory user accounts** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages Windows Active Directory user accounts. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- account_locked - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
no will unlock the user account if locked.
-
Note that there is not a way to lock an account as an administrator.
-
Accounts are locked due to user actions; as an admin, you may only unlock a locked account.
-
If you wish to administratively disable an account, set enabled to no.
-
-
- attributes - -
- dictionary -
-
- -
A dict of custom LDAP attributes to set on the user.
-
This can be used to set custom attributes that are not exposed as module parameters, e.g. telephoneNumber.
-
See the examples on how to format this parameter.
-
-
- city - -
- string -
-
- -
Configures the user's city.
-
-
- company - -
- string -
-
- -
Configures the user's company name.
-
-
- country - -
- string -
-
- -
Configures the user's country code.
-
Note that this is a two-character ISO 3166 code.
-
-
- delegates - -
- list - / elements=string -
-
added in 1.10.0
-
- -
Specifies an array of principal objects. This parameter sets the msDS-AllowedToActOnBehalfOfOtherIdentity attribute of a computer account object.
-
Must be specified as a distinguished name CN=shenetworks,CN=Users,DC=ansible,DC=test
-

aliases: principals_allowed_to_delegate
-
-
- description - -
- string -
-
- -
Description of the user
-
-
- domain_password - -
- string -
-
- -
The password for username.
-
-
- domain_server - -
- string -
-
- -
Specifies 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 domain of the computer running PowerShell.
-
-
- domain_username - -
- string -
-
- -
The username to use when interacting with AD.
-
If this is not set then the user Ansible used to log in with will be used instead when using CredSSP or Kerberos with credential delegation.
-
-
- email - -
- string -
-
- -
Configures the user's email address.
-
This is a record in AD and does not do anything to configure any email servers or systems.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
yes will enable the user account.
-
no will disable the account.
-
-
- firstname - -
- string -
-
- -
Configures the user's first name (given name).
-
-
- groups - -
- list - / elements=string -
-
- -
Adds or removes the user from this list of groups, depending on the value of groups_action.
-
To remove all but the Principal Group, set groups=<principal group name> and groups_action=replace.
-
Note that users cannot be removed from their principal group (for example, "Domain Users").
-
-
- groups_action - -
- string -
-
-
    Choices: -
  • add
  • -
  • remove
  • -
  • replace ←
  • -
-
-
If add, the user is added to each group in groups where not already a member.
-
If remove, the user is removed from each group in groups.
-
If replace, the user is added as a member of each group in groups and removed from any other groups.
-
-
- groups_missing_behaviour - -
- string -
-
added in 1.10.0
-
-
    Choices: -
  • fail ←
  • -
  • ignore
  • -
  • warn
  • -
-
-
Controls what happens when a group specified by groups is an invalid group name.
-
fail is the default and will return an error any groups do not exist.
-
ignore will ignore any groups that does not exist.
-
warn will display a warning for any groups that do not exist but will continue without failing.
-
-
- identity - -
- string -
-
- -
Identity parameter used to find the User in the Active Directory.
-
This value can be in the forms Distinguished Name, objectGUID, objectSid or sAMAccountName.
-
Default to name if not set.
-
-
- name - -
- string - / required -
-
- -
Name of the user to create, remove or modify.
-
-
- password - -
- string -
-
- -
Optionally set the user's password to this (plain text) value.
-
To enable an account - enabled - a password must already be configured on the account, or you must provide a password here.
-
-
- password_expired - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
yes will require the user to change their password at next login.
-
no will clear the expired password flag.
-
This is mutually exclusive with password_never_expires.
-
-
- password_never_expires - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
yes will set the password to never expire.
-
no will allow the password to expire.
-
This is mutually exclusive with password_expired.
-
-
- path - -
- string -
-
- -
Container or OU for the new user; if you do not specify this, the user will be placed in the default container for users in the domain.
-
Setting the path is only available when a new user is created; if you specify a path on an existing user, the user's path will not be updated - you must delete (e.g., state=absent) the user and then re-add the user with the appropriate path.
-
-
- postal_code - -
- string -
-
- -
Configures the user's postal code / zip code.
-
-
- sam_account_name - -
- string -
-
added in 1.7.0
-
- -
Configures the SAM Account Name (sAMAccountName) for the account.
-
This is allowed to a maximum of 20 characters due to pre-Windows 2000 restrictions.
-
Default to the <username> specified in upn or name if not set.
-
-
- spn - -
- list - / elements=string -
-
added in 1.10.0
-
- -
Specifies the service principal name(s) for the account. This parameter sets the ServicePrincipalNames property of the account. The LDAP display name (ldapDisplayName) for this property is servicePrincipalName.
-

aliases: spns
-
-
- spn_action - -
- string -
-
added in 1.10.0
-
-
    Choices: -
  • add
  • -
  • remove
  • -
  • replace ←
  • -
-
-
If add, the SPNs are added to the user.
-
If remove, the SPNs are removed from the user.
-
If replace, the defined set of SPN's overwrite the current set of SPNs.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
  • query
  • -
-
-
When present, creates or updates the user account.
-
When absent, removes the user account if it exists.
-
When query, retrieves the user account details without making any changes.
-
-
- state_province - -
- string -
-
- -
Configures the user's state or province.
-
-
- street - -
- string -
-
- -
Configures the user's street address.
-
-
- surname - -
- string -
-
- -
Configures the user's last name (surname).
-

aliases: lastname
-
-
- update_password - -
- string -
-
-
    Choices: -
  • always ←
  • -
  • on_create
  • -
  • when_changed
  • -
-
-
always will always update passwords.
-
on_create will only set the password for newly created users.
-
when_changed will only set the password when changed.
-
-
- upn - -
- string -
-
- -
Configures the User Principal Name (UPN) for the account.
-
This is not required, but is best practice to configure for modern versions of Active Directory.
-
The format is <username>@<domain>.
-
-
- user_cannot_change_password - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
yes will prevent the user from changing their password.
-
no will allow the user to change their password.
-
-
- - -Notes ------ - -.. note:: - - Works with Windows 2012R2 and newer. - - If running on a server that is not a Domain Controller, credential delegation through CredSSP or Kerberos with delegation must be used or the *domain_username*, *domain_password* must be set. - - Note that some individuals have confirmed successful operation on Windows 2008R2 servers with AD and AD Web Services enabled, but this has not received the same degree of testing as Windows 2012R2. - - -See Also --------- - -.. seealso:: - - :ref:`ansible.windows.win_domain_module` - The official documentation on the **ansible.windows.win_domain** module. - :ref:`ansible.windows.win_domain_controller_module` - The official documentation on the **ansible.windows.win_domain_controller** module. - :ref:`community.windows.win_domain_computer_module` - The official documentation on the **community.windows.win_domain_computer** module. - :ref:`community.windows.win_domain_group_module` - The official documentation on the **community.windows.win_domain_group** module. - :ref:`ansible.windows.win_domain_membership_module` - The official documentation on the **ansible.windows.win_domain_membership** module. - :ref:`ansible.windows.win_user_module` - The official documentation on the **ansible.windows.win_user** module. - :ref:`community.windows.win_user_profile_module` - The official documentation on the **community.windows.win_user_profile** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Ensure user bob is present with address information - community.windows.win_domain_user: - name: bob - firstname: Bob - surname: Smith - company: BobCo - password: B0bP4ssw0rd - state: present - groups: - - Domain Admins - street: 123 4th St. - city: Sometown - state_province: IN - postal_code: 12345 - country: US - attributes: - telephoneNumber: 555-123456 - - - name: Ensure user bob is created and use custom credentials to create the user - community.windows.win_domain_user: - name: bob - firstname: Bob - surname: Smith - password: B0bP4ssw0rd - state: present - domain_username: DOMAIN\admin-account - domain_password: SomePas2w0rd - domain_server: domain@DOMAIN.COM - - - name: Ensure user bob is present in OU ou=test,dc=domain,dc=local - community.windows.win_domain_user: - name: bob - password: B0bP4ssw0rd - state: present - path: ou=test,dc=domain,dc=local - groups: - - Domain Admins - - - name: Ensure user bob is absent - community.windows.win_domain_user: - name: bob - state: absent - - - name: Ensure user has spn's defined - community.windows.win_domain_user: - name: liz.kenyon - spn: - - MSSQLSvc/us99db-svr95:1433 - - MSSQLSvc/us99db-svr95.vmware.com:1433 - - - name: Ensure user has spn added - community.windows.win_domain_user: - name: liz.kenyon - spn_action: add - spn: - - MSSQLSvc/us99db-svr95:2433 - - - name: Ensure user is created with delegates and spn's defined - community.windows.win_domain_user: - name: shmemmmy - password: The3rubberducki33! - state: present - groups: - - Domain Admins - - Enterprise Admins - delegates: - - CN=shenetworks,CN=Users,DC=ansible,DC=test - - CN=mk.ai,CN=Users,DC=ansible,DC=test - - CN=jessiedotjs,CN=Users,DC=ansible,DC=test - spn: - - MSSQLSvc/us99db-svr95:2433 - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- account_locked - -
- boolean -
-
always -
true if the account is locked
-
-
-
- changed - -
- boolean -
-
always -
true if the account changed during execution
-
-
-
- city - -
- string -
-
always -
The user city
-
-
Sample:
-
Indianapolis
-
-
- company - -
- string -
-
always -
The user company
-
-
Sample:
-
RedHat
-
-
- country - -
- string -
-
always -
The user country
-
-
Sample:
-
US
-
-
- created - -
- boolean -
-
always -
Whether a user was created
-
-
Sample:
-
True
-
-
- delegates - -
- list - / elements=string -
-
added in 1.10.0
-
always -
Principals allowed to delegate
-
-
Sample:
-
['CN=svc.tech.unicorn,CN=Users,DC=ansible,DC=test', 'CN=geoff,CN=Users,DC=ansible,DC=test']
-
-
- description - -
- string -
-
always -
A description of the account
-
-
Sample:
-
Server Administrator
-
-
- distinguished_name - -
- string -
-
always -
DN of the user account
-
-
Sample:
-
CN=nick,OU=test,DC=domain,DC=local
-
-
- email - -
- string -
-
always -
The user email address
-
-
Sample:
-
nick@domain.local
-
-
- enabled - -
- string -
-
always -
true if the account is enabled and false if disabled
-
-
Sample:
-
True
-
-
- firstname - -
- string -
-
always -
The user first name
-
-
Sample:
-
Nick
-
-
- groups - -
- list -
-
always -
AD Groups to which the account belongs
-
-
Sample:
-
['Domain Admins', 'Domain Users']
-
-
- msg - -
- string -
-
always -
Summary message of whether the user is present or absent
-
-
Sample:
-
User nick is present
-
-
- name - -
- string -
-
always -
The username on the account
-
-
Sample:
-
nick
-
-
- password_expired - -
- boolean -
-
always -
true if the account password has expired
-
-
-
- password_updated - -
- boolean -
-
always -
true if the password changed during this execution
-
-
Sample:
-
True
-
-
- postal_code - -
- string -
-
always -
The user postal code
-
-
Sample:
-
46033
-
-
- sam_account_name - -
- string -
-
added in 1.7.0
-
always -
The SAM Account Name of the account
-
-
Sample:
-
nick
-
-
- sid - -
- string -
-
always -
The SID of the account
-
-
Sample:
-
S-1-5-21-2752426336-228313920-2202711348-1175
-
-
- spn - -
- list -
-
added in 1.10.0
-
always -
The service principal names
-
-
Sample:
-
['HTTPSvc/ws1intel-svc1', 'HTTPSvc/ws1intel-svc1.vmware.com']
-
-
- state - -
- string -
-
always -
The state of the user account
-
-
Sample:
-
present
-
-
- state_province - -
- string -
-
always -
The user state or province
-
-
Sample:
-
IN
-
-
- street - -
- string -
-
always -
The user street address
-
-
Sample:
-
123 4th St.
-
-
- surname - -
- string -
-
always -
The user last name
-
-
Sample:
-
Doe
-
-
- upn - -
- string -
-
always -
The User Principal Name of the account
-
-
Sample:
-
nick@domain.local
-
-
- user_cannot_change_password - -
- string -
-
always -
true if the user is not allowed to change password
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Nick Chandler (@nwchandler) -- Joe Zollo (@zollo) diff --git a/docs/community.windows.win_dotnet_ngen_module.rst b/docs/community.windows.win_dotnet_ngen_module.rst deleted file mode 100644 index ae8bf989..00000000 --- a/docs/community.windows.win_dotnet_ngen_module.rst +++ /dev/null @@ -1,200 +0,0 @@ -.. _community.windows.win_dotnet_ngen_module: - - -********************************* -community.windows.win_dotnet_ngen -********************************* - -**Runs ngen to recompile DLLs after .NET updates** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- After .NET framework is installed/updated, Windows will probably want to recompile things to optimise for the host. -- This happens via scheduled task, usually at some inopportune time. -- This module allows you to run this task on your own schedule, so you incur the CPU hit at some more convenient and controlled time. -- https://docs.microsoft.com/en-us/dotnet/framework/tools/ngen-exe-native-image-generator#native-image-service -- http://blogs.msdn.com/b/dotnet/archive/2013/08/06/wondering-why-mscorsvw-exe-has-high-cpu-usage-you-can-speed-it-up.aspx - - - - - -Notes ------ - -.. note:: - - There are in fact two scheduled tasks for ngen but they have no triggers so aren't a problem. - - There's no way to test if they've been completed. - - The stdout is quite likely to be several megabytes. - - - -Examples --------- - -.. code-block:: yaml - - - name: Run ngen tasks - community.windows.win_dotnet_ngen: - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- dotnet_ngen64_eqi_exit_code - -
- integer -
-
64-bit ngen executable exists -
The exit code after running the 64-bit ngen.exe executeQueuedItems command.
-
-
-
- dotnet_ngen64_eqi_output - -
- string -
-
64-bit ngen executable exists -
The stdout after running the 64-bit ngen.exe executeQueuedItems command.
-
-
Sample:
-
sample output
-
-
- dotnet_ngen64_update_exit_code - -
- integer -
-
64-bit ngen executable exists -
The exit code after running the 64-bit ngen.exe update /force command.
-
-
-
- dotnet_ngen64_update_output - -
- string -
-
64-bit ngen executable exists -
The stdout after running the 64-bit ngen.exe update /force command.
-
-
Sample:
-
sample output
-
-
- dotnet_ngen_eqi_exit_code - -
- integer -
-
32-bit ngen executable exists -
The exit code after running the 32-bit ngen.exe executeQueuedItems command.
-
-
-
- dotnet_ngen_eqi_output - -
- string -
-
32-bit ngen executable exists -
The stdout after running the 32-bit ngen.exe executeQueuedItems command.
-
-
Sample:
-
sample output
-
-
- dotnet_ngen_update_exit_code - -
- integer -
-
32-bit ngen executable exists -
The exit code after running the 32-bit ngen.exe update /force command.
-
-
-
- dotnet_ngen_update_output - -
- string -
-
32-bit ngen executable exists -
The stdout after running the 32-bit ngen.exe update /force command.
-
-
Sample:
-
sample output
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Peter Mounce (@petemounce) diff --git a/docs/community.windows.win_eventlog_entry_module.rst b/docs/community.windows.win_eventlog_entry_module.rst deleted file mode 100644 index bb9af57a..00000000 --- a/docs/community.windows.win_eventlog_entry_module.rst +++ /dev/null @@ -1,205 +0,0 @@ -.. _community.windows.win_eventlog_entry_module: - - -************************************ -community.windows.win_eventlog_entry -************************************ - -**Write entries to Windows event logs** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Write log entries to a given event log from a specified source. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- category - -
- integer -
-
- -
A numeric task category associated with the category message file for the log source.
-
-
- entry_type - -
- string -
-
-
    Choices: -
  • Error
  • -
  • FailureAudit
  • -
  • Information
  • -
  • SuccessAudit
  • -
  • Warning
  • -
-
-
Indicates the entry being written to the log is of a specific type.
-
-
- event_id - -
- integer - / required -
-
- -
The numeric event identifier for the entry.
-
Value must be between 0 and 65535.
-
-
- log - -
- string - / required -
-
- -
Name of the event log to write an entry to.
-
-
- message - -
- string - / required -
-
- -
The message for the given log entry.
-
-
- raw_data - -
- string -
-
- -
Binary data associated with the log entry.
-
Value must be a comma-separated array of 8-bit unsigned integers (0 to 255).
-
-
- source - -
- string - / required -
-
- -
Name of the log source to indicate where the entry is from.
-
-
- - -Notes ------ - -.. note:: - - This module will always report a change when writing an event entry. - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_eventlog_module` - The official documentation on the **community.windows.win_eventlog** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Write an entry to a Windows event log - community.windows.win_eventlog_entry: - log: MyNewLog - source: NewLogSource1 - event_id: 1234 - message: This is a test log entry. - - - name: Write another entry to a different Windows event log - community.windows.win_eventlog_entry: - log: AnotherLog - source: MyAppSource - event_id: 5000 - message: An error has occurred. - entry_type: Error - category: 5 - raw_data: 10,20 - - - - -Status ------- - - -Authors -~~~~~~~ - -- Andrew Saraceni (@andrewsaraceni) diff --git a/docs/community.windows.win_eventlog_module.rst b/docs/community.windows.win_eventlog_module.rst deleted file mode 100644 index c1e36d0a..00000000 --- a/docs/community.windows.win_eventlog_module.rst +++ /dev/null @@ -1,413 +0,0 @@ -.. _community.windows.win_eventlog_module: - - -****************************** -community.windows.win_eventlog -****************************** - -**Manage Windows event logs** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Allows the addition, clearing and removal of local Windows event logs, and the creation and removal of sources from a given event log. Also allows the specification of settings per log and source. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- category_file - -
- path -
-
- -
For one or more sources specified, the path to a custom category resource file.
-
-
- maximum_size - -
- string -
-
- -
The maximum size of the event log.
-
Value must be between 64KB and 4GB, and divisible by 64KB.
-
Size can be specified in KB, MB or GB (e.g. 128KB, 16MB, 2.5GB).
-
-
- message_file - -
- path -
-
- -
For one or more sources specified, the path to a custom event message resource file.
-
-
- name - -
- string - / required -
-
- -
Name of the event log to manage.
-
-
- overflow_action - -
- string -
-
-
    Choices: -
  • DoNotOverwrite
  • -
  • OverwriteAsNeeded
  • -
  • OverwriteOlder
  • -
-
-
The action for the log to take once it reaches its maximum size.
-
For DoNotOverwrite, all existing entries are kept and new entries are not retained.
-
For OverwriteAsNeeded, each new entry overwrites the oldest entry.
-
For OverwriteOlder, new log entries overwrite those older than the retention_days value.
-
-
- parameter_file - -
- path -
-
- -
For one or more sources specified, the path to a custom parameter resource file.
-
-
- retention_days - -
- integer -
-
- -
The minimum number of days event entries must remain in the log.
-
This option is only used when overflow_action is OverwriteOlder.
-
-
- sources - -
- list - / elements=string -
-
- -
A list of one or more sources to ensure are present/absent in the log.
-
When category_file, message_file and/or parameter_file are specified, these values are applied across all sources.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • clear
  • -
  • present ←
  • -
-
-
Desired state of the log and/or sources.
-
When sources is populated, state is checked for sources.
-
When sources is not populated, state is checked for the specified log itself.
-
If state is clear, event log entries are cleared for the target log.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_eventlog_entry_module` - The official documentation on the **community.windows.win_eventlog_entry** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Add a new event log with two custom sources - community.windows.win_eventlog: - name: MyNewLog - sources: - - NewLogSource1 - - NewLogSource2 - state: present - - - name: Change the category and message resource files used for NewLogSource1 - community.windows.win_eventlog: - name: MyNewLog - sources: - - NewLogSource1 - category_file: C:\NewApp\CustomCategories.dll - message_file: C:\NewApp\CustomMessages.dll - state: present - - - name: Change the maximum size and overflow action for MyNewLog - community.windows.win_eventlog: - name: MyNewLog - maximum_size: 16MB - overflow_action: DoNotOverwrite - state: present - - - name: Clear event entries for MyNewLog - community.windows.win_eventlog: - name: MyNewLog - state: clear - - - name: Remove NewLogSource2 from MyNewLog - community.windows.win_eventlog: - name: MyNewLog - sources: - - NewLogSource2 - state: absent - - - name: Remove MyNewLog and all remaining sources - community.windows.win_eventlog: - name: MyNewLog - state: absent - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- entries - -
- integer -
-
success -
The count of entries present in the event log.
-
-
Sample:
-
50
-
-
- exists - -
- boolean -
-
success -
Whether the event log exists or not.
-
-
Sample:
-
True
-
-
- maximum_size_kb - -
- integer -
-
success -
Maximum size of the log in KB.
-
-
Sample:
-
512
-
-
- name - -
- string -
-
always -
The name of the event log.
-
-
Sample:
-
MyNewLog
-
-
- overflow_action - -
- string -
-
success -
The action the log takes once it reaches its maximum size.
-
-
Sample:
-
OverwriteOlder
-
-
- retention_days - -
- integer -
-
success -
The minimum number of days entries are retained in the log.
-
-
Sample:
-
7
-
-
- sources - -
- list -
-
success -
A list of the current sources for the log.
-
-
Sample:
-
['MyNewLog', 'NewLogSource1', 'NewLogSource2']
-
-
- sources_changed - -
- list -
-
always -
A list of sources changed (e.g. re/created, removed) for the log; this is empty if no sources are changed.
-
-
Sample:
-
['NewLogSource2']
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Andrew Saraceni (@andrewsaraceni) diff --git a/docs/community.windows.win_feature_info_module.rst b/docs/community.windows.win_feature_info_module.rst deleted file mode 100644 index 9cc0e123..00000000 --- a/docs/community.windows.win_feature_info_module.rst +++ /dev/null @@ -1,525 +0,0 @@ -.. _community.windows.win_feature_info_module: - - -********************************** -community.windows.win_feature_info -********************************** - -**Gather information about Windows features** - - -Version added: 1.4.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about all or a specific installed Windows feature(s). - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- name - -
- string -
-
- Default:
"*"
-
-
If specified, this is used to match the name of the Windows feature to get the info for.
-
Can be a wildcard to match multiple features but the wildcard will only be matched on the name of the feature.
-
If omitted then all features will returned.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`ansible.windows.win_feature_module` - The official documentation on the **ansible.windows.win_feature** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Get info for all installed features - community.windows.win_feature_info: - register: feature_info - - name: Get info for a single feature - community.windows.win_feature_info: - name: DNS - register: feature_info - - name: Find all features that start with 'FS' - ansible.windows.win_feature_info: - name: FS* - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- exists - -
- boolean -
-
always -
Whether any features were found based on the criteria specified.
-
-
Sample:
-
True
-
-
- features - -
- list - / elements=dictionary -
-
always -
A list of feature(s) that were found based on the criteria.
-
Will be an empty list if no features were found.
-
-
  -
- additional_info - -
- dictionary -
-
-
A list of privileges that the feature requires and will run with
-
-
   -
- install_name - -
- string -
-
-
The action to perform once triggered, can be start_feature or stop_feature.
-
-
Sample:
-
ADCertificateServicesRole
-
   -
- major_version - -
- integer -
-
-
Major Version of feature name.
-
-
Sample:
-
8
-
   -
- minor_version - -
- integer -
-
-
Minor Version of feature name.
-
-
   -
- number_id_version - -
- integer -
-
-
Numberic Id of feature name.
-
-
Sample:
-
16
-
  -
- best_practices_model_id - -
- string -
-
-
BestPracticesModelId for feature name.
-
-
Sample:
-
Microsoft/Windows/UpdateServices
-
  -
- depends_on - -
- list - / elements=string -
-
-
The command line that will be run when a run_command failure action is fired.
-
-
Sample:
-
['Web-Static-Content', 'Web-Default-Doc']
-
  -
- depth - -
- integer -
-
-
Depth of name feature.
-
-
Sample:
-
1
-
  -
- description - -
- string -
-
-
The description of the feature.
-
-
Sample:
-
Example description of the Windows feature.
-
  -
- display_name - -
- string -
-
-
The Display name of feature found.
-
-
Sample:
-
Active Directory Certificate Services
-
  -
- event_query - -
- string -
-
-
The EventQuery for feature name.
-
This will be null if None Present
-
-
Sample:
-
IPAMServer.Events.xml
-
  -
- feature_type - -
- string -
-
-
The Feature Type of name.
-
Values will be one of Role, Role Service, Feature.
-
-
Sample:
-
Feature
-
  -
- install_state - -
- string -
-
-
The Install State of name.
-
Values will be one of Available, Removed, Installed.
-
-
Sample:
-
Installed
-
  -
- installed - -
- boolean -
-
-
Whether the feature by name is installed.
-
-
  -
- name - -
- string -
-
-
Name of feature found.
-
-
Sample:
-
AD-Certificate
-
  -
- parent - -
- string -
-
-
The parent of feature name if present.
-
-
Sample:
-
PowerShellRoot
-
  -
- path - -
- string -
-
-
The Path of name feature.
-
-
Sample:
-
WoW64 Support
-
  -
- post_configuration_needed - -
- boolean -
-
-
Tells if Post Configuration is needed for feature name.
-
-
  -
- server_component_descriptor - -
- string -
-
-
Descriptor of name feature.
-
-
Sample:
-
ServerComponent_AD_Certificate
-
  -
- sub_features - -
- list - / elements=string -
-
-
List of sub features names of feature name.
-
-
Sample:
-
['WAS-Process-Model', 'WAS-NET-Environment', 'WAS-Config-APIs']
-
  -
- system_service - -
- list - / elements=string -
-
-
The name of the service installed by feature name.
-
-
Sample:
-
['iisadmin', 'w3svc']
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Larry Lane (@gamethis) diff --git a/docs/community.windows.win_file_compression_module.rst b/docs/community.windows.win_file_compression_module.rst deleted file mode 100644 index c1ea57eb..00000000 --- a/docs/community.windows.win_file_compression_module.rst +++ /dev/null @@ -1,203 +0,0 @@ -.. _community.windows.win_file_compression_module: - - -************************************** -community.windows.win_file_compression -************************************** - -**Alters the compression of files and directories on NTFS partitions.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module sets the compressed attribute for files and directories on a filesystem that supports it like NTFS. -- NTFS compression can be used to save disk space. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- force - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
This option only has an effect when recurse is true
-
If true, will check the compressed state of all subdirectories and files and make a change if any are different from compressed.
-
If false, will only make a change if the compressed state of path is different from compressed.
-
If the folder structure is complex or contains a lot of files, it is recommended to set this option to false so that not every file has to be checked.
-
-
- path - -
- path - / required -
-
- -
The full path of the file or directory to modify.
-
The path must exist on file system that supports compression like NTFS.
-
-
- recurse - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to recursively apply changes to all subdirectories and files.
-
This option only has an effect when path is a directory.
-
When set to false, only applies changes to path.
-
When set to true, applies changes to path and all subdirectories and files.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Set to present to ensure the path is compressed.
-
Set to absent to ensure the path is not compressed.
-
-
- - -Notes ------ - -.. note:: - - :ref:`community.windows.win_file_compression ` sets the file system's compression state, it does not create a zip archive file. - - For more about NTFS Compression, see http://www.ntfs.com/ntfs-compressed.htm - - - -Examples --------- - -.. code-block:: yaml - - - name: Compress log files directory - community.windows.win_file_compression: - path: C:\Logs - state: present - - - name: Decompress log files directory - community.windows.win_file_compression: - path: C:\Logs - state: absent - - - name: Compress reports directory and all subdirectories - community.windows.win_file_compression: - path: C:\business\reports - state: present - recurse: yes - - # This will only check C:\business\reports for the compressed state - # If C:\business\reports is compressed, it will not make a change - # even if one of the child items is uncompressed - - - name: Compress reports directory and all subdirectories (quick) - community.windows.win_file_compression: - path: C:\business\reports - compressed: yes - recurse: yes - force: no - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- rc - -
- integer -
-
always -
The return code of the compress/uncompress operation.
-
If no changes are made or the operation is successful, rc is 0.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Micah Hunsberger (@mhunsber) diff --git a/docs/community.windows.win_file_version_module.rst b/docs/community.windows.win_file_version_module.rst deleted file mode 100644 index 4fa683b0..00000000 --- a/docs/community.windows.win_file_version_module.rst +++ /dev/null @@ -1,215 +0,0 @@ -.. _community.windows.win_file_version_module: - - -********************************** -community.windows.win_file_version -********************************** - -**Get DLL or EXE file build version** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Get DLL or EXE file build version. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- path - -
- path - / required -
-
- -
File to get version.
-
Always provide absolute path.
-
-
- - -Notes ------ - -.. note:: - - This module will always return no change. - - -See Also --------- - -.. seealso:: - - :ref:`ansible.windows.win_file_module` - The official documentation on the **ansible.windows.win_file** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Get acm instance version - community.windows.win_file_version: - path: C:\Windows\System32\cmd.exe - register: exe_file_version - - - debug: - msg: '{{ exe_file_version }}' - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- file_build_part - -
- string -
-
no error -
build number of the file.
-
-
-
- file_major_part - -
- string -
-
no error -
the major part of the version number.
-
-
-
- file_minor_part - -
- string -
-
no error -
the minor part of the version number of the file.
-
-
-
- file_private_part - -
- string -
-
no error -
file private part number.
-
-
-
- file_version - -
- string -
-
no error -
File version number..
-
-
-
- path - -
- string -
-
always -
file path
-
-
-
- product_version - -
- string -
-
no error -
The version of the product this file is distributed with.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Sam Liu (@SamLiu79) diff --git a/docs/community.windows.win_firewall_module.rst b/docs/community.windows.win_firewall_module.rst deleted file mode 100644 index b0efad14..00000000 --- a/docs/community.windows.win_firewall_module.rst +++ /dev/null @@ -1,244 +0,0 @@ -.. _community.windows.win_firewall_module: - - -****************************** -community.windows.win_firewall -****************************** - -**Enable or disable the Windows Firewall** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Enable or Disable Windows Firewall profiles. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- This module requires Windows Management Framework 5 or later. - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- inbound_action - -
- string -
-
added in 1.1.0
-
-
    Choices: -
  • allow
  • -
  • block
  • -
  • not_configured
  • -
-
-
Set to allow or block inbound network traffic in the profile.
-
not_configured is valid when configuring a GPO.
-
-
- outbound_action - -
- string -
-
added in 1.1.0
-
-
    Choices: -
  • allow
  • -
  • block
  • -
  • not_configured
  • -
-
-
Set to allow or block inbound network traffic in the profile.
-
not_configured is valid when configuring a GPO.
-
-
- profiles - -
- list - / elements=string -
-
-
    Choices: -
  • Domain ←
  • -
  • Private ←
  • -
  • Public ←
  • -
- Default:
["Domain", "Private", "Public"]
-
-
Specify one or more profiles to change.
-
-
- state - -
- string -
-
-
    Choices: -
  • disabled
  • -
  • enabled
  • -
-
-
Set state of firewall for given profile.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_firewall_rule_module` - The official documentation on the **community.windows.win_firewall_rule** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Enable firewall for Domain, Public and Private profiles - community.windows.win_firewall: - state: enabled - profiles: - - Domain - - Private - - Public - tags: enable_firewall - - - name: Disable Domain firewall - community.windows.win_firewall: - state: disabled - profiles: - - Domain - tags: disable_firewall - - - name: Enable firewall for Domain profile and block outbound connections - community.windows.win_firewall: - profiles: Domain - state: enabled - outbound_action: block - tags: block_connection - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- enabled - -
- boolean -
-
always -
Current firewall status for chosen profile (after any potential change).
-
-
Sample:
-
True
-
-
- profiles - -
- string -
-
always -
Chosen profile.
-
-
Sample:
-
Domain
-
-
- state - -
- list -
-
always -
Desired state of the given firewall profile(s).
-
-
Sample:
-
enabled
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Michael Eaton (@michaeldeaton) diff --git a/docs/community.windows.win_firewall_rule_module.rst b/docs/community.windows.win_firewall_rule_module.rst deleted file mode 100644 index aac5c209..00000000 --- a/docs/community.windows.win_firewall_rule_module.rst +++ /dev/null @@ -1,427 +0,0 @@ -.. _community.windows.win_firewall_rule_module: - - -*********************************** -community.windows.win_firewall_rule -*********************************** - -**Windows firewall automation** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Allows you to create/remove/update firewall rules. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- action - -
- string -
-
-
    Choices: -
  • allow
  • -
  • block
  • -
-
-
What to do with the items this rule is for.
-
Defaults to allow when creating a new rule.
-
-
- description - -
- string -
-
- -
Description for the firewall rule.
-
-
- direction - -
- string -
-
-
    Choices: -
  • in
  • -
  • out
  • -
-
-
Whether this rule is for inbound or outbound traffic.
-
Defaults to in when creating a new rule.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Whether this firewall rule is enabled or disabled.
-
Defaults to true when creating a new rule.
-

aliases: enable
-
-
- group - -
- string -
-
- -
The group name for the rule.
-
If name is not specified then the module will set the firewall options for all the rules in this group.
-
-
- icmp_type_code - -
- list - / elements=string -
-
- -
The ICMP types and codes for the rule.
-
This is only valid when protocol is icmpv4 or icmpv6.
-
Each entry follows the format type:code where type is the type number and code is the code number for that type or * for all codes.
-
Set the value to just * to apply the rule for all ICMP type codes.
-
See https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml for a list of ICMP types and the codes that apply to them.
-
-
- localip - -
- string -
-
- -
The local ip address this rule applies to.
-
Set to any to apply to all local ip addresses.
-
Defaults to any when creating a new rule.
-
-
- localport - -
- string -
-
- -
The local port this rule applies to.
-
Set to any to apply to all local ports.
-
Defaults to any when creating a new rule.
-
Must have protocol set
-
-
- name - -
- string -
-
- -
The rule's display name.
-
This is required unless group is specified.
-
-
- profiles - -
- list - / elements=string -
-
- -
The profile this rule applies to.
-
Defaults to domain,private,public when creating a new rule.
-

aliases: profile
-
-
- program - -
- string -
-
- -
The program this rule applies to.
-
Set to any to apply to all programs.
-
Defaults to any when creating a new rule.
-
-
- protocol - -
- string -
-
- -
The protocol this rule applies to.
-
Set to any to apply to all services.
-
Defaults to any when creating a new rule.
-
-
- remoteip - -
- string -
-
- -
The remote ip address/range this rule applies to.
-
Set to any to apply to all remote ip addresses.
-
Defaults to any when creating a new rule.
-
-
- remoteport - -
- string -
-
- -
The remote port this rule applies to.
-
Set to any to apply to all remote ports.
-
Defaults to any when creating a new rule.
-
Must have protocol set
-
-
- service - -
- string -
-
- -
The service this rule applies to.
-
Set to any to apply to all services.
-
Defaults to any when creating a new rule.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Should this rule be added or removed.
-
-
- - -Notes ------ - -.. note:: - - Multiple firewall rules can share the same *name*, if there are multiple matches then the module will set the user defined options for each matching rule. - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_firewall_module` - The official documentation on the **community.windows.win_firewall** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Firewall rule to allow SMTP on TCP port 25 - community.windows.win_firewall_rule: - name: SMTP - localport: 25 - action: allow - direction: in - protocol: tcp - state: present - enabled: yes - - - name: Firewall rule to allow RDP on TCP port 3389 - community.windows.win_firewall_rule: - name: Remote Desktop - localport: 3389 - action: allow - direction: in - protocol: tcp - profiles: private - state: present - enabled: yes - - - name: Firewall rule to be created for application group - community.windows.win_firewall_rule: - name: SMTP - group: application - localport: 25 - action: allow - direction: in - protocol: tcp - state: present - enabled: yes - - - name: Enable all the Firewall rules in application group - win_firewall_rule: - group: application - enabled: yes - - - name: Firewall rule to allow port range - community.windows.win_firewall_rule: - name: Sample port range - localport: 5000-5010 - action: allow - direction: in - protocol: tcp - state: present - enabled: yes - - - name: Firewall rule to allow ICMP v4 echo (ping) - community.windows.win_firewall_rule: - name: ICMP Allow incoming V4 echo request - enabled: yes - state: present - profiles: private - action: allow - direction: in - protocol: icmpv4 - icmp_type_code: - - '8:*' - - - name: Firewall rule to alloc ICMP v4 on all type codes - community.windows.win_firewall_rule: - name: ICMP Allow incoming V4 echo request - enabled: yes - state: present - profiles: private - action: allow - direction: in - protocol: icmpv4 - icmp_type_code: '*' - - - - -Status ------- - - -Authors -~~~~~~~ - -- Artem Zinenko (@ar7z1) -- Timothy Vandenbrande (@TimothyVandenbrande) diff --git a/docs/community.windows.win_format_module.rst b/docs/community.windows.win_format_module.rst deleted file mode 100644 index 569433b9..00000000 --- a/docs/community.windows.win_format_module.rst +++ /dev/null @@ -1,284 +0,0 @@ -.. _community.windows.win_format_module: - - -**************************** -community.windows.win_format -**************************** - -**Formats an existing volume or a new volume on an existing partition on Windows** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- The :ref:`community.windows.win_format ` module formats an existing volume or a new volume on an existing partition on Windows - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- allocation_unit_size - -
- integer -
-
- -
Specifies the cluster size to use when formatting the volume.
-
If no cluster size is specified when you format a partition, defaults are selected based on the size of the partition.
-
This value must be a multiple of the physical sector size of the disk.
-
-
- compress - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable compression on the resulting NTFS volume.
-
NTFS compression is not supported where allocation_unit_size is more than 4096.
-
-
- drive_letter - -
- string -
-
- -
Used to specify the drive letter of the volume to be formatted.
-
-
- file_system - -
- string -
-
-
    Choices: -
  • ntfs
  • -
  • refs
  • -
  • exfat
  • -
  • fat32
  • -
  • fat
  • -
-
-
Used to specify the file system to be used when formatting the target volume.
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Specify if formatting should be forced for volumes that are not created from new partitions or if the source and target file system are different.
-
-
- full - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
A full format writes to every sector of the disk, takes much longer to perform than the default (quick) format, and is not recommended on storage that is thinly provisioned.
-
Specify true for full format.
-
-
- integrity_streams - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable integrity streams on the resulting ReFS volume.
-
-
- label - -
- string -
-
- -
Used to specify the label of the volume to be formatted.
-
-
- large_frs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Specifies that large File Record System (FRS) should be used.
-
-
- new_label - -
- string -
-
- -
Used to specify the new file system label of the formatted volume.
-
-
- path - -
- string -
-
- -
Used to specify the path to the volume to be formatted.
-
-
- - -Notes ------ - -.. note:: - - Microsoft Windows Server 2012 or Microsoft Windows 8 or newer is required to use this module. To check if your system is compatible, see https://docs.microsoft.com/en-us/windows/desktop/sysinfo/operating-system-version. - - One of three parameters (*drive_letter*, *path* and *label*) are mandatory to identify the target volume but more than one cannot be specified at the same time. - - This module is idempotent if *force* is not specified and file system labels remain preserved. - - For more information, see https://docs.microsoft.com/en-us/previous-versions/windows/desktop/stormgmt/format-msft-volume - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_disk_facts_module` - The official documentation on the **community.windows.win_disk_facts** module. - :ref:`community.windows.win_partition_module` - The official documentation on the **community.windows.win_partition** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Create a partition with drive letter D and size 5 GiB - community.windows.win_partition: - drive_letter: D - partition_size: 5 GiB - disk_number: 1 - - - name: Full format the newly created partition as NTFS and label it - community.windows.win_format: - drive_letter: D - file_system: NTFS - new_label: Formatted - full: True - - - - -Status ------- - - -Authors -~~~~~~~ - -- Varun Chopra (@chopraaa) diff --git a/docs/community.windows.win_hosts_module.rst b/docs/community.windows.win_hosts_module.rst deleted file mode 100644 index 079dc533..00000000 --- a/docs/community.windows.win_hosts_module.rst +++ /dev/null @@ -1,209 +0,0 @@ -.. _community.windows.win_hosts_module: - - -*************************** -community.windows.win_hosts -*************************** - -**Manages hosts file entries on Windows.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages hosts file entries on Windows. -- Maps IPv4 or IPv6 addresses to canonical names. -- Adds, removes, or sets cname records for ip and hostname pairs. -- Modifies %windir%\\system32\\drivers\\etc\\hosts. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- action - -
- string -
-
-
    Choices: -
  • add
  • -
  • remove
  • -
  • set ←
  • -
-
-
Controls the behavior of aliases.
-
Only applicable when state=present.
-
If add, each alias in aliases will be added to the host entry.
-
If set, each alias in aliases will be added to the host entry, and other aliases will be removed from the entry.
-
-
- aliases - -
- list - / elements=string -
-
- -
A list of additional names (cname records) for the host entry.
-
Only applicable when state=present.
-
-
- canonical_name - -
- string -
-
- -
A canonical name for the host entry.
-
required for state=present.
-
-
- ip_address - -
- string -
-
- -
The ip address for the host entry.
-
Can be either IPv4 (A record) or IPv6 (AAAA record).
-
Required for state=present.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Whether the entry should be present or absent.
-
If only canonical_name is provided when state=absent, then all hosts entries with the canonical name of canonical_name will be removed.
-
If only ip_address is provided when state=absent, then all hosts entries with the ip address of ip_address will be removed.
-
If ip_address and canonical_name are both omitted when state=absent, then all hosts entries will be removed.
-
-
- - -Notes ------ - -.. note:: - - Each canonical name can only be mapped to one IPv4 and one IPv6 address. If *canonical_name* is provided with ``state=present`` and is found to be mapped to another IP address that is the same type as, but unique from *ip_address*, then *canonical_name* and all *aliases* will be removed from the entry and added to an entry with the provided IP address. - - Each alias can only be mapped to one canonical name. If *aliases* is provided with ``state=present`` and an alias is found to be mapped to another canonical name, then the alias will be removed from the entry and either added to or removed from (depending on *action*) an entry with the provided canonical name. - - -See Also --------- - -.. seealso:: - - :ref:`ansible.windows.win_template_module` - The official documentation on the **ansible.windows.win_template** module. - :ref:`ansible.windows.win_file_module` - The official documentation on the **ansible.windows.win_file** module. - :ref:`ansible.windows.win_copy_module` - The official documentation on the **ansible.windows.win_copy** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Add 127.0.0.1 as an A record for localhost - community.windows.win_hosts: - state: present - canonical_name: localhost - ip_address: 127.0.0.1 - - - name: Add ::1 as an AAAA record for localhost - community.windows.win_hosts: - state: present - canonical_name: localhost - ip_address: '::1' - - - name: Remove 'bar' and 'zed' from the list of aliases for foo (192.168.1.100) - community.windows.win_hosts: - state: present - canonical_name: foo - ip_address: 192.168.1.100 - action: remove - aliases: - - bar - - zed - - - name: Remove hosts entries with canonical name 'bar' - community.windows.win_hosts: - state: absent - canonical_name: bar - - - name: Remove 10.2.0.1 from the list of hosts - community.windows.win_hosts: - state: absent - ip_address: 10.2.0.1 - - - name: Ensure all name resolution is handled by DNS - community.windows.win_hosts: - state: absent - - - - -Status ------- - - -Authors -~~~~~~~ - -- Micah Hunsberger (@mhunsber) diff --git a/docs/community.windows.win_hotfix_module.rst b/docs/community.windows.win_hotfix_module.rst deleted file mode 100644 index 4504cb56..00000000 --- a/docs/community.windows.win_hotfix_module.rst +++ /dev/null @@ -1,306 +0,0 @@ -.. _community.windows.win_hotfix_module: - - -**************************** -community.windows.win_hotfix -**************************** - -**Install and uninstalls Windows hotfixes** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Install, uninstall a Windows hotfix. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- hotfix_identifier - -
- string -
-
- -
The name of the hotfix as shown in DISM, see examples for details.
-
This or hotfix_kb MUST be set when state=absent.
-
If state=present then the hotfix at source will be validated against this value, if it does not match an error will occur.
-
You can get the identifier by running 'Get-WindowsPackage -Online -PackagePath path-to-cab-in-msu' after expanding the msu file.
-
-
- hotfix_kb - -
- string -
-
- -
The name of the KB the hotfix relates to, see examples for details.
-
This or hotfix_identifier MUST be set when state=absent.
-
If state=present then the hotfix at source will be validated against this value, if it does not match an error will occur.
-
Because DISM uses the identifier as a key and doesn't refer to a KB in all cases it is recommended to use hotfix_identifier instead.
-
-
- source - -
- path -
-
- -
The path to the downloaded hotfix .msu file.
-
This MUST be set if state=present and MUST be a .msu hotfix file.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Whether to install or uninstall the hotfix.
-
When present, source MUST be set.
-
When absent, hotfix_identifier or hotfix_kb MUST be set.
-
-
- - -Notes ------ - -.. note:: - - This must be run on a host that has the DISM powershell module installed and a Powershell version >= 4. - - This module is installed by default on Windows 8 and Server 2012 and newer. - - You can manually install this module on Windows 7 and Server 2008 R2 by installing the Windows ADK https://developer.microsoft.com/en-us/windows/hardware/windows-assessment-deployment-kit, see examples to see how to do it with chocolatey. - - You can download hotfixes from https://www.catalog.update.microsoft.com/Home.aspx. - - -See Also --------- - -.. seealso:: - - :ref:`ansible.windows.win_package_module` - The official documentation on the **ansible.windows.win_package** module. - :ref:`ansible.windows.win_updates_module` - The official documentation on the **ansible.windows.win_updates** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Install Windows ADK with DISM for Server 2008 R2 - chocolatey.chocolatey.win_chocolatey: - name: windows-adk - version: 8.100.26866.0 - state: present - install_args: /features OptionId.DeploymentTools - - - name: Install hotfix without validating the KB and Identifier - community.windows.win_hotfix: - source: C:\temp\windows8.1-kb3172729-x64_e8003822a7ef4705cbb65623b72fd3cec73fe222.msu - state: present - register: hotfix_install - - - ansible.windows.win_reboot: - when: hotfix_install.reboot_required - - - name: Install hotfix validating KB - community.windows.win_hotfix: - hotfix_kb: KB3172729 - source: C:\temp\windows8.1-kb3172729-x64_e8003822a7ef4705cbb65623b72fd3cec73fe222.msu - state: present - register: hotfix_install - - - ansible.windows.win_reboot: - when: hotfix_install.reboot_required - - - name: Install hotfix validating Identifier - community.windows.win_hotfix: - hotfix_identifier: Package_for_KB3172729~31bf3856ad364e35~amd64~~6.3.1.0 - source: C:\temp\windows8.1-kb3172729-x64_e8003822a7ef4705cbb65623b72fd3cec73fe222.msu - state: present - register: hotfix_install - - - ansible.windows.win_reboot: - when: hotfix_install.reboot_required - - - name: Uninstall hotfix with Identifier - community.windows.win_hotfix: - hotfix_identifier: Package_for_KB3172729~31bf3856ad364e35~amd64~~6.3.1.0 - state: absent - register: hotfix_uninstall - - - ansible.windows.win_reboot: - when: hotfix_uninstall.reboot_required - - - name: Uninstall hotfix with KB (not recommended) - community.windows.win_hotfix: - hotfix_kb: KB3172729 - state: absent - register: hotfix_uninstall - - - ansible.windows.win_reboot: - when: hotfix_uninstall.reboot_required - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- identifier - -
- string -
-
success -
The DISM identifier for the hotfix.
-
-
Sample:
-
Package_for_KB3172729~31bf3856ad364e35~amd64~~6.3.1.0
-
-
- identifiers - -
- list - / elements=string -
-
added in 1.10.0
-
success -
The DISM identifiers for each hotfix in the msu.
-
-
Sample:
-
['Package_for_KB3172729~31bf3856ad364e35~amd64~~6.3.1.0']
-
-
- kb - -
- string -
-
success -
The KB the hotfix relates to.
-
-
Sample:
-
KB3172729
-
-
- kbs - -
- list - / elements=string -
-
added in 1.10.0
-
success -
The KB for each hotfix in the msu,
-
-
Sample:
-
['KB3172729']
-
-
- reboot_required - -
- string -
-
success -
Whether a reboot is required for the install or uninstall to finalise.
-
-
Sample:
-
True
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Jordan Borean (@jborean93) diff --git a/docs/community.windows.win_http_proxy_module.rst b/docs/community.windows.win_http_proxy_module.rst deleted file mode 100644 index 8a341e3d..00000000 --- a/docs/community.windows.win_http_proxy_module.rst +++ /dev/null @@ -1,165 +0,0 @@ -.. _community.windows.win_http_proxy_module: - - -******************************** -community.windows.win_http_proxy -******************************** - -**Manages proxy settings for WinHTTP** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Used to set, remove, or import proxy settings for Windows HTTP Services ``WinHTTP``. -- WinHTTP is a framework used by applications or services, typically .NET applications or non-interactive services, to make web requests. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- bypass - -
- list - / elements=string -
-
- -
A list of hosts that will bypass the set proxy when being accessed.
-
Use <local> to match hostnames that are not fully qualified domain names. This is useful when needing to connect to intranet sites using just the hostname.
-
Omit, set to null or an empty string/list to remove the bypass list.
-
If this is set then proxy must also be set.
-
-
- proxy - -
- raw -
-
- -
A string or dict that specifies the proxy to be set.
-
If setting a string, should be in the form hostname, hostname:port, or protocol=hostname:port.
-
If the port is undefined, the default port for the protocol in use is used.
-
If setting a dict, the keys should be the protocol and the values should be the hostname and/or port for that protocol.
-
Valid protocols are http, https, ftp, and socks.
-
Omit, set to null or an empty string to remove the proxy settings.
-
-
- source - -
- string -
-
-
    Choices: -
  • ie
  • -
-
-
Instead of manually specifying the proxy and/or bypass, set this to import the proxy from a set source like Internet Explorer.
-
Using ie will import the Internet Explorer proxy settings for the current active network connection of the current user.
-
Only IE's proxy URL and bypass list will be imported into WinHTTP.
-
This is like running netsh winhttp import proxy source=ie.
-
The value is imported when the module runs and will not automatically be updated if the IE configuration changes in the future. The module will have to be run again to sync the latest changes.
-
-
- - -Notes ------ - -.. note:: - - This is not the same as the proxy settings set in Internet Explorer, also known as ``WinINet``; use the :ref:`community.windows.win_inet_proxy ` module to manage that instead. - - These settings are set system wide and not per user, it will require Administrative privileges to run. - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_inet_proxy_module` - The official documentation on the **community.windows.win_inet_proxy** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Set a proxy to use for all protocols - community.windows.win_http_proxy: - proxy: hostname - - - name: Set a proxy with a specific port with a bypass list - community.windows.win_http_proxy: - proxy: hostname:8080 - bypass: - - server1 - - server2 - - - - - name: Set the proxy based on the IE proxy settings - community.windows.win_http_proxy: - source: ie - - - name: Set a proxy for specific protocols - community.windows.win_http_proxy: - proxy: - http: hostname:8080 - https: hostname:8443 - - - name: Set a proxy for specific protocols using a string - community.windows.win_http_proxy: - proxy: http=hostname:8080;https=hostname:8443 - bypass: server1,server2, - - - name: Remove any proxy settings - community.windows.win_http_proxy: - proxy: '' - bypass: '' - - - - -Status ------- - - -Authors -~~~~~~~ - -- Jordan Borean (@jborean93) diff --git a/docs/community.windows.win_iis_virtualdirectory_module.rst b/docs/community.windows.win_iis_virtualdirectory_module.rst deleted file mode 100644 index 6ec320b0..00000000 --- a/docs/community.windows.win_iis_virtualdirectory_module.rst +++ /dev/null @@ -1,230 +0,0 @@ -.. _community.windows.win_iis_virtualdirectory_module: - - -****************************************** -community.windows.win_iis_virtualdirectory -****************************************** - -**Configures a virtual directory in IIS** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Creates, Removes and configures a virtual directory in IIS. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- application - -
- string -
-
- -
The application under which the virtual directory is created or exists.
-
-
- connect_as - -
- string -
-
added in 1.9.0
-
-
    Choices: -
  • pass_through
  • -
  • specific_user
  • -
-
-
The type of authentication to use for the virtual directory. Either pass_through or specific_user
-
If pass_through, IIS will use the identity of the user or application pool identity to access the physical path.
-
If specific_user, IIS will use the credentials provided in username and password to access the physical path.
-
-
- name - -
- string - / required -
-
- -
The name of the virtual directory to create or remove.
-
-
- password - -
- string -
-
added in 1.9.0
-
- -
The password associated with username.
-
Required when connect_as is set to specific_user.
-
-
- physical_path - -
- string -
-
- -
The physical path to the folder in which the new virtual directory is created.
-
The specified folder must already exist.
-
-
- site - -
- string - / required -
-
- -
The site name under which the virtual directory is created or exists.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Whether to add or remove the specified virtual directory.
-
Removing will remove the virtual directory and all under it (Recursively).
-
-
- username - -
- string -
-
added in 1.9.0
-
- -
Specifies the user name of an account that can access configuration files and content for the virtual directory.
-
Required when connect_as is set to specific_user.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_iis_webapplication_module` - The official documentation on the **community.windows.win_iis_webapplication** module. - :ref:`community.windows.win_iis_webapppool_module` - The official documentation on the **community.windows.win_iis_webapppool** module. - :ref:`community.windows.win_iis_webbinding_module` - The official documentation on the **community.windows.win_iis_webbinding** module. - :ref:`community.windows.win_iis_website_module` - The official documentation on the **community.windows.win_iis_website** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Create a virtual directory if it does not exist - community.windows.win_iis_virtualdirectory: - name: somedirectory - site: somesite - state: present - physical_path: C:\virtualdirectory\some - - - name: Remove a virtual directory if it exists - community.windows.win_iis_virtualdirectory: - name: somedirectory - site: somesite - state: absent - - - name: Create a virtual directory on an application if it does not exist - community.windows.win_iis_virtualdirectory: - name: somedirectory - site: somesite - application: someapp - state: present - physical_path: C:\virtualdirectory\some - - - - -Status ------- - - -Authors -~~~~~~~ - -- Henrik Wallström (@henrikwallstrom) diff --git a/docs/community.windows.win_iis_webapplication_module.rst b/docs/community.windows.win_iis_webapplication_module.rst deleted file mode 100644 index 290bab44..00000000 --- a/docs/community.windows.win_iis_webapplication_module.rst +++ /dev/null @@ -1,279 +0,0 @@ -.. _community.windows.win_iis_webapplication_module: - - -**************************************** -community.windows.win_iis_webapplication -**************************************** - -**Configures IIS web applications** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Creates, removes, and configures IIS web applications. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- application_pool - -
- string -
-
- -
The application pool in which the new site executes.
-
If not specified, the application pool of the current website will be used.
-
-
- connect_as - -
- string -
-
-
    Choices: -
  • pass_through
  • -
  • specific_user
  • -
-
-
The type of authentication to use for this application. Either pass_through or specific_user
-
If pass_through, IIS will use the identity of the user or application pool identity to access the file system or network.
-
If specific_user, IIS will use the credentials provided in username and password to access the file system or network.
-
-
- name - -
- string - / required -
-
- -
Name of the web application.
-
-
- password - -
- string -
-
- -
The password associated with username.
-
Required when connect_as is set to specific_user.
-
-
- physical_path - -
- string -
-
- -
The physical path on the remote host to use for the new application.
-
The specified folder must already exist.
-
-
- site - -
- string - / required -
-
- -
Name of the site on which the application is created.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
State of the web application.
-
-
- username - -
- string -
-
- -
Specifies the user name of an account that can access configuration files and content for this application.
-
Required when connect_as is set to specific_user.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_iis_virtualdirectory_module` - The official documentation on the **community.windows.win_iis_virtualdirectory** module. - :ref:`community.windows.win_iis_webapppool_module` - The official documentation on the **community.windows.win_iis_webapppool** module. - :ref:`community.windows.win_iis_webbinding_module` - The official documentation on the **community.windows.win_iis_webbinding** module. - :ref:`community.windows.win_iis_website_module` - The official documentation on the **community.windows.win_iis_website** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Add ACME webapplication on IIS. - community.windows.win_iis_webapplication: - name: api - site: acme - state: present - physical_path: C:\apps\acme\api - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- application_pool - -
- string -
-
success -
The used/implemented application_pool value.
-
-
Sample:
-
DefaultAppPool
-
-
- connect_as - -
- string -
-
when the application exists -
How IIS will try to authenticate to the physical_path.
-
-
Sample:
-
specific_user
-
-
- physical_path - -
- string -
-
success -
The used/implemented physical_path value.
-
-
Sample:
-
C:\apps\acme\api
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Henrik Wallström (@henrikwallstrom) diff --git a/docs/community.windows.win_iis_webapppool_module.rst b/docs/community.windows.win_iis_webapppool_module.rst deleted file mode 100644 index fce18a48..00000000 --- a/docs/community.windows.win_iis_webapppool_module.rst +++ /dev/null @@ -1,369 +0,0 @@ -.. _community.windows.win_iis_webapppool_module: - - -************************************ -community.windows.win_iis_webapppool -************************************ - -**Configure IIS Web Application Pools** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Creates, removes and configures an IIS Web Application Pool. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- attributes - -
- - -
-
- -
This field is a free form dictionary value for the application pool attributes.
-
These attributes are based on the naming standard at https://www.iis.net/configreference/system.applicationhost/applicationpools/add#005, see the examples section for more details on how to set this.
-
You can also set the attributes of child elements like cpu and processModel, see the examples to see how it is done.
-
While you can use the numeric values for enums it is recommended to use the enum name itself, e.g. use SpecificUser instead of 3 for processModel.identityType.
-
managedPipelineMode may be either "Integrated" or "Classic".
-
startMode may be either "OnDemand" or "AlwaysRunning".
-
Use state module parameter to modify the state of the app pool.
-
When trying to set 'processModel.password' and you receive a 'Value does fall within the expected range' error, you have a corrupted keystore. Please follow http://structuredsight.com/2014/10/26/im-out-of-range-youre-out-of-range/ to help fix your host.
-
-
- name - -
- string - / required -
-
- -
Name of the application pool.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
  • restarted
  • -
  • started
  • -
  • stopped
  • -
-
-
The state of the application pool.
-
If absent will ensure the app pool is removed.
-
If present will ensure the app pool is configured and exists.
-
If restarted will ensure the app pool exists and will restart, this is never idempotent.
-
If started will ensure the app pool exists and is started.
-
If stopped will ensure the app pool exists and is stopped.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_iis_virtualdirectory_module` - The official documentation on the **community.windows.win_iis_virtualdirectory** module. - :ref:`community.windows.win_iis_webapplication_module` - The official documentation on the **community.windows.win_iis_webapplication** module. - :ref:`community.windows.win_iis_webbinding_module` - The official documentation on the **community.windows.win_iis_webbinding** module. - :ref:`community.windows.win_iis_website_module` - The official documentation on the **community.windows.win_iis_website** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Return information about an existing application pool - community.windows.win_iis_webapppool: - name: DefaultAppPool - state: present - - - name: Create a new application pool in 'Started' state - community.windows.win_iis_webapppool: - name: AppPool - state: started - - - name: Stop an application pool - community.windows.win_iis_webapppool: - name: AppPool - state: stopped - - - name: Restart an application pool (non-idempotent) - community.windows.win_iis_webapppool: - name: AppPool - state: restarted - - - name: Change application pool attributes using new dict style - community.windows.win_iis_webapppool: - name: AppPool - attributes: - managedRuntimeVersion: v4.0 - autoStart: no - - - name: Creates an application pool, sets attributes and starts it - community.windows.win_iis_webapppool: - name: AnotherAppPool - state: started - attributes: - managedRuntimeVersion: v4.0 - autoStart: no - - # In the below example we are setting attributes in child element processModel - # https://www.iis.net/configreference/system.applicationhost/applicationpools/add/processmodel - - name: Manage child element and set identity of application pool - community.windows.win_iis_webapppool: - name: IdentitiyAppPool - state: started - attributes: - managedPipelineMode: Classic - processModel.identityType: SpecificUser - processModel.userName: '{{ansible_user}}' - processModel.password: '{{ansible_password}}' - processModel.loadUserProfile: true - - - name: Manage a timespan attribute - community.windows.win_iis_webapppool: - name: TimespanAppPool - state: started - attributes: - # Timespan with full string "day:hour:minute:second.millisecond" - recycling.periodicRestart.time: "00:00:05:00.000000" - recycling.periodicRestart.schedule: ["00:10:00", "05:30:00"] - # Shortened timespan "hour:minute:second" - processModel.pingResponseTime: "00:03:00" - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- attributes - -
- dictionary -
-
success -
Application Pool attributes that were set and processed by this module invocation.
-
-
Sample:
-
{'enable32BitAppOnWin64': 'true', 'managedRuntimeVersion': 'v4.0', 'managedPipelineMode': 'Classic'}
-
-
- info - -
- complex -
-
success -
Information on current state of the Application Pool. See https://www.iis.net/configreference/system.applicationhost/applicationpools/add#005 for the full list of return attributes based on your IIS version.
-
-
  -
- attributes - -
- dictionary -
-
success -
Key value pairs showing the current Application Pool attributes.
-
-
Sample:
-
{'autoStart': True, 'managedRuntimeLoader': 'webengine4.dll', 'managedPipelineMode': 'Classic', 'name': 'DefaultAppPool', 'CLRConfigFile': '', 'passAnonymousToken': True, 'applicationPoolSid': 'S-1-5-82-1352790163-598702362-1775843902-1923651883-1762956711', 'queueLength': 1000, 'managedRuntimeVersion': 'v4.0', 'state': 'Started', 'enableConfigurationOverride': True, 'startMode': 'OnDemand', 'enable32BitAppOnWin64': True}
-
  -
- cpu - -
- dictionary -
-
success -
Key value pairs showing the current Application Pool cpu attributes.
-
-
Sample:
-
{'action': 'NoAction', 'limit': 0, 'resetInterval': {'Days': 0, 'Hours': 0}}
-
  -
- failure - -
- dictionary -
-
success -
Key value pairs showing the current Application Pool failure attributes.
-
-
Sample:
-
{'autoShutdownExe': '', 'orphanActionExe': '', 'rapidFailProtextionInterval': {'Days': 0, 'Hours': 0}}
-
  -
- name - -
- string -
-
success -
Name of Application Pool that was processed by this module invocation.
-
-
Sample:
-
DefaultAppPool
-
  -
- processModel - -
- dictionary -
-
success -
Key value pairs showing the current Application Pool processModel attributes.
-
-
Sample:
-
{'identityType': 'ApplicationPoolIdentity', 'logonType': 'LogonBatch', 'pingInterval': {'Days': 0, 'Hours': 0}}
-
  -
- recycling - -
- dictionary -
-
success -
Key value pairs showing the current Application Pool recycling attributes.
-
-
Sample:
-
{'disallowOverlappingRotation': False, 'disallowRotationOnConfigChange': False, 'logEventOnRecycle': 'Time,Requests,Schedule,Memory,IsapiUnhealthy,OnDemand,ConfigChange,PrivateMemory'}
-
  -
- state - -
- string -
-
success -
Current runtime state of the pool as the module completed.
-
-
Sample:
-
Started
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Henrik Wallström (@henrikwallstrom) -- Jordan Borean (@jborean93) diff --git a/docs/community.windows.win_iis_webbinding_module.rst b/docs/community.windows.win_iis_webbinding_module.rst deleted file mode 100644 index dd7a1c9e..00000000 --- a/docs/community.windows.win_iis_webbinding_module.rst +++ /dev/null @@ -1,335 +0,0 @@ -.. _community.windows.win_iis_webbinding_module: - - -************************************ -community.windows.win_iis_webbinding -************************************ - -**Configures a IIS Web site binding** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Creates, removes and configures a binding to an existing IIS Web site. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- certificate_hash - -
- string -
-
- -
Certificate hash (thumbprint) for the SSL binding. The certificate hash is the unique identifier for the certificate.
-
-
- certificate_store_name - -
- string -
-
- Default:
"my"
-
-
Name of the certificate store where the certificate for the binding is located.
-
-
- host_header - -
- string -
-
- -
The host header to bind to / use for the new site.
-
If you are creating/removing a catch-all binding, omit this parameter rather than defining it as '*'.
-
-
- ip - -
- string -
-
- Default:
"*"
-
-
The IP address to bind to / use for the new site.
-
-
- name - -
- string - / required -
-
- -
Names of web site.
-

aliases: website
-
-
- port - -
- integer -
-
- Default:
80
-
-
The port to bind to / use for the new site.
-
-
- protocol - -
- string -
-
- Default:
"http"
-
-
The protocol to be used for the Web binding (usually HTTP, HTTPS, or FTP).
-
-
- ssl_flags - -
- string -
-
- -
This parameter is only valid on Server 2012 and newer.
-
Primarily used for enabling and disabling server name indication (SNI).
-
Set to 0 to disable SNI.
-
Set to 1 to enable SNI.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
State of the binding.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_iis_virtualdirectory_module` - The official documentation on the **community.windows.win_iis_virtualdirectory** module. - :ref:`community.windows.win_iis_webapplication_module` - The official documentation on the **community.windows.win_iis_webapplication** module. - :ref:`community.windows.win_iis_webapppool_module` - The official documentation on the **community.windows.win_iis_webapppool** module. - :ref:`community.windows.win_iis_website_module` - The official documentation on the **community.windows.win_iis_website** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Add a HTTP binding on port 9090 - community.windows.win_iis_webbinding: - name: Default Web Site - port: 9090 - state: present - - - name: Remove the HTTP binding on port 9090 - community.windows.win_iis_webbinding: - name: Default Web Site - port: 9090 - state: absent - - - name: Remove the default http binding - community.windows.win_iis_webbinding: - name: Default Web Site - port: 80 - ip: '*' - state: absent - - - name: Add a HTTPS binding - community.windows.win_iis_webbinding: - name: Default Web Site - protocol: https - port: 443 - ip: 127.0.0.1 - certificate_hash: B0D0FA8408FC67B230338FCA584D03792DA73F4C - state: present - - - name: Add a HTTPS binding with host header and SNI enabled - community.windows.win_iis_webbinding: - name: Default Web Site - protocol: https - port: 443 - host_header: test.com - ssl_flags: 1 - certificate_hash: D1A3AF8988FD32D1A3AF8988FD323792DA73F4C - state: present - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- binding_info - -
- dictionary -
-
on success -
Information on the binding being manipulated
-
-
Sample:
-
"binding_info": { - "bindingInformation": "127.0.0.1:443:", - "certificateHash": "FF3910CE089397F1B5A77EB7BAFDD8F44CDE77DD", - "certificateStoreName": "MY", - "hostheader": "", - "ip": "127.0.0.1", - "port": 443, - "protocol": "https", - "sslFlags": "not supported" - }
-
-
- operation_type - -
- string -
-
on success -
The type of operation performed
-
Can be removed, updated, matched, or added
-
-
Sample:
-
removed
-
-
- website_state - -
- string -
-
always -
The state of the website being targetted
-
Can be helpful in case you accidentally cause a binding collision which can result in the targetted site being stopped
-
-
Sample:
-
Started
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Noah Sparks (@nwsparks) -- Henrik Wallström (@henrikwallstrom) diff --git a/docs/community.windows.win_iis_website_module.rst b/docs/community.windows.win_iis_website_module.rst deleted file mode 100644 index 01e0e307..00000000 --- a/docs/community.windows.win_iis_website_module.rst +++ /dev/null @@ -1,279 +0,0 @@ -.. _community.windows.win_iis_website_module: - - -********************************* -community.windows.win_iis_website -********************************* - -**Configures a IIS Web site** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Creates, Removes and configures a IIS Web site. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- application_pool - -
- string -
-
- -
The application pool in which the new site executes.
-
-
- hostname - -
- string -
-
- -
The host header to bind to / use for the new site.
-
-
- ip - -
- string -
-
- -
The IP address to bind to / use for the new site.
-
-
- name - -
- string - / required -
-
- -
Names of web site.
-
-
- parameters - -
- string -
-
- -
Custom site Parameters from string where properties are separated by a pipe and property name/values by colon Ex. "foo:1|bar:2"
-
Some custom parameters that you can use are listed below, this isn't a definitive list but some common parameters.
-
logfile.directory - Physical path to store Logs, e.g. D:\IIS-LOGs\.
-
logfile.period - Log file rollover scheduled accepting these values, how frequently the log file should be rolled-over, e.g. Hourly, Daily, Weekly, Monthly.
-
logfile.LogFormat - Log file format, by default IIS uses W3C.
-
logfile.truncateSize - The size at which the log file contents will be trunsted, expressed in bytes.
-
-
- physical_path - -
- string -
-
- -
The physical path on the remote host to use for the new site.
-
The specified folder must already exist.
-
-
- port - -
- integer -
-
- -
The port to bind to / use for the new site.
-
-
- site_id - -
- string -
-
- -
Explicitly set the IIS numeric ID for a site.
-
Note that this value cannot be changed after the website has been created.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • started
  • -
  • stopped
  • -
  • restarted
  • -
-
-
State of the web site
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_iis_virtualdirectory_module` - The official documentation on the **community.windows.win_iis_virtualdirectory** module. - :ref:`community.windows.win_iis_webapplication_module` - The official documentation on the **community.windows.win_iis_webapplication** module. - :ref:`community.windows.win_iis_webapppool_module` - The official documentation on the **community.windows.win_iis_webapppool** module. - :ref:`community.windows.win_iis_webbinding_module` - The official documentation on the **community.windows.win_iis_webbinding** module. - - -Examples --------- - -.. code-block:: yaml - - # Start a website - - - name: Acme IIS site - community.windows.win_iis_website: - name: Acme - state: started - port: 80 - ip: 127.0.0.1 - hostname: acme.local - application_pool: acme - physical_path: C:\sites\acme - parameters: logfile.directory:C:\sites\logs - register: website - - # Remove Default Web Site and the standard port 80 binding - - name: Remove Default Web Site - community.windows.win_iis_website: - name: "Default Web Site" - state: absent - - # Create a WebSite with custom Logging configuration (Logs Location, Format and Rolling Over). - - - name: Creating WebSite with Custom Log location, Format 3WC and rolling over every hour. - community.windows.win_iis_website: - name: MyCustom_Web_Shop_Site - state: started - port: 80 - ip: '*' - hostname: '*' - physical_path: D:\wwwroot\websites\my-shop-site - parameters: logfile.directory:D:\IIS-LOGS\websites\my-shop-site|logfile.period:Hourly|logFile.logFormat:W3C - application_pool: my-shop-site - - # Some commandline examples: - - # This return information about an existing host - # $ ansible -i vagrant-inventory -m community.windows.win_iis_website -a "name='Default Web Site'" window - # host | success >> { - # "changed": false, - # "site": { - # "ApplicationPool": "DefaultAppPool", - # "Bindings": [ - # "*:80:" - # ], - # "ID": 1, - # "Name": "Default Web Site", - # "PhysicalPath": "%SystemDrive%\\inetpub\\wwwroot", - # "State": "Stopped" - # } - # } - - # This stops an existing site. - # $ ansible -i hosts -m community.windows.win_iis_website -a "name='Default Web Site' state=stopped" host - - # This creates a new site. - # $ ansible -i hosts -m community.windows.win_iis_website -a "name=acme physical_path=C:\\sites\\acme" host - - # Change logfile. - # $ ansible -i hosts -m community.windows.win_iis_website -a "name=acme physical_path=C:\\sites\\acme" host - - - - -Status ------- - - -Authors -~~~~~~~ - -- Henrik Wallström (@henrikwallstrom) diff --git a/docs/community.windows.win_inet_proxy_module.rst b/docs/community.windows.win_inet_proxy_module.rst deleted file mode 100644 index df256e71..00000000 --- a/docs/community.windows.win_inet_proxy_module.rst +++ /dev/null @@ -1,250 +0,0 @@ -.. _community.windows.win_inet_proxy_module: - - -******************************** -community.windows.win_inet_proxy -******************************** - -**Manages proxy settings for WinINet and Internet Explorer** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Used to set or remove proxy settings for Windows INet which includes Internet Explorer. -- WinINet is a framework used by interactive applications to submit web requests through. -- The proxy settings can also be used by other applications like Firefox, Chrome, and others but there is no definitive list. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- auto_config_url - -
- string -
-
- -
The URL of a proxy configuration script.
-
Proxy configuration scripts are typically JavaScript files with the .pac extension that implement the C(FindProxyForURurl function.
-
Omit, set to null or an empty string to remove the auto config URL.
-
This corresponds to the checkbox Use automatic configuration script in the connection settings window.
-
-
- auto_detect - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether to configure WinINet to automatically detect proxy settings through Web Proxy Auto-Detection WPAD.
-
This corresponds to the checkbox Automatically detect settings in the connection settings window.
-
-
- bypass - -
- list - / elements=string -
-
- -
A list of hosts that will bypass the set proxy when being accessed.
-
Use <local> to match hostnames that are not fully qualified domain names. This is useful when needing to connect to intranet sites using just the hostname. If defined, this should be the last entry in the bypass list.
-
Use <-loopback> to stop automatically bypassing the proxy when connecting through any loopback address like 127.0.0.1, localhost, or the local hostname.
-
Omit, set to null or an empty string/list to remove the bypass list.
-
If this is set then proxy must also be set.
-
-
- connection - -
- string -
-
- -
The name of the IE connection to set the proxy settings for.
-
These are the connections under the Dial-up and Virtual Private Network header in the IE settings.
-
When omitted, the default LAN connection is used.
-
-
- proxy - -
- raw -
-
- -
A string or dict that specifies the proxy to be set.
-
If setting a string, should be in the form hostname, hostname:port, or protocol=hostname:port.
-
If the port is undefined, the default port for the protocol in use is used.
-
If setting a dict, the keys should be the protocol and the values should be the hostname and/or port for that protocol.
-
Valid protocols are http, https, ftp, and socks.
-
Omit, set to null or an empty string to remove the proxy settings.
-
-
- - -Notes ------ - -.. note:: - - This is not the same as the proxy settings set in WinHTTP through the ``netsh`` command. Use the :ref:`community.windows.win_http_proxy ` module to manage that instead. - - These settings are by default set per user and not system wide. A registry property must be set independently from this module if you wish to apply the proxy for all users. See examples for more detail. - - If per user proxy settings are desired, use *become* to become any local user on the host. No password is needed to be set for this to work. - - If the proxy requires authentication, set the credentials using the :ref:`community.windows.win_credential ` module. This requires *become* to be used so the credential store can be accessed. - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_http_proxy_module` - The official documentation on the **community.windows.win_http_proxy** module. - :ref:`community.windows.win_credential_module` - The official documentation on the **community.windows.win_credential** module. - - -Examples --------- - -.. code-block:: yaml - - # This should be set before running the win_inet_proxy module - - name: Configure IE proxy settings to apply to all users - ansible.windows.win_regedit: - path: HKLM:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings - name: ProxySettingsPerUser - data: 0 - type: dword - state: present - - # This should be set before running the win_inet_proxy module - - name: Configure IE proxy settings to apply per user - ansible.windows.win_regedit: - path: HKLM:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings - name: ProxySettingsPerUser - data: 1 - type: dword - state: present - - - name: Configure IE proxy to use auto detected settings without an explicit proxy - win_inet_proxy: - auto_detect: yes - - - name: Configure IE proxy to use auto detected settings with a configuration script - win_inet_proxy: - auto_detect: yes - auto_config_url: http://proxy.ansible.com/proxy.pac - - - name: Configure IE to use explicit proxy host - win_inet_proxy: - auto_detect: yes - proxy: ansible.proxy - - - name: Configure IE to use explicit proxy host with port and without auto detection - win_inet_proxy: - auto_detect: no - proxy: ansible.proxy:8080 - - - name: Configure IE to use a specific proxy per protocol - win_inet_proxy: - proxy: - http: ansible.proxy:8080 - https: ansible.proxy:8443 - - - name: Configure IE to use a specific proxy per protocol using a string - win_inet_proxy: - proxy: http=ansible.proxy:8080;https=ansible.proxy:8443 - - - name: Set a proxy with a bypass list - win_inet_proxy: - proxy: ansible.proxy - bypass: - - server1 - - server2 - - <-loopback> - - - - - name: Remove any explicit proxies that are set - win_inet_proxy: - proxy: '' - bypass: '' - - # This should be done after setting the IE proxy with win_inet_proxy - - name: Import IE proxy configuration to WinHTTP - win_http_proxy: - source: ie - - # Explicit credentials can only be set per user and require become to work - - name: Set credential to use for proxy auth - win_credential: - name: ansible.proxy # The name should be the FQDN of the proxy host - type: generic_password - username: proxyuser - secret: proxypass - state: present - become: yes - become_user: '{{ ansible_user }}' - become_method: runas - - - - -Status ------- - - -Authors -~~~~~~~ - -- Jordan Borean (@jborean93) diff --git a/docs/community.windows.win_initialize_disk_module.rst b/docs/community.windows.win_initialize_disk_module.rst deleted file mode 100644 index 6504e539..00000000 --- a/docs/community.windows.win_initialize_disk_module.rst +++ /dev/null @@ -1,192 +0,0 @@ -.. _community.windows.win_initialize_disk_module: - - -************************************* -community.windows.win_initialize_disk -************************************* - -**Initializes disks on Windows Server** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- The :ref:`community.windows.win_initialize_disk ` module initializes disks - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- disk_number - -
- integer -
-
- -
Used to specify the disk number of the disk to be initialized.
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Specify if initializing should be forced for disks that are already initialized.
-
-
- online - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
If the disk is offline and/or readonly update the disk to be online and not readonly.
-
-
- path - -
- string -
-
- -
Used to specify the path to the disk to be initialized.
-
-
- style - -
- string -
-
-
    Choices: -
  • gpt ←
  • -
  • mbr
  • -
-
-
The partition style to use for the disk. Valid options are mbr or gpt.
-
-
- uniqueid - -
- string -
-
- -
Used to specify the uniqueid of the disk to be initialized.
-
-
- - -Notes ------ - -.. note:: - - One of three parameters (*disk_number*, *uniqueid*, and *path*) are mandatory to identify the target disk, but more than one cannot be specified at the same time. - - A minimum Operating System Version of Server 2012 or Windows 8 is required to use this module. - - This module is idempotent if *force* is not specified. - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_disk_facts_module` - The official documentation on the **community.windows.win_disk_facts** module. - :ref:`community.windows.win_partition_module` - The official documentation on the **community.windows.win_partition** module. - :ref:`community.windows.win_format_module` - The official documentation on the **community.windows.win_format** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Initialize a disk - community.windows.win_initialize_disk: - disk_number: 1 - - - name: Initialize a disk with an MBR partition style - community.windows.win_initialize_disk: - disk_number: 1 - style: mbr - - - name: Forcefully initiallize a disk - community.windows.win_initialize_disk: - disk_number: 2 - force: yes - - - - -Status ------- - - -Authors -~~~~~~~ - -- Brant Evans (@branic) diff --git a/docs/community.windows.win_lineinfile_module.rst b/docs/community.windows.win_lineinfile_module.rst deleted file mode 100644 index 63c17a46..00000000 --- a/docs/community.windows.win_lineinfile_module.rst +++ /dev/null @@ -1,390 +0,0 @@ -.. _community.windows.win_lineinfile_module: - - -******************************** -community.windows.win_lineinfile -******************************** - -**Ensure a particular line is in a file, or replace an existing line using a back-referenced regular expression** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module will search a file for a line, and ensure that it is present or absent. -- This is primarily useful when you want to change a single line in a file only. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- backrefs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Used with state=present. If set, line can contain backreferences (both positional and named) that will get populated if the regexp matches. This flag changes the operation of the module slightly; insertbefore and insertafter will be ignored, and if the regexp doesn't match anywhere in the file, the file will be left unchanged.
-
If the regexp does match, the last matching line will be replaced by the expanded line parameter.
-
-
- backup - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Determine whether a backup should be created.
-
When set to yes, create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly.
-
-
- create - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Used with state=present. If specified, the file will be created if it does not already exist. By default it will fail if the file is missing.
-
-
- encoding - -
- string -
-
- Default:
"auto"
-
-
Specifies the encoding of the source text file to operate on (and thus what the output encoding will be). The default of auto will cause the module to auto-detect the encoding of the source file and ensure that the modified file is written with the same encoding.
-
An explicit encoding can be passed as a string that is a valid value to pass to the .NET framework System.Text.Encoding.GetEncoding() method - see https://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx.
-
This is mostly useful with create=yes if you want to create a new file with a specific encoding. If create=yes is specified without a specific encoding, the default encoding (UTF-8, no BOM) will be used.
-
-
- insertafter - -
- string -
-
-
    Choices: -
  • EOF ←
  • -
  • *regex*
  • -
-
-
Used with state=present. If specified, the line will be inserted after the last match of specified regular expression. A special value is available; EOF for inserting the line at the end of the file.
-
If specified regular expression has no matches, EOF will be used instead. May not be used with backrefs.
-
-
- insertbefore - -
- string -
-
-
    Choices: -
  • BOF
  • -
  • *regex*
  • -
-
-
Used with state=present. If specified, the line will be inserted before the last match of specified regular expression. A value is available; BOF for inserting the line at the beginning of the file.
-
If specified regular expression has no matches, the line will be inserted at the end of the file. May not be used with backrefs.
-
-
- line - -
- string -
-
- -
Required for state=present. The line to insert/replace into the file. If backrefs is set, may contain backreferences that will get expanded with the regexp capture groups if the regexp matches.
-
Be aware that the line is processed first on the controller and thus is dependent on yaml quoting rules. Any double quoted line will have control characters, such as '\r\n', expanded. To print such characters literally, use single or no quotes.
-
-
- newline - -
- string -
-
-
    Choices: -
  • unix
  • -
  • windows ←
  • -
-
-
Specifies the line separator style to use for the modified file. This defaults to the windows line separator (\r\n). Note that the indicated line separator will be used for file output regardless of the original line separator that appears in the input file.
-
-
- path - -
- path - / required -
-
- -
The path of the file to modify.
-
Note that the Windows path delimiter \ must be escaped as \\ when the line is double quoted.
-

aliases: dest, destfile, name
-
-
- regex - -
- - -
-
- -
The regular expression to look for in every line of the file. For state=present, the pattern to replace if found; only the last line found will be replaced. For state=absent, the pattern of the line to remove. Uses .NET compatible regular expressions; see https://msdn.microsoft.com/en-us/library/hs600312%28v=vs.110%29.aspx.
-

aliases: regexp
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Whether the line should be there or not.
-
-
- validate - -
- string -
-
- -
Validation to run before copying into place. Use %s in the command to indicate the current file to validate.
-
The command is passed securely so shell features like expansion and pipes won't work.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`ansible.builtin.assemble_module` - The official documentation on the **ansible.builtin.assemble** module. - :ref:`ansible.builtin.lineinfile_module` - The official documentation on the **ansible.builtin.lineinfile** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Insert path without converting \r\n - community.windows.win_lineinfile: - path: c:\file.txt - line: c:\return\new - - - community.windows.win_lineinfile: - path: C:\Temp\example.conf - regex: '^name=' - line: 'name=JohnDoe' - - - community.windows.win_lineinfile: - path: C:\Temp\example.conf - regex: '^name=' - state: absent - - - community.windows.win_lineinfile: - path: C:\Temp\example.conf - regex: '^127\.0\.0\.1' - line: '127.0.0.1 localhost' - - - community.windows.win_lineinfile: - path: C:\Temp\httpd.conf - regex: '^Listen ' - insertafter: '^#Listen ' - line: Listen 8080 - - - community.windows.win_lineinfile: - path: C:\Temp\services - regex: '^# port for http' - insertbefore: '^www.*80/tcp' - line: '# port for http by default' - - - name: Create file if it doesn't exist with a specific encoding - community.windows.win_lineinfile: - path: C:\Temp\utf16.txt - create: yes - encoding: utf-16 - line: This is a utf-16 encoded file - - - name: Add a line to a file and ensure the resulting file uses unix line separators - community.windows.win_lineinfile: - path: C:\Temp\testfile.txt - line: Line added to file - newline: unix - - - name: Update a line using backrefs - community.windows.win_lineinfile: - path: C:\Temp\example.conf - backrefs: yes - regex: '(^name=)' - line: '$1JohnDoe' - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- backup - -
- string -
-
if backup=yes -
Name of the backup file that was created.
-
This is now deprecated, use backup_file instead.
-
-
Sample:
-
C:\Path\To\File.txt.11540.20150212-220915.bak
-
-
- backup_file - -
- string -
-
if backup=yes -
Name of the backup file that was created.
-
-
Sample:
-
C:\Path\To\File.txt.11540.20150212-220915.bak
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Brian Lloyd (@brianlloyd) diff --git a/docs/community.windows.win_listen_ports_facts_module.rst b/docs/community.windows.win_listen_ports_facts_module.rst deleted file mode 100644 index ff26c273..00000000 --- a/docs/community.windows.win_listen_ports_facts_module.rst +++ /dev/null @@ -1,172 +0,0 @@ -.. _community.windows.win_listen_ports_facts_module: - - -**************************************** -community.windows.win_listen_ports_facts -**************************************** - -**Recopilates the facts of the listening ports of the machine** - - -Version added: 1.10.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Recopilates the information of the TCP and UDP ports of the machine and the related processes. -- State of the TCP ports could be filtered, as well as the format of the date when the parent process was launched. -- The module's goal is to replicate the functionality of the linux module listen_ports_facts, mantaining the format of the said module. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- date_format - -
- string -
-
- Default:
"%c"
-
-
The format of the date when the process that owns the port started.
-
The date specification is UFormat
-
-
- tcp_filter - -
- list - / elements=string -
-
- Default:
["Listen"]
-
-
Filter for the state of the TCP ports that will be recopilated.
-
Supports multiple states (Bound, Closed, CloseWait, Closing, DeleteTCB, Established, FinWait1, FinWait2, LastAck, Listen, SynReceived, SynSent and TimeWait), that can be used alone or combined. Note that the Bound state is only available on PowerShell version 4.0 or later.
-
-
- - -Notes ------ - -.. note:: - - The generated data (tcp_listen and udp_listen) and the fields within follows the listen_ports_facts schema to achieve compatibility with the said module output, even though this module if capable of extracting ports with a state other than Listen - - -See Also --------- - -.. seealso:: - - :ref:`community.general.listen_ports_facts_module` - The official documentation on the **community.general.listen_ports_facts** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Recopilate ports facts - community.windows.win_listen_ports_facts: - - - name: Retrieve only ports with Closing and Established states - community.windows.win_listen_ports_facts: - tcp_filter: - - Closing - - Established - - - name: Get ports facts with only the year within the date field - community.windows.win_listen_ports_facts: - date_format: '%Y' - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- tcp_listen - -
- list - / elements=dictionary -
-
success -
List of dicts with the detected TCP ports
-
-
Sample:
-
[{'address': '127.0.0.1', 'name': 'python', 'pid': 5332, 'port': 82, 'protocol': 'tcp', 'stime': 'Thu Nov 18 15:27:42 2021', 'user': 'SERVER\\Administrator'}]
-
-
- udp_listen - -
- list - / elements=dictionary -
-
success -
List of dicts with the detected UDP ports
-
-
Sample:
-
[{'address': '127.0.0.1', 'name': 'python', 'pid': 5332, 'port': 82, 'protocol': 'udp', 'stime': 'Thu Nov 18 15:27:42 2021', 'user': 'SERVER\\Administrator'}]
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- David Nieto (@david-ns) diff --git a/docs/community.windows.win_mapped_drive_module.rst b/docs/community.windows.win_mapped_drive_module.rst deleted file mode 100644 index d366068f..00000000 --- a/docs/community.windows.win_mapped_drive_module.rst +++ /dev/null @@ -1,229 +0,0 @@ -.. _community.windows.win_mapped_drive_module: - - -********************************** -community.windows.win_mapped_drive -********************************** - -**Map network drives for users** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Allows you to modify mapped network drives for individual users. -- Also support WebDAV endpoints in the UNC form. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- letter - -
- string - / required -
-
- -
The letter of the network path to map to.
-
This letter must not already be in use with Windows.
-
-
- password - -
- string -
-
- -
The password for username that is used when testing the initial connection.
-
This is never saved with a mapped drive, use the community.windows.win_credential module to persist a username and password for a host.
-
-
- path - -
- path -
-
- -
The UNC path to map the drive to.
-
If pointing to a WebDAV location this must still be in a UNC path in the format \\hostname\path and not a URL, see examples for more details.
-
To specify a https WebDAV path, add @SSL after the hostname. To specify a custom WebDAV port add @<port num> after the @SSL or hostname portion of the UNC path, e.g. \\server@SSL@1234 or \\server@1234.
-
This is required if state=present.
-
If state=absent and path is not set, the module will delete the mapped drive regardless of the target.
-
If state=absent and the path is set, the module will throw an error if path does not match the target of the mapped drive.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
If present will ensure the mapped drive exists.
-
If absent will ensure the mapped drive does not exist.
-
-
- username - -
- string -
-
- -
The username that is used when testing the initial connection.
-
This is never saved with a mapped drive, the community.windows.win_credential module to persist a username and password for a host.
-
This is required if the mapped drive requires authentication with custom credentials and become, or CredSSP cannot be used.
-
If become or CredSSP is used, any credentials saved with community.windows.win_credential will automatically be used instead.
-
-
- - -Notes ------ - -.. note:: - - You cannot use this module to access a mapped drive in another Ansible task, drives mapped with this module are only accessible when logging in interactively with the user through the console or RDP. - - It is recommend to run this module with become or CredSSP when the remote path requires authentication. - - When using become or CredSSP, the task will have access to any local credentials stored in the user's vault. - - If become or CredSSP is not available, the *username* and *password* options can be used for the initial authentication but these are not persisted. - - WebDAV paths must have the WebDAV client feature installed for this module to map those paths. This is installed by default on desktop Windows editions but Windows Server hosts need to install the ``WebDAV-Redirector`` feature using :ref:`ansible.windows.win_feature `. - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_credential_module` - The official documentation on the **community.windows.win_credential** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Create a mapped drive under Z - community.windows.win_mapped_drive: - letter: Z - path: \\domain\appdata\accounting - - - name: Delete any mapped drives under Z - community.windows.win_mapped_drive: - letter: Z - state: absent - - - name: Only delete the mapped drive Z if the paths match (error is thrown otherwise) - community.windows.win_mapped_drive: - letter: Z - path: \\domain\appdata\accounting - state: absent - - - name: Create mapped drive with credentials and save the username and password - block: - - name: Save the network credentials required for the mapped drive - community.windows.win_credential: - name: server - type: domain_password - username: username@DOMAIN - secret: Password01 - state: present - - - name: Create a mapped drive that requires authentication - community.windows.win_mapped_drive: - letter: M - path: \\SERVER\C$ - state: present - vars: - # become is required to save and retrieve the credentials in the tasks - ansible_become: yes - ansible_become_method: runas - ansible_become_user: '{{ ansible_user }}' - ansible_become_pass: '{{ ansible_password }}' - - - name: Create mapped drive with credentials that do not persist on the next logon - community.windows.win_mapped_drive: - letter: M - path: \\SERVER\C$ - state: present - username: '{{ ansible_user }}' - password: '{{ ansible_password }}' - - # This should only be required for Windows Server OS' - - name: Ensure WebDAV client feature is installed - ansible.windows.win_feature: - name: WebDAV-Redirector - state: present - register: webdav_feature - - - name: Reboot after installing WebDAV client feature - ansible.windows.win_reboot: - when: webdav_feature.reboot_required - - - name: Map the HTTPS WebDAV location - community.windows.win_mapped_drive: - letter: W - path: \\live.sysinternals.com@SSL\tools # https://live.sysinternals.com/tools - state: present - - - - -Status ------- - - -Authors -~~~~~~~ - -- Jordan Borean (@jborean93) diff --git a/docs/community.windows.win_msg_module.rst b/docs/community.windows.win_msg_module.rst deleted file mode 100644 index 25c74bec..00000000 --- a/docs/community.windows.win_msg_module.rst +++ /dev/null @@ -1,261 +0,0 @@ -.. _community.windows.win_msg_module: - - -************************* -community.windows.win_msg -************************* - -**Sends a message to logged in users on Windows hosts** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Wraps the msg.exe command in order to send messages to Windows hosts. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- display_seconds - -
- integer -
-
- Default:
10
-
-
How long to wait for receiver to acknowledge message, in seconds.
-
-
- msg - -
- string -
-
- Default:
"Hello world!"
-
-
The text of the message to be displayed.
-
The message must be less than 256 characters.
-
-
- to - -
- string -
-
- Default:
"*"
-
-
Who to send the message to. Can be a username, sessionname or sessionid.
-
-
- wait - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to wait for users to respond. Module will only wait for the number of seconds specified in display_seconds or 10 seconds if not specified. However, if wait is yes, the message is sent to each logged on user in turn, waiting for the user to either press 'ok' or for the timeout to elapse before moving on to the next user.
-
-
- - -Notes ------ - -.. note:: - - This module must run on a windows host, so ensure your play targets windows hosts, or delegates to a windows host. - - Messages are only sent to the local host where the module is run. - - The module does not support sending to users listed in a file. - - Setting wait to ``yes`` can result in long run times on systems with many logged in users. - - -See Also --------- - -.. seealso:: - - :ref:`community.windows.win_say_module` - The official documentation on the **community.windows.win_say** module. - :ref:`community.windows.win_toast_module` - The official documentation on the **community.windows.win_toast** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Warn logged in users of impending upgrade - community.windows.win_msg: - display_seconds: 60 - msg: Automated upgrade about to start. Please save your work and log off before {{ deployment_start_time }} - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- display_seconds - -
- string -
-
success -
Value of display_seconds module parameter.
-
-
Sample:
-
10
-
-
- msg - -
- string -
-
changed -
Test of the message that was sent.
-
-
Sample:
-
Automated upgrade about to start. Please save your work and log off before 22 July 2016 18:00:00
-
-
- rc - -
- integer -
-
always -
The return code of the API call.
-
-
-
- runtime_seconds - -
- string -
-
success -
How long the module took to run on the remote windows host.
-
-
Sample:
-
22 July 2016 17:45:51
-
-
- sent_localtime - -
- string -
-
success -
local time from windows host when the message was sent.
-
-
Sample:
-
22 July 2016 17:45:51
-
-
- wait - -
- boolean -
-
success -
Value of wait module parameter.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Jon Hawkesworth (@jhawkesworth) diff --git a/docs/community.windows.win_net_adapter_feature_module.rst b/docs/community.windows.win_net_adapter_feature_module.rst deleted file mode 100644 index 789611df..00000000 --- a/docs/community.windows.win_net_adapter_feature_module.rst +++ /dev/null @@ -1,137 +0,0 @@ -.. _community.windows.win_net_adapter_feature_module: - - -***************************************** -community.windows.win_net_adapter_feature -***************************************** - -**Enable or disable certain network adapters.** - - -Version added: 1.2.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Enable or disable some network components of a certain network adapter or all the network adapters. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- component_id - -
- list - / elements=string - / required -
-
- -
Specify the below component_id of network adapters.
-
component_id (DisplayName)
-
ms_implat (Microsoft Network Adapter Multiplexor Protocol)
-
ms_lltdio (Link-Layer Topology Discovery Mapper I/O Driver)
-
ms_tcpip6 (Internet Protocol Version 6 (TCP/IPv6))
-
ms_tcpip (Internet Protocol Version 4 (TCP/IPv4))
-
ms_lldp (Microsoft LLDP Protocol Driver)
-
ms_rspndr (Link-Layer Topology Discovery Responder)
-
ms_msclient (Client for Microsoft Networks)
-
ms_pacer (QoS Packet Scheduler)
-
If you'd like to set custom adapters like 'Juniper Network Service', get the component_id by running the Get-NetAdapterBinding cmdlet.
-
-
- interface - -
- list - / elements=string - / required -
-
- -
Name of Network Adapter Interface. For example, Ethernet0 or *.
-
-
- state - -
- string -
-
-
    Choices: -
  • enabled ←
  • -
  • disabled
  • -
-
-
Specify the state of ms_tcpip6 of interfaces.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - - name: enable multiple interfaces of multiple interfaces - community.windows.win_net_adapter_feature: - interface: - - 'Ethernet0' - - 'Ethernet1' - state: enabled - component_id: - - ms_tcpip6 - - ms_server - - - name: Enable ms_tcpip6 of all the Interface - community.windows.win_net_adapter_feature: - interface: '*' - state: enabled - component_id: - - ms_tcpip6 - - - - -Status ------- - - -Authors -~~~~~~~ - -- ライトウェルの人 (@jirolin) diff --git a/docs/community.windows.win_netbios_module.rst b/docs/community.windows.win_netbios_module.rst deleted file mode 100644 index 24ea171b..00000000 --- a/docs/community.windows.win_netbios_module.rst +++ /dev/null @@ -1,156 +0,0 @@ -.. _community.windows.win_netbios_module: - - -***************************** -community.windows.win_netbios -***************************** - -**Manage NetBIOS over TCP/IP settings on Windows.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Enables or disables NetBIOS on Windows network adapters. -- Can be used to protect a system against NBT-NS poisoning and avoid NBNS broadcast storms. -- Settings can be applied system wide or per adapter. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- adapter_names - -
- list - / elements=string -
-
- -
List of adapter names for which to manage NetBIOS settings. If this option is omitted then configuration is applied to all adapters on the system.
-
The adapter name used is the connection caption in the Network Control Panel or via Get-NetAdapter, eg Ethernet 2.
-
-
- state - -
- string - / required -
-
-
    Choices: -
  • enabled
  • -
  • disabled
  • -
  • default
  • -
-
-
Whether NetBIOS should be enabled, disabled, or default (use setting from DHCP server or if static IP address is assigned enable NetBIOS).
-
-
- - -Notes ------ - -.. note:: - - Changing NetBIOS settings does not usually require a reboot and will take effect immediately. - - UDP port 137/138/139 will no longer be listening once NetBIOS is disabled. - - - -Examples --------- - -.. code-block:: yaml - - - name: Disable NetBIOS system wide - community.windows.win_netbios: - state: disabled - - - name: Disable NetBIOS on Ethernet2 - community.windows.win_netbios: - state: disabled - adapter_names: - - Ethernet2 - - - name: Enable NetBIOS on Public and Backup adapters - community.windows.win_netbios: - state: enabled - adapter_names: - - Public - - Backup - - - name: Set NetBIOS to system default on all adapters - community.windows.win_netbios: - state: default - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- reboot_required - -
- boolean -
-
always -
Boolean value stating whether a system reboot is required.
-
-
Sample:
-
True
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Thomas Moore (@tmmruk) diff --git a/docs/community.windows.win_nssm_module.rst b/docs/community.windows.win_nssm_module.rst deleted file mode 100644 index 6e552b87..00000000 --- a/docs/community.windows.win_nssm_module.rst +++ /dev/null @@ -1,496 +0,0 @@ -.. _community.windows.win_nssm_module: - - -************************** -community.windows.win_nssm -************************** - -**Install a service using NSSM** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Install a Windows service using the NSSM wrapper. -- NSSM is a service helper which doesn't suck. See https://nssm.cc/ for more information. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- nssm >= 2.24.0 # (install via :ref:`chocolatey.chocolatey.win_chocolatey `) ``win_chocolatey: name=nssm`` - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- app_environment - -
- dictionary -
-
added in 1.2.0
-
- -
Key/Value pairs which will be added to the environment of the service application.
-
-
- app_parameters - -
- string -
-
- -
A string representing a dictionary of parameters to be passed to the application when it starts.
-
DEPRECATED since v2.8, please use arguments instead.
-
This is mutually exclusive with arguments.
-
-
- app_rotate_bytes - -
- integer -
-
- Default:
104858
-
-
NSSM will not rotate any file which is smaller than the configured number of bytes.
-
-
- app_rotate_online - -
- integer -
-
-
    Choices: -
  • 0 ←
  • -
  • 1
  • -
-
-
If set to 1, nssm can rotate files which grow to the configured file size limit while the service is running.
-
-
- app_stop_method_console - -
- integer -
-
- -
Time to wait after sending Control-C.
-
-
- app_stop_method_skip - -
- integer -
-
-
    Choices: -
  • 1
  • -
  • 2
  • -
  • 3
  • -
  • 4
  • -
  • 5
  • -
  • 6
  • -
  • 7
  • -
  • 8
  • -
  • 9
  • -
  • 10
  • -
  • 11
  • -
  • 12
  • -
  • 13
  • -
  • 14
  • -
  • 15
  • -
-
-
To disable service shutdown methods, set to the sum of one or more of the numbers
-
1 - Don't send Control-C to the console.
-
2 - Don't send WM_CLOSE to windows.
-
4 - Don't send WM_QUIT to threads.
-
8 - Don't call TerminateProcess().
-
-
- application - -
- path -
-
- -
The application binary to run as a service
-
Required when state is present, started, stopped, or restarted.
-
-
- arguments - -
- string -
-
- -
Parameters to be passed to the application when it starts.
-
This can be either a simple string or a list.
-
This is mutually exclusive with app_parameters.
-

aliases: app_parameters_free_form
-
-
- dependencies - -
- list - / elements=string -
-
- -
Service dependencies that has to be started to trigger startup, separated by comma.
-
-
- description - -
- string -
-
- -
The description to set for the service.
-
-
- display_name - -
- string -
-
- -
The display name to set for the service.
-
-
- executable - -
- path -
-
- Default:
"nssm.exe"
-
-
The location of the NSSM utility (in case it is not located in your PATH).
-
-
- name - -
- string - / required -
-
- -
Name of the service to operate on.
-
-
- password - -
- string -
-
- -
Password to be used for service startup.
-
This is not required for the well known service accounts and group managed service accounts.
-
-
- start_mode - -
- string -
-
-
    Choices: -
  • auto ←
  • -
  • delayed
  • -
  • disabled
  • -
  • manual
  • -
-
-
If auto is selected, the service will start at bootup.
-
delayed causes a delayed but automatic start after boot.
-
manual means that the service will start only when another service needs it.
-
disabled means that the service will stay off, regardless if it is needed or not.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
  • started
  • -
  • stopped
  • -
  • restarted
  • -
-
-
State of the service on the system.
-
-
- stderr_file - -
- path -
-
- -
Path to receive error output.
-
-
- stdout_file - -
- path -
-
- -
Path to receive output.
-
-
- username - -
- string -
-
- -
User to be used for service startup.
-
Group managed service accounts must end with $.
-
Before 1.8.0, this parameter was just user.
-

aliases: user
-
-
- working_directory - -
- path -
-
- -
The working directory to run the service executable from (defaults to the directory containing the application binary)
-

aliases: app_directory, chdir
-
-
- - -Notes ------ - -.. note:: - - The service will NOT be started after its creation when ``state=present``. - - Once the service is created, you can use the :ref:`ansible.windows.win_service ` module to start it or configure some additionals properties, such as its startup type, dependencies, service account, and so on. - - -See Also --------- - -.. seealso:: - - :ref:`ansible.windows.win_service_module` - The official documentation on the **ansible.windows.win_service** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Install the foo service - community.windows.win_nssm: - name: foo - application: C:\windows\foo.exe - - # This will yield the following command: C:\windows\foo.exe bar "true" - - name: Install the Consul service with a list of parameters - community.windows.win_nssm: - name: Consul - application: C:\consul\consul.exe - arguments: - - agent - - -config-dir=C:\consul\config - - # This is strictly equivalent to the previous example - - name: Install the Consul service with an arbitrary string of parameters - community.windows.win_nssm: - name: Consul - application: C:\consul\consul.exe - arguments: agent -config-dir=C:\consul\config - - - # Install the foo service, and then configure and start it with win_service - - name: Install the foo service, redirecting stdout and stderr to the same file - community.windows.win_nssm: - name: foo - application: C:\windows\foo.exe - stdout_file: C:\windows\foo.log - stderr_file: C:\windows\foo.log - - - name: Configure and start the foo service using win_service - ansible.windows.win_service: - name: foo - dependencies: [ adf, tcpip ] - username: foouser - password: secret - start_mode: manual - state: started - - - name: Install a script based service and define custom environment variables - community.windows.win_nssm: - name: - application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe - arguments: - - - -