From 9c5b55232c4b152edd7a2dd9ca9e13a89302cebe Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Mon, 8 May 2017 01:29:35 +0530 Subject: [PATCH] Pep8 fixes for Windows module (#24349) Signed-off-by: Abhijeet Kasurde --- lib/ansible/modules/windows/win_disk_image.py | 7 +++---- lib/ansible/modules/windows/win_dns_client.py | 4 ++-- lib/ansible/modules/windows/win_domain.py | 6 +++--- lib/ansible/modules/windows/win_domain_controller.py | 7 +++---- lib/ansible/modules/windows/win_domain_membership.py | 6 +++--- lib/ansible/modules/windows/win_environment.py | 1 - lib/ansible/modules/windows/win_iis_webapppool.py | 2 -- lib/ansible/modules/windows/win_msg.py | 1 - lib/ansible/modules/windows/win_msi.py | 1 - lib/ansible/modules/windows/win_ping.py | 1 - lib/ansible/modules/windows/win_tempfile.py | 3 +-- test/sanity/pep8/legacy-files.txt | 11 ----------- 12 files changed, 15 insertions(+), 35 deletions(-) diff --git a/lib/ansible/modules/windows/win_disk_image.py b/lib/ansible/modules/windows/win_disk_image.py index b097b79d7a9..788696e4c42 100644 --- a/lib/ansible/modules/windows/win_disk_image.py +++ b/lib/ansible/modules/windows/win_disk_image.py @@ -23,7 +23,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.0', 'supported_by': 'core'} -DOCUMENTATION=''' +DOCUMENTATION = ''' module: win_disk_image short_description: Manage ISO/VHD/VHDX mounts on Windows hosts version_added: 2.3 @@ -47,7 +47,7 @@ author: - Matt Davis (@nitzmahone) ''' -RETURN=r''' +RETURN = r''' mount_path: description: filesystem path where the target image is mounted returned: when C(state) is C(present) @@ -55,7 +55,7 @@ mount_path: sample: F:\ ''' -EXAMPLES=r''' +EXAMPLES = r''' # ensure an iso is mounted - win_disk_image: image_path: C:\install.iso @@ -74,4 +74,3 @@ EXAMPLES=r''' state: absent ''' - diff --git a/lib/ansible/modules/windows/win_dns_client.py b/lib/ansible/modules/windows/win_dns_client.py index fe1a4904c8c..a501a1d7a91 100644 --- a/lib/ansible/modules/windows/win_dns_client.py +++ b/lib/ansible/modules/windows/win_dns_client.py @@ -48,7 +48,7 @@ notes: author: "Matt Davis (@nitzmahone)" ''' -EXAMPLES=r''' +EXAMPLES = r''' # set a single address on the adapter named Ethernet - win_dns_client: adapter_names: Ethernet @@ -68,6 +68,6 @@ EXAMPLES=r''' ipv4_addresses: [] ''' -RETURN=''' +RETURN = ''' ''' diff --git a/lib/ansible/modules/windows/win_domain.py b/lib/ansible/modules/windows/win_domain.py index bccbf7d4bf4..b053d3e65ef 100644 --- a/lib/ansible/modules/windows/win_domain.py +++ b/lib/ansible/modules/windows/win_domain.py @@ -23,7 +23,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.0', 'supported_by': 'core'} -DOCUMENTATION=''' +DOCUMENTATION = ''' module: win_domain short_description: Ensures the existence of a Windows domain. version_added: 2.3 @@ -43,7 +43,7 @@ author: - Matt Davis (@nitzmahone) ''' -RETURN=''' +RETURN = ''' reboot_required: description: True if changes were made that require a reboot. returned: always @@ -52,7 +52,7 @@ reboot_required: ''' -EXAMPLES=r''' +EXAMPLES = r''' # ensure the named domain is reachable from the target host; if not, create the domain in a new forest residing on the target host - win_domain: dns_domain_name: ansible.vagrant diff --git a/lib/ansible/modules/windows/win_domain_controller.py b/lib/ansible/modules/windows/win_domain_controller.py index a9e471560fe..7fca089c001 100644 --- a/lib/ansible/modules/windows/win_domain_controller.py +++ b/lib/ansible/modules/windows/win_domain_controller.py @@ -23,7 +23,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.0', 'supported_by': 'core'} -DOCUMENTATION=''' +DOCUMENTATION = ''' module: win_domain_controller short_description: Manage domain controller/member server state for a Windows host version_added: 2.3 @@ -58,7 +58,7 @@ author: - Matt Davis (@nitzmahone) ''' -RETURN=''' +RETURN = ''' reboot_required: description: True if changes were made that require a reboot. returned: always @@ -67,7 +67,7 @@ reboot_required: ''' -EXAMPLES=r''' +EXAMPLES = r''' # ensure a server is a domain controller - hosts: winclient gather_facts: no @@ -97,4 +97,3 @@ EXAMPLES=r''' log_path: c:\ansible_win_domain_controller.txt ''' - diff --git a/lib/ansible/modules/windows/win_domain_membership.py b/lib/ansible/modules/windows/win_domain_membership.py index fc87f01de5f..6b160691bbd 100644 --- a/lib/ansible/modules/windows/win_domain_membership.py +++ b/lib/ansible/modules/windows/win_domain_membership.py @@ -24,7 +24,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.0', 'supported_by': 'core'} -DOCUMENTATION=''' +DOCUMENTATION = ''' module: win_domain_membership short_description: Manage domain/workgroup membership for a Windows host version_added: 2.3 @@ -58,7 +58,7 @@ author: - Matt Davis (@nitzmahone) ''' -RETURN=''' +RETURN = ''' reboot_required: description: True if changes were made that require a reboot. returned: always @@ -66,7 +66,7 @@ reboot_required: sample: true ''' -EXAMPLES=''' +EXAMPLES = ''' # host should be a member of domain ansible.vagrant; module will ensure the hostname is mydomainclient # and will use the passed credentials to join domain if necessary. diff --git a/lib/ansible/modules/windows/win_environment.py b/lib/ansible/modules/windows/win_environment.py index b5113106143..e8e9de53cb2 100644 --- a/lib/ansible/modules/windows/win_environment.py +++ b/lib/ansible/modules/windows/win_environment.py @@ -91,4 +91,3 @@ EXAMPLES = r''' name: TestVariable level: user ''' - diff --git a/lib/ansible/modules/windows/win_iis_webapppool.py b/lib/ansible/modules/windows/win_iis_webapppool.py index 6b6e3faffc2..f407b468ae8 100644 --- a/lib/ansible/modules/windows/win_iis_webapppool.py +++ b/lib/ansible/modules/windows/win_iis_webapppool.py @@ -23,7 +23,6 @@ ANSIBLE_METADATA = {'metadata_version': '1.0', 'supported_by': 'community'} - DOCUMENTATION = r''' --- module: win_iis_webapppool @@ -151,4 +150,3 @@ info: type: string sample: "Started" ''' - diff --git a/lib/ansible/modules/windows/win_msg.py b/lib/ansible/modules/windows/win_msg.py index 3a5c5e63b2e..52cd3224ae2 100644 --- a/lib/ansible/modules/windows/win_msg.py +++ b/lib/ansible/modules/windows/win_msg.py @@ -96,4 +96,3 @@ wait: type: boolean sample: false ''' - diff --git a/lib/ansible/modules/windows/win_msi.py b/lib/ansible/modules/windows/win_msi.py index 744c9f2066d..37725ab6655 100644 --- a/lib/ansible/modules/windows/win_msi.py +++ b/lib/ansible/modules/windows/win_msi.py @@ -82,4 +82,3 @@ EXAMPLES = r''' path: C:\7z920-x64.msi state: absent ''' - diff --git a/lib/ansible/modules/windows/win_ping.py b/lib/ansible/modules/windows/win_ping.py index 67dd061d0bf..188c2fcbd34 100644 --- a/lib/ansible/modules/windows/win_ping.py +++ b/lib/ansible/modules/windows/win_ping.py @@ -52,4 +52,3 @@ EXAMPLES = r''' - win_ping: data: crash ''' - diff --git a/lib/ansible/modules/windows/win_tempfile.py b/lib/ansible/modules/windows/win_tempfile.py index 70d81c9df40..a85279c66f8 100644 --- a/lib/ansible/modules/windows/win_tempfile.py +++ b/lib/ansible/modules/windows/win_tempfile.py @@ -1,5 +1,5 @@ #!/usr/bin/python -#coding: utf-8 -*- +# coding: utf-8 -*- # (c) 2017 Dag Wieers # @@ -71,4 +71,3 @@ path: type: string sample: C:\Users\Administrator\AppData\Local\Temp\ansible.bMlvdk ''' - diff --git a/test/sanity/pep8/legacy-files.txt b/test/sanity/pep8/legacy-files.txt index 78bf417147b..ecb3d55b1f1 100644 --- a/test/sanity/pep8/legacy-files.txt +++ b/test/sanity/pep8/legacy-files.txt @@ -766,17 +766,6 @@ lib/ansible/modules/web_infrastructure/ansible_tower/tower_team.py lib/ansible/modules/web_infrastructure/ansible_tower/tower_user.py lib/ansible/modules/web_infrastructure/ejabberd_user.py lib/ansible/modules/web_infrastructure/jboss.py -lib/ansible/modules/windows/win_disk_image.py -lib/ansible/modules/windows/win_dns_client.py -lib/ansible/modules/windows/win_domain.py -lib/ansible/modules/windows/win_domain_controller.py -lib/ansible/modules/windows/win_domain_membership.py -lib/ansible/modules/windows/win_environment.py -lib/ansible/modules/windows/win_iis_webapppool.py -lib/ansible/modules/windows/win_msg.py -lib/ansible/modules/windows/win_msi.py -lib/ansible/modules/windows/win_ping.py -lib/ansible/modules/windows/win_tempfile.py lib/ansible/parsing/dataloader.py lib/ansible/parsing/mod_args.py lib/ansible/parsing/quoting.py