diff --git a/hacking/unify_repos.sh b/hacking/unify_repos.sh index e91a1d14fe3..d4c7ecbaaeb 100755 --- a/hacking/unify_repos.sh +++ b/hacking/unify_repos.sh @@ -5,14 +5,15 @@ set -e set -u # get current stuff -git clone git@github.com:ansible/ansible.git ansible_unified +git clone https://github.com/ansible/ansible.git ansible_unified cd ansible_unified/ git submodule init git submodule update +git remote add upstream git@github.com:ansible/ansible.git # add submodules as remotes -git remote add core_modules git@github.com:ansible/ansible-modules-core.git -git remote add extras_modules git@github.com:ansible/ansible-modules-extras.git +git remote add core_modules https://github.com/ansible/ansible-modules-core.git +git remote add extras_modules https://github.com/ansible/ansible-modules-extras.git git fetch --all # remove submodules @@ -52,5 +53,5 @@ do fi done - git rm -rf lib/ansible/modules/${subdir} + rm -rf lib/ansible/modules/${subdir} done diff --git a/lib/ansible/modules/cloud/amazon/ec2.py b/lib/ansible/modules/cloud/amazon/ec2.py old mode 100755 new mode 100644 diff --git a/lib/ansible/modules/cloud/amazon/ec2_asg.py b/lib/ansible/modules/cloud/amazon/ec2_asg.py index e295d0008bd..be7c634d742 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_asg.py +++ b/lib/ansible/modules/cloud/amazon/ec2_asg.py @@ -78,7 +78,7 @@ options: - Number of instances you'd like to replace at a time. Used with replace_all_instances. required: false version_added: "1.8" - default: 1 + default: 1 replace_instances: description: - List of instance_ids belonging to the named ASG that you would like to terminate and be replaced with instances matching the current launch configuration. diff --git a/lib/ansible/modules/cloud/amazon/ec2_eni_facts.py b/lib/ansible/modules/cloud/amazon/ec2_eni_facts.py index 972dcaf4aeb..4c6882e127c 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_eni_facts.py +++ b/lib/ansible/modules/cloud/amazon/ec2_eni_facts.py @@ -92,7 +92,7 @@ def list_ec2_snapshots_boto3(connection, module): def get_eni_info(interface): - + # Private addresses private_addresses = [] for ip in interface.private_ip_addresses: @@ -125,23 +125,23 @@ def get_eni_info(interface): 'attach_time': interface.attachment.attach_time, 'delete_on_termination': interface.attachment.delete_on_termination, } - + return interface_info - + def list_eni(connection, module): - + filters = module.params.get("filters") interface_dict_array = [] - + try: all_eni = connection.get_all_network_interfaces(filters=filters) except BotoServerError as e: module.fail_json(msg=e.message) - + for interface in all_eni: interface_dict_array.append(get_eni_info(interface)) - + module.exit_json(interfaces=interface_dict_array) @@ -152,12 +152,12 @@ def main(): filters = dict(default=None, type='dict') ) ) - + module = AnsibleModule(argument_spec=argument_spec) if not HAS_BOTO: module.fail_json(msg='boto required for this module') - + if HAS_BOTO3: region, ec2_url, aws_connect_params = get_aws_connection_info(module, boto3=True) diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_subnet_facts.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_subnet_facts.py index f8818334684..83b4c1cfc51 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc_subnet_facts.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_subnet_facts.py @@ -144,4 +144,4 @@ def main(): if __name__ == '__main__': - main() \ No newline at end of file + main() diff --git a/lib/ansible/modules/cloud/amazon/iam.py b/lib/ansible/modules/cloud/amazon/iam.py index 70b9da0f5e6..79a3e346221 100644 --- a/lib/ansible/modules/cloud/amazon/iam.py +++ b/lib/ansible/modules/cloud/amazon/iam.py @@ -101,7 +101,7 @@ options: - C(always) will update passwords if they differ. C(on_create) will only set the password for newly created users. notes: - 'Currently boto does not support the removal of Managed Policies, the module will error out if your user/group/role has managed policies when you try to do state=absent. They will need to be removed manually.' -author: +author: - "Jonathan I. Davila (@defionscode)" - "Paul Seiffert (@seiffert)" extends_documentation_fragment: aws diff --git a/lib/ansible/modules/cloud/amazon/rds.py b/lib/ansible/modules/cloud/amazon/rds.py old mode 100755 new mode 100644 index 467c4d963b2..41438da1843 --- a/lib/ansible/modules/cloud/amazon/rds.py +++ b/lib/ansible/modules/cloud/amazon/rds.py @@ -224,7 +224,7 @@ options: requirements: - "python >= 2.6" - "boto" -author: +author: - "Bruce Pennypacker (@bpennypacker)" - "Will Thames (@willthames)" extends_documentation_fragment: diff --git a/lib/ansible/modules/cloud/amazon/route53.py b/lib/ansible/modules/cloud/amazon/route53.py index dfcd325fd80..6452fefb359 100644 --- a/lib/ansible/modules/cloud/amazon/route53.py +++ b/lib/ansible/modules/cloud/amazon/route53.py @@ -28,7 +28,7 @@ description: options: command: description: - - Specifies the action to take. + - Specifies the action to take. required: true choices: [ 'get', 'create', 'delete' ] zone: diff --git a/lib/ansible/modules/cloud/amazon/s3_logging.py b/lib/ansible/modules/cloud/amazon/s3_logging.py index 038cacbef57..653e315848f 100644 --- a/lib/ansible/modules/cloud/amazon/s3_logging.py +++ b/lib/ansible/modules/cloud/amazon/s3_logging.py @@ -181,4 +181,4 @@ def main(): if __name__ == '__main__': - main() \ No newline at end of file + main() diff --git a/lib/ansible/modules/cloud/digital_ocean/digital_ocean.py b/lib/ansible/modules/cloud/digital_ocean/digital_ocean.py index b716562e028..2cdcbd6420c 100644 --- a/lib/ansible/modules/cloud/digital_ocean/digital_ocean.py +++ b/lib/ansible/modules/cloud/digital_ocean/digital_ocean.py @@ -24,7 +24,7 @@ DOCUMENTATION = ''' module: digital_ocean short_description: Create/delete a droplet/SSH_key in DigitalOcean description: - - Create/delete a droplet in DigitalOcean and optionally wait for it to be 'running', or deploy an SSH key. + - Create/delete a droplet in DigitalOcean and optionally wait for it to be 'running', or deploy an SSH key. version_added: "1.3" author: "Vincent Viallet (@zbal)" options: diff --git a/lib/ansible/modules/cloud/google/gc_storage.py b/lib/ansible/modules/cloud/google/gc_storage.py index 001de7c7005..6a5e9023d02 100644 --- a/lib/ansible/modules/cloud/google/gc_storage.py +++ b/lib/ansible/modules/cloud/google/gc_storage.py @@ -22,14 +22,14 @@ DOCUMENTATION = ''' --- module: gc_storage version_added: "1.4" -short_description: This module manages objects/buckets in Google Cloud Storage. +short_description: This module manages objects/buckets in Google Cloud Storage. description: - This module allows users to manage their objects/buckets in Google Cloud Storage. It allows upload and download operations and can set some canned permissions. It also allows retrieval of URLs for objects for use in playbooks, and retrieval of string contents of objects. This module requires setting the default project in GCS prior to playbook usage. See U(https://developers.google.com/storage/docs/reference/v1/apiversion1) for information about setting the default project. options: bucket: description: - - Bucket name. + - Bucket name. required: true object: description: @@ -55,7 +55,7 @@ options: description: - This option let's the user set the canned permissions on the object/bucket that are created. The permissions that can be set are 'private', 'public-read', 'authenticated-read'. required: false - default: private + default: private headers: version_added: "2.0" description: @@ -69,7 +69,7 @@ options: default: null mode: description: - - Switches the module behaviour between upload, download, get_url (return download url) , get_str (download object as string), create (bucket) and delete (bucket). + - Switches the module behaviour between upload, download, get_url (return download url) , get_str (download object as string), create (bucket) and delete (bucket). required: true default: null choices: [ 'get', 'put', 'get_url', 'get_str', 'delete', 'create' ] diff --git a/lib/ansible/modules/cloud/openstack/_quantum_subnet.py b/lib/ansible/modules/cloud/openstack/_quantum_subnet.py index 28001f97def..e03f5962295 100644 --- a/lib/ansible/modules/cloud/openstack/_quantum_subnet.py +++ b/lib/ansible/modules/cloud/openstack/_quantum_subnet.py @@ -22,8 +22,9 @@ try: except ImportError: from quantumclient.quantum import client from keystoneclient.v2_0 import client as ksclient + HAVE_DEPS = True except ImportError: - print("failed=True msg='quantumclient (or neutronclient) and keystoneclient are required'") + HAVE_DEPS = False ANSIBLE_METADATA = {'status': ['deprecated'], 'supported_by': 'community', @@ -119,7 +120,10 @@ options: - From the subnet pool the last IP that should be assigned to the virtual machines required: false default: None -requirements: ["quantumclient", "neutronclient", "keystoneclient"] +requirements: + - "python >= 2.6" + - "python-neutronclient or python-quantumclient" + - "python-keystoneclient" ''' EXAMPLES = ''' @@ -278,6 +282,9 @@ def main(): allocation_pool_end = dict(default=None), )) module = AnsibleModule(argument_spec=argument_spec) + if not HAVE_DEPS: + module.fail_json(msg='python-keystoneclient and either python-neutronclient or python-quantumclient are required') + neutron = _get_neutron_client(module, module.params) _set_tenant_id(module) if module.params['state'] == 'present': @@ -298,5 +305,6 @@ def main(): # this is magic, see lib/ansible/module.params['common.py from ansible.module_utils.basic import * from ansible.module_utils.openstack import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/cloud/openstack/os_auth.py b/lib/ansible/modules/cloud/openstack/os_auth.py index c46945a3d6d..bcc95aaaa1f 100644 --- a/lib/ansible/modules/cloud/openstack/os_auth.py +++ b/lib/ansible/modules/cloud/openstack/os_auth.py @@ -33,7 +33,7 @@ short_description: Retrieve an auth token version_added: "2.0" author: "Monty Taylor (@emonty)" description: - - Retrieve an auth token from an OpenStack Cloud + - Retrieve an auth token from an OpenStack Cloud requirements: - "python >= 2.6" - "shade" diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest.py b/lib/ansible/modules/cloud/vmware/vmware_guest.py index b4843a14bde..cf3e83b3833 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_guest.py +++ b/lib/ansible/modules/cloud/vmware/vmware_guest.py @@ -519,24 +519,24 @@ class PyVmomiHelper(object): def set_powerstate(self, vm, state, force): - """ - Set the power status for a VM determined by the current and - requested states. force is forceful - """ + """ + Set the power status for a VM determined by the current and + requested states. force is forceful + """ facts = self.gather_facts(vm) expected_state = state.replace('_', '').lower() current_state = facts['hw_power_status'].lower() result = {} - # Need Force - if not force and current_state not in ['poweredon', 'poweredoff']: - return "VM is in %s power state. Force is required!" % current_state + # Need Force + if not force and current_state not in ['poweredon', 'poweredoff']: + return "VM is in %s power state. Force is required!" % current_state - # State is already true - if current_state == expected_state: + # State is already true + if current_state == expected_state: result['changed'] = False result['failed'] = False - else: + else: task = None try: if expected_state == 'poweredoff': @@ -602,20 +602,20 @@ class PyVmomiHelper(object): else: facts['ipv4'] = ipaddress - for idx,entry in enumerate(vm.config.hardware.device): - if not hasattr(entry, 'macAddress'): - continue - - factname = 'hw_eth' + str(idx) - facts[factname] = { - 'addresstype': entry.addressType, - 'label': entry.deviceInfo.label, - 'macaddress': entry.macAddress, - 'ipaddresses': netDict.get(entry.macAddress, None), - 'macaddress_dash': entry.macAddress.replace(':', '-'), - 'summary': entry.deviceInfo.summary, - } - facts['hw_interfaces'].append('eth'+str(idx)) + for idx,entry in enumerate(vm.config.hardware.device): + if not hasattr(entry, 'macAddress'): + continue + + factname = 'hw_eth' + str(idx) + facts[factname] = { + 'addresstype': entry.addressType, + 'label': entry.deviceInfo.label, + 'macaddress': entry.macAddress, + 'ipaddresses': netDict.get(entry.macAddress, None), + 'macaddress_dash': entry.macAddress.replace(':', '-'), + 'summary': entry.deviceInfo.summary, + } + facts['hw_interfaces'].append('eth'+str(idx)) return facts diff --git a/lib/ansible/modules/commands/raw.py b/lib/ansible/modules/commands/raw.py index e76cf42bc79..3d6f315624e 100644 --- a/lib/ansible/modules/commands/raw.py +++ b/lib/ansible/modules/commands/raw.py @@ -36,7 +36,7 @@ options: as privilege escalation requires a shell. required: false version_added: "1.0" -description: +description: - Executes a low-down and dirty SSH command, not going through the module subsystem. This is useful and should only be done in two cases. The first case is installing C(python-simplejson) on older (Python 2.4 and diff --git a/lib/ansible/modules/files/file.py b/lib/ansible/modules/files/file.py index 558cfc388ab..ef98f036e8b 100644 --- a/lib/ansible/modules/files/file.py +++ b/lib/ansible/modules/files/file.py @@ -28,7 +28,7 @@ module: file version_added: "historical" short_description: Sets attributes of files extends_documentation_fragment: files -description: +description: - Sets attributes of files, symlinks, and directories, or removes files/symlinks/directories. Many other modules support the same options as the M(file) module - including M(copy), M(template), and M(assemble). @@ -44,7 +44,7 @@ options: - 'path to the file being managed. Aliases: I(dest), I(name)' required: true default: [] - aliases: ['dest', 'name'] + aliases: ['dest', 'name'] state: description: - If C(directory), all immediate subdirectories will be created if they @@ -78,7 +78,7 @@ options: default: "no" choices: [ "yes", "no" ] description: - - 'force the creation of the symlinks in two cases: the source file does + - 'force the creation of the symlinks in two cases: the source file does not exist (but will appear later); the destination exists and is a file (so, we need to unlink the "path" file and create symlink to the "src" file in place of it).' follow: diff --git a/lib/ansible/modules/files/lineinfile.py b/lib/ansible/modules/files/lineinfile.py index 0e55bc9da5b..ba7f4a3cc16 100644 --- a/lib/ansible/modules/files/lineinfile.py +++ b/lib/ansible/modules/files/lineinfile.py @@ -26,7 +26,7 @@ ANSIBLE_METADATA = {'status': ['preview'], DOCUMENTATION = """ --- module: lineinfile -author: +author: - "Daniel Hokka Zakrissoni (@dhozac)" - "Ahti Kitsik (@ahtik)" extends_documentation_fragment: diff --git a/lib/ansible/modules/files/template.py b/lib/ansible/modules/files/template.py index 4727eff7743..c603ec8f428 100644 --- a/lib/ansible/modules/files/template.py +++ b/lib/ansible/modules/files/template.py @@ -72,7 +72,7 @@ notes: author: - - Ansible Core Team + - Ansible Core Team - Michael DeHaan extends_documentation_fragment: - files diff --git a/lib/ansible/modules/notification/hall.py b/lib/ansible/modules/notification/hall.py index 691fc95316c..d8766412d01 100755 --- a/lib/ansible/modules/notification/hall.py +++ b/lib/ansible/modules/notification/hall.py @@ -47,10 +47,10 @@ options: description: - "The full URL to the image you wish to use for the Icon of the message. Defaults to U(http://cdn2.hubspot.net/hub/330046/file-769078210-png/Official_Logos/ansible_logo_black_square_small.png?t=1421076128627)" required: false -""" +""" EXAMPLES = """ -- name: Send Hall notifiation +- name: Send Hall notifiation local_action: module: hall room_token: @@ -61,7 +61,7 @@ EXAMPLES = """ when: ec2.instances|length > 0 local_action: module: hall - room_token: + room_token: title: Server Creation msg: "Created EC2 instance {{ item.id }} of type {{ item.instance_type }}.\\nInstance can be reached at {{ item.public_ip }} in the {{ item.region }} region." with_items: "{{ ec2.instances }}" @@ -70,7 +70,7 @@ EXAMPLES = """ HALL_API_ENDPOINT = 'https://hall.com/api/1/services/generic/%s' def send_request_to_hall(module, room_token, payload): - headers = {'Content-Type': 'application/json'} + headers = {'Content-Type': 'application/json'} payload=module.jsonify(payload) api_endpoint = HALL_API_ENDPOINT % (room_token) response, info = fetch_url(module, api_endpoint, data=payload, headers=headers) @@ -87,7 +87,7 @@ def main(): picture = dict(type='str', default='http://cdn2.hubspot.net/hub/330046/file-769078210-png/Official_Logos/ansible_logo_black_square_small.png?t=1421076128627'), ) ) - + room_token = module.params['room_token'] message = module.params['msg'] title = module.params['title'] diff --git a/lib/ansible/modules/packaging/elasticsearch_plugin.py b/lib/ansible/modules/packaging/elasticsearch_plugin.py index 9e5245bc6fe..8a165189625 100644 --- a/lib/ansible/modules/packaging/elasticsearch_plugin.py +++ b/lib/ansible/modules/packaging/elasticsearch_plugin.py @@ -78,8 +78,8 @@ options: default: None version_added: "2.1" version: - description: - - Version of the plugin to be installed. + description: + - Version of the plugin to be installed. If plugin exists with previous version, it will NOT be updated required: False default: None diff --git a/lib/ansible/modules/packaging/os/dnf.py b/lib/ansible/modules/packaging/os/dnf.py index c06ccdca055..016fdf60453 100644 --- a/lib/ansible/modules/packaging/os/dnf.py +++ b/lib/ansible/modules/packaging/os/dnf.py @@ -60,7 +60,7 @@ options: required: false default: null aliases: [] - + disablerepo: description: - I(Repoid) of repositories to disable for the install/update operation. diff --git a/lib/ansible/modules/system/group.py b/lib/ansible/modules/system/group.py old mode 100755 new mode 100644 diff --git a/lib/ansible/modules/test/utils/shippable/ci.sh b/lib/ansible/modules/test/utils/shippable/ci.sh deleted file mode 100755 index 5c0f847e661..00000000000 --- a/lib/ansible/modules/test/utils/shippable/ci.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -eux - -set -o pipefail - -source_root=$(python -c "from os import path; print(path.abspath(path.join(path.dirname('$0'), '../../..')))") - -"${source_root}/test/utils/shippable/${TEST}.sh" 2>&1 | gawk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }' diff --git a/lib/ansible/modules/test/utils/shippable/docs-requirements.txt b/lib/ansible/modules/test/utils/shippable/docs-requirements.txt deleted file mode 100644 index 4e859bb8c71..00000000000 --- a/lib/ansible/modules/test/utils/shippable/docs-requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -jinja2 -pyyaml diff --git a/lib/ansible/modules/test/utils/shippable/docs.sh b/lib/ansible/modules/test/utils/shippable/docs.sh deleted file mode 100755 index 2858f87c997..00000000000 --- a/lib/ansible/modules/test/utils/shippable/docs.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -eux - -set -o pipefail - -ansible_repo_url="https://github.com/ansible/ansible.git" - -build_dir="${SHIPPABLE_BUILD_DIR}" -repo="${REPO_NAME}" - -case "${repo}" in - "ansible-modules-core") - this_module_group="core" - other_module_group="extras" - ;; - "ansible-modules-extras") - this_module_group="extras" - other_module_group="core" - ;; - *) - echo "Unsupported repo name: ${repo}" - exit 1 - ;; -esac - -modules_tmp_dir="${build_dir}.tmp" -this_modules_dir="${build_dir}/lib/ansible/modules/${this_module_group}" -other_modules_dir="${build_dir}/lib/ansible/modules/${other_module_group}" - -cd / -mv "${build_dir}" "${modules_tmp_dir}" -git clone "${ansible_repo_url}" "${build_dir}" -cd "${build_dir}" -rmdir "${this_modules_dir}" -mv "${modules_tmp_dir}" "${this_modules_dir}" -mv "${this_modules_dir}/shippable" "${build_dir}" -git submodule init "${other_modules_dir}" -git submodule sync "${other_modules_dir}" -git submodule update "${other_modules_dir}" - -pip install -r lib/ansible/modules/${this_module_group}/test/utils/shippable/docs-requirements.txt --upgrade -pip list - -source hacking/env-setup - -docs_status=0 - -PAGER=/bin/cat \ - ANSIBLE_DEPRECATION_WARNINGS=false \ - bin/ansible-doc -l \ - 2>/tmp/ansible-doc.err || docs_status=$? - -if [ -s /tmp/ansible-doc.err ]; then - # report warnings as errors - echo "Output from 'ansible-doc -l' on stderr is considered an error:" - cat /tmp/ansible-doc.err - exit 1 -fi - -if [ "${docs_status}" -ne 0 ]; then - echo "Running 'ansible-doc -l' failed with no output on stderr and exit code: ${docs_status}" - exit 1 -fi diff --git a/lib/ansible/modules/test/utils/shippable/integration.sh b/lib/ansible/modules/test/utils/shippable/integration.sh deleted file mode 100755 index cf10e681bfb..00000000000 --- a/lib/ansible/modules/test/utils/shippable/integration.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -eux - -set -o pipefail - -ansible_repo_url="https://github.com/ansible/ansible.git" - -is_pr="${IS_PULL_REQUEST}" -build_dir="${SHIPPABLE_BUILD_DIR}" -repo="${REPO_NAME}" - -if [ "${is_pr}" != "true" ]; then - echo "Module integration tests are only supported on pull requests." - exit 0 -fi - -case "${repo}" in - "ansible-modules-core") - this_module_group="core" - other_module_group="extras" - ;; - "ansible-modules-extras") - this_module_group="extras" - other_module_group="core" - ;; - *) - echo "Unsupported repo name: ${repo}" - exit 1 - ;; -esac - -modules_tmp_dir="${build_dir}.tmp" -this_modules_dir="${build_dir}/lib/ansible/modules/${this_module_group}" -other_modules_dir="${build_dir}/lib/ansible/modules/${other_module_group}" - -cd / -mv "${build_dir}" "${modules_tmp_dir}" -git clone "${ansible_repo_url}" "${build_dir}" -cd "${build_dir}" -rmdir "${this_modules_dir}" -mv "${modules_tmp_dir}" "${this_modules_dir}" -mv "${this_modules_dir}/shippable" "${build_dir}" -git submodule init "${other_modules_dir}" -git submodule sync "${other_modules_dir}" -git submodule update "${other_modules_dir}" - -pip install -r test/utils/shippable/modules/generate-tests-requirements.txt --upgrade -pip list - -source hacking/env-setup - -test/utils/shippable/modules/generate-tests "${this_module_group}" --verbose --output /tmp/integration.sh >/dev/null - -if [ -f /tmp/integration.sh ]; then - /bin/bash -eux /tmp/integration.sh -fi diff --git a/lib/ansible/modules/test/utils/shippable/sanity-skip-python24.txt b/lib/ansible/modules/test/utils/shippable/sanity-skip-python24.txt deleted file mode 100644 index 1a0a28c4d49..00000000000 --- a/lib/ansible/modules/test/utils/shippable/sanity-skip-python24.txt +++ /dev/null @@ -1 +0,0 @@ -/cloud/[^/]+/(?!(ec2_facts.py|_ec2_ami_search.py)) diff --git a/lib/ansible/modules/test/utils/shippable/sanity.sh b/lib/ansible/modules/test/utils/shippable/sanity.sh deleted file mode 100755 index 8c1453022e7..00000000000 --- a/lib/ansible/modules/test/utils/shippable/sanity.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -eux - -source_root=$(python -c "from os import path; print(path.abspath(path.join(path.dirname('$0'), '../../..')))") - -install_deps="${INSTALL_DEPS:-}" - -cd "${source_root}" - -# FIXME REPOMERGE: No need to checkout ansible -build_dir=$(mktemp -d) -trap 'rm -rf "${build_dir}"' EXIT - -git clone "https://github.com/ansible/ansible.git" "${build_dir}" --recursive -source "${build_dir}/hacking/env-setup" -# REPOMERGE: END - -if [ "${install_deps}" != "" ]; then - add-apt-repository ppa:fkrull/deadsnakes - apt-add-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports universe' - apt-get update -qq - - apt-get install -qq shellcheck python2.4 - - # Install dependencies for ansible and validate_modules - pip install -r "${build_dir}/test/utils/shippable/sanity-requirements.txt" --upgrade - pip list - -fi - -validate_modules="${build_dir}/test/sanity/validate-modules/validate-modules" - -python2.4 -m compileall -fq -x "($(printf %s "$(< "test/utils/shippable/sanity-skip-python24.txt"))" | tr '\n' '|')" . -python2.6 -m compileall -fq . -python2.7 -m compileall -fq . -python3.5 -m compileall -fq . - -ANSIBLE_DEPRECATION_WARNINGS=false \ - "${validate_modules}" --exclude '/utilities/|/shippable(/|$)' . - -shellcheck \ - test/utils/shippable/*.sh diff --git a/lib/ansible/modules/windows/win_acl.ps1 b/lib/ansible/modules/windows/win_acl.ps1 index 4890a524fd6..068130a203f 100644 --- a/lib/ansible/modules/windows/win_acl.ps1 +++ b/lib/ansible/modules/windows/win_acl.ps1 @@ -87,7 +87,7 @@ Function UserSearch { #Search by samaccountname $Searcher = [adsisearcher]"" - + If ($searchDomainUPN -eq $false) { $Searcher.Filter = "sAMAccountName=$($accountName)" } diff --git a/lib/ansible/modules/windows/win_msi.ps1 b/lib/ansible/modules/windows/win_msi.ps1 index a3d455beb0e..3af765a7051 100644 --- a/lib/ansible/modules/windows/win_msi.ps1 +++ b/lib/ansible/modules/windows/win_msi.ps1 @@ -67,4 +67,4 @@ Remove-Item $logfile; Set-Attr $result "log" $logcontents; -Exit-Json $result; +Exit-Json $result; \ No newline at end of file diff --git a/lib/ansible/modules/windows/win_share.ps1 b/lib/ansible/modules/windows/win_share.ps1 index 6f873bed7e5..59e4e8ab810 100644 --- a/lib/ansible/modules/windows/win_share.ps1 +++ b/lib/ansible/modules/windows/win_share.ps1 @@ -28,7 +28,7 @@ Function UserSearch $searchDomain = $false $searchDomainUPN = $false if ($accountName.Split("\").count -gt 1) - { + { if ($accountName.Split("\")[0] -ne $env:COMPUTERNAME) { $searchDomain = $true diff --git a/lib/ansible/modules/windows/win_unzip.py b/lib/ansible/modules/windows/win_unzip.py index c1e533b0d05..708a909820b 100644 --- a/lib/ansible/modules/windows/win_unzip.py +++ b/lib/ansible/modules/windows/win_unzip.py @@ -66,7 +66,7 @@ options: - If this file or directory exists the specified src will not be extracted. required: no default: null -author: Phil Schwartz +author: Phil Schwartz ''' EXAMPLES = r'''