diff -Nru ansible-2.6.0/changelogs/CHANGELOG-v2.6.rst ansible-2.6.1/changelogs/CHANGELOG-v2.6.rst --- ansible-2.6.0/changelogs/CHANGELOG-v2.6.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/changelogs/CHANGELOG-v2.6.rst 2018-07-05 19:54:50.000000000 +0000 @@ -2,6 +2,33 @@ Ansible 2.6 "Heartbreaker" Release Notes ======================================== +v2.6.1 +====== + +Release Summary +--------------- + +| Release Date: 2018-07-05 +| `Porting Guide `_ + + +Minor Changes +------------- + +- Restore module_utils.basic.BOOLEANS variable for backwards compatibility with the module API in older ansible releases. + +Bugfixes +-------- + +- **Security Fix** - avoid loading host/group vars from cwd when not specifying a playbook or playbook base dir +- **Security Fix** - avoid using ansible.cfg in a world writable dir. +- Fix junos_config confirm commit timeout issue (https://github.com/ansible/ansible/pull/41527) +- file module - The touch subcommand had its diff output broken during the 2.6.x development cycle. The patch to fix that broke check mode. This is now fixed (https://github.com/ansible/ansible/issues/42111) +- inventory manager - This fixes required options being populated before the inventory config file is read, so the required options may be set in the config file. +- nsupdate - allow hmac-sha384 https://github.com/ansible/ansible/pull/42209 +- win_domain - fixes typo in one of the AD cmdlets https://github.com/ansible/ansible/issues/41536 +- win_group_membership - uses the internal Ansible SID conversion logic and uses that when comparing group membership instead of the name https://github.com/ansible/ansible/issues/40649 + v2.6.0 ====== @@ -393,8 +420,8 @@ files ^^^^^ -- net_get - Copy files from a network device to Ansible Controller -- net_put - Copy files from Ansibe controller to a network device +- net_get - Copy a file from a network device to Ansible Controller +- net_put - Copy a file from Ansible Controller to a network device fortios ^^^^^^^ diff -Nru ansible-2.6.0/debian/changelog ansible-2.6.1/debian/changelog --- ansible-2.6.0/debian/changelog 2018-06-28 23:31:59.000000000 +0000 +++ ansible-2.6.1/debian/changelog 2018-07-05 19:55:45.000000000 +0000 @@ -1,5 +1,5 @@ -ansible (2.6.0-1ppa~artful) artful; urgency=low +ansible (2.6.1-1ppa~artful) artful; urgency=low - * 2.6.0 release + * 2.6.1 release - -- Ansible, Inc. Thu, 28 Jun 2018 23:31:34 +0000 + -- Ansible, Inc. Thu, 05 Jul 2018 19:55:20 +0000 diff -Nru ansible-2.6.0/docs/docsite/rst/community/maintainers.rst ansible-2.6.1/docs/docsite/rst/community/maintainers.rst --- ansible-2.6.0/docs/docsite/rst/community/maintainers.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/community/maintainers.rst 2018-07-05 19:54:50.000000000 +0000 @@ -21,7 +21,7 @@ Maintainers of Ansible modules are expected to provide feedback, responses, or actions on pull requests or issues to the module(s) they maintain in a reasonably timely manner. -It is also recommended that you occasionally revisit the `contribution guidelines `_, as they are continually refined. Occasionally, you may be requested to update your module to move it closer to the general accepted standard requirements. We hope for this to be infrequent, and will always be a request with a fair amount of lead time (ie: not by tomorrow!). +It is also recommended that you occasionally revisit the `contribution guidelines `_, as they are continually refined. Occasionally, you may be requested to update your module to move it closer to the general accepted standard requirements. We hope for this to be infrequent, and will always be a request with a fair amount of lead time (ie: not by tomorrow!). Finally, following the `ansible-devel `_ mailing list can be a great way to participate in the broader Ansible community, and a place where you can influence the overall direction, quality, and goals of Ansible and its modules. If you're not on this relatively low-volume list, please join us here: https://groups.google.com/forum/#!forum/ansible-devel diff -Nru ansible-2.6.0/docs/docsite/rst/dev_guide/developing_modules_documenting.rst ansible-2.6.1/docs/docsite/rst/dev_guide/developing_modules_documenting.rst --- ansible-2.6.0/docs/docsite/rst/dev_guide/developing_modules_documenting.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/dev_guide/developing_modules_documenting.rst 2018-07-05 19:54:50.000000000 +0000 @@ -239,7 +239,9 @@ :choices: List of option values. Should be absent if empty. :type: - If an argument is ``type='bool'``, this field should be set to ``type: bool`` and no ``choices`` should be specified. + + * Specifies the data type that option accepts, must match the ``argspec``. + * If an argument is ``type='bool'``, this field should be set to ``type: bool`` and no ``choices`` should be specified. :aliases: List of option name aliases; generally not needed. :version_added: diff -Nru ansible-2.6.0/docs/docsite/rst/installation_guide/intro_configuration.rst ansible-2.6.1/docs/docsite/rst/installation_guide/intro_configuration.rst --- ansible-2.6.0/docs/docsite/rst/installation_guide/intro_configuration.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/installation_guide/intro_configuration.rst 2018-07-05 19:54:50.000000000 +0000 @@ -22,7 +22,7 @@ .. _getting_the_latest_configuration: Getting the latest configuration -================================ +-------------------------------- If installing Ansible from a package manager, the latest ansible.cfg file should be present in /etc/ansible, possibly as a ".rpmnew" file (or other) as appropriate in the case of updates. @@ -36,6 +36,7 @@ For in-depth details, see :ref:`ansible_configuration_settings`. +.. _environmental_configuration: Environmental configuration =========================== @@ -56,4 +57,3 @@ The full list of options available is in :ref:`ansible-playbook` and :ref:`ansible`. - diff -Nru ansible-2.6.0/docs/docsite/rst/porting_guides/porting_guide_2.0.rst ansible-2.6.1/docs/docsite/rst/porting_guides/porting_guide_2.0.rst --- ansible-2.6.0/docs/docsite/rst/porting_guides/porting_guide_2.0.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/porting_guides/porting_guide_2.0.rst 2018-07-05 19:54:50.000000000 +0000 @@ -9,7 +9,7 @@ It is intended to assist in updating your playbooks, plugins and other parts of your Ansible infrastructure so they will work with this version of Ansible. -We suggest you read this page along with `Ansible Changelog `_ to understand what updates you may need to make. +We suggest you read this page along with `Ansible Changelog for 2.0 `_ to understand what updates you may need to make. This document is part of a collection on porting. The complete list of porting guides can be found at :ref:`porting guides `. diff -Nru ansible-2.6.0/docs/docsite/rst/porting_guides/porting_guide_2.3.rst ansible-2.6.1/docs/docsite/rst/porting_guides/porting_guide_2.3.rst --- ansible-2.6.0/docs/docsite/rst/porting_guides/porting_guide_2.3.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/porting_guides/porting_guide_2.3.rst 2018-07-05 19:54:50.000000000 +0000 @@ -9,7 +9,7 @@ It is intended to assist in updating your playbooks, plugins and other parts of your Ansible infrastructure so they will work with this version of Ansible. -We suggest you read this page along with `Ansible Changelog `_ to understand what updates you may need to make. +We suggest you read this page along with `Ansible Changelog for 2.3 `_ to understand what updates you may need to make. This document is part of a collection on porting. The complete list of porting guides can be found at :ref:`porting guides `. diff -Nru ansible-2.6.0/docs/docsite/rst/porting_guides/porting_guide_2.4.rst ansible-2.6.1/docs/docsite/rst/porting_guides/porting_guide_2.4.rst --- ansible-2.6.0/docs/docsite/rst/porting_guides/porting_guide_2.4.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/porting_guides/porting_guide_2.4.rst 2018-07-05 19:54:50.000000000 +0000 @@ -9,7 +9,7 @@ It is intended to assist in updating your playbooks, plugins and other parts of your Ansible infrastructure so they will work with this version of Ansible. -We suggest you read this page along with `Ansible Changelog `_ to understand what updates you may need to make. +We suggest you read this page along with `Ansible Changelog for 2.4 `_ to understand what updates you may need to make. This document is part of a collection on porting. The complete list of porting guides can be found at :ref:`porting guides `. diff -Nru ansible-2.6.0/docs/docsite/rst/porting_guides/porting_guide_2.5.rst ansible-2.6.1/docs/docsite/rst/porting_guides/porting_guide_2.5.rst --- ansible-2.6.0/docs/docsite/rst/porting_guides/porting_guide_2.5.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/porting_guides/porting_guide_2.5.rst 2018-07-05 19:54:50.000000000 +0000 @@ -8,7 +8,7 @@ It is intended to assist in updating your playbooks, plugins and other parts of your Ansible infrastructure so they will work with this version of Ansible. -We suggest you read this page along with `Ansible Changelog `_ to understand what updates you may need to make. +We suggest you read this page along with `Ansible Changelog for 2.5 `_ to understand what updates you may need to make. This document is part of a collection on porting. The complete list of porting guides can be found at :ref:`porting guides `. diff -Nru ansible-2.6.0/docs/docsite/rst/porting_guides/porting_guide_2.6.rst ansible-2.6.1/docs/docsite/rst/porting_guides/porting_guide_2.6.rst --- ansible-2.6.0/docs/docsite/rst/porting_guides/porting_guide_2.6.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/porting_guides/porting_guide_2.6.rst 2018-07-05 19:54:50.000000000 +0000 @@ -8,7 +8,7 @@ It is intended to assist in updating your playbooks, plugins and other parts of your Ansible infrastructure so they will work with this version of Ansible. -We suggest you read this page along with `Ansible Changelog `_ to understand what updates you may need to make. +We suggest you read this page along with `Ansible Changelog for 2.6 `_ to understand what updates you may need to make. This document is part of a collection on porting. The complete list of porting guides can be found at :ref:`porting guides `. diff -Nru ansible-2.6.0/docs/docsite/rst/reference_appendices/galaxy.rst ansible-2.6.1/docs/docsite/rst/reference_appendices/galaxy.rst --- ansible-2.6.0/docs/docsite/rst/reference_appendices/galaxy.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/reference_appendices/galaxy.rst 2018-07-05 19:54:50.000000000 +0000 @@ -18,7 +18,7 @@ them available to the Ansible community. Imported roles become available in the Galaxy search index and visible on the site, allowing users to discover and download them. -Learn more by viewing `the About page `_. +Learn more by viewing `the About page `_. The command line tool ````````````````````` diff -Nru ansible-2.6.0/docs/docsite/rst/reference_appendices/release_and_maintenance.rst ansible-2.6.1/docs/docsite/rst/reference_appendices/release_and_maintenance.rst --- ansible-2.6.0/docs/docsite/rst/reference_appendices/release_and_maintenance.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/reference_appendices/release_and_maintenance.rst 2018-07-05 19:54:50.000000000 +0000 @@ -40,14 +40,14 @@ =============== ========================== ================================================= Ansible Release Latest Version Status =============== ========================== ================================================= -devel `2.6` (unreleased, trunk) In development -2.5 `2.5.0`_ (2018-03-23) Supported (security **and** general bugfixes) -2.4 `2.4.4`_ (2018-01-31) Supported (security **and** critical bug fixes) -2.3 `2.3.3`_ (2017-12-20) Unsupported (end of life) -2.2 `2.2.3`_ (2017-05-09) Unsupported (end of life) -2.1 `2.1.6`_ (2017-06-01) Unsupported (end of life) -2.0 `2.0.2`_ (2016-04-19) Unsupported (end of life) -1.9 `1.9.6`_ (2016-04-15) Unsupported (end of life) +devel 2.6 (unreleased, trunk) In development +`2.5`_ 2.5.4 (2018-05-31) Supported (security **and** general bugfixes) +`2.4`_ 2.4.4 (2018-01-31) Supported (security **and** critical bug fixes) +`2.3`_ 2.3.3 (2017-12-20) Unsupported (end of life) +`2.2`_ 2.2.3 (2017-05-09) Unsupported (end of life) +`2.1`_ 2.1.6 (2017-06-01) Unsupported (end of life) +`2.0`_ 2.0.2 (2016-04-19) Unsupported (end of life) +`1.9`_ 1.9.6 (2016-04-15) Unsupported (end of life) <1.9 n/a Unsupported (end of life) =============== ========================== ================================================= @@ -57,13 +57,14 @@ .. Comment: devel used to point here but we're currently revamping our changelog process and have no link to a static changelog for devel _2.6: https://github.com/ansible/ansible/blob/devel/CHANGELOG.md -.. _2.5.0: https://github.com/ansible/ansible/blob/stable-2.5/changelogs/CHANGELOG-v2.5.rst -.. _2.4.4: https://github.com/ansible/ansible/blob/stable-2.4/CHANGELOG.md -.. _2.3.3: https://github.com/ansible/ansible/blob/stable-2.3/CHANGELOG.md -.. _2.2.3: https://github.com/ansible/ansible/blob/stable-2.2/CHANGELOG.md -.. _2.1.6: https://github.com/ansible/ansible/blob/stable-2.1/CHANGELOG.md -.. _2.0.2: https://github.com/ansible/ansible/blob/stable-2.0/CHANGELOG.md -.. _1.9.6: https://github.com/ansible/ansible/blob/stable-1.9/CHANGELOG.md +.. _2.6: https://github.com/ansible/ansible/blob/stable-2.6/changelogs/CHANGELOG-v2.6.rst +.. _2.5: https://github.com/ansible/ansible/blob/stable-2.5/changelogs/CHANGELOG-v2.5.rst +.. _2.4: https://github.com/ansible/ansible/blob/stable-2.4/CHANGELOG.md +.. _2.3: https://github.com/ansible/ansible/blob/stable-2.3/CHANGELOG.md +.. _2.2: https://github.com/ansible/ansible/blob/stable-2.2/CHANGELOG.md +.. _2.1: https://github.com/ansible/ansible/blob/stable-2.1/CHANGELOG.md +.. _2.0: https://github.com/ansible/ansible/blob/stable-2.0/CHANGELOG.md +.. _1.9: https://github.com/ansible/ansible/blob/stable-1.9/CHANGELOG.md .. _support_life: .. _methods: @@ -90,14 +91,19 @@ The fixes that land in supported stable branches will eventually be released as a new version when necessary. -For more information on the changes included in each new version, you can refer -to the changelog_, available on GitHub. - Note that while there are no guarantees for providing fixes for unsupported releases of Ansible, there can sometimes be exceptions for critical issues. .. _GitHub: https://github.com/ansible/ansible -.. _changelog: https://github.com/ansible/ansible/blob/devel/CHANGELOG.md + +Changelogs +~~~~~~~~~~~~~~~~~~ + +Since 2.5, we've logged changes to ``stable-`` git branches at ``stable-/changelogs/CHANGELOG-v.rst``. +For example, here's the changelog for 2.5_ on GitHub. + +Older versions logged changes to ``stable-/CHANGELOG.md``. For example, +here's the CHANGELOG for 2.4_. Release candidates @@ -158,8 +164,6 @@ Testing strategies :ref:`ansible_community_guide` Community information and contributing - `Ansible Changelog `_ - Documentation of the improvements for each version of Ansible `Ansible release tarballs `_ Ansible release tarballs `Development Mailing List `_ diff -Nru ansible-2.6.0/docs/docsite/rst/reference_appendices/YAMLSyntax.rst ansible-2.6.1/docs/docsite/rst/reference_appendices/YAMLSyntax.rst --- ansible-2.6.0/docs/docsite/rst/reference_appendices/YAMLSyntax.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/reference_appendices/YAMLSyntax.rst 2018-07-05 19:54:50.000000000 +0000 @@ -235,6 +235,6 @@ `YAML 1.1 Specification `_ The Specification for YAML 1.1, which PyYAML and libyaml are currently implementing - `YAML 1.2 Specification `_ + `YAML 1.2 Specification `_ For completeness, YAML 1.2 is the successor of 1.1 diff -Nru ansible-2.6.0/docs/docsite/rst/scenario_guides/guide_aci.rst ansible-2.6.1/docs/docsite/rst/scenario_guides/guide_aci.rst --- ansible-2.6.0/docs/docsite/rst/scenario_guides/guide_aci.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/scenario_guides/guide_aci.rst 2018-07-05 19:54:50.000000000 +0000 @@ -65,7 +65,7 @@ description: Customer XYZ state: present -A complete list of existing ACI modules is available for the latest stable release on the :ref:`list of network modules `. You can also view the `current development version `_. +A complete list of existing ACI modules is available for the latest stable release on the :ref:`list of network modules `. You can also view the `current development version `_. Querying ACI configuration .......................... diff -Nru ansible-2.6.0/docs/docsite/rst/scenario_guides/guide_vmware.rst ansible-2.6.1/docs/docsite/rst/scenario_guides/guide_vmware.rst --- ansible-2.6.0/docs/docsite/rst/scenario_guides/guide_vmware.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/scenario_guides/guide_vmware.rst 2018-07-05 19:54:50.000000000 +0000 @@ -22,8 +22,7 @@ vmware_guest module ``````````````````` -The :ref:vmware_guest module is used to manage various operations related to virtual machines in -the given ESXi or vCenter server. +The :ref:`vmware_guest` module manages various operations related to virtual machines in the given ESXi or vCenter server. Prior to Ansible version 2.5, ``folder`` was an optional parameter with a default value of ``/vm``. The folder parameter was used to discover information about virtual machines in the given infrastructure. diff -Nru ansible-2.6.0/docs/docsite/rst/user_guide/intro_dynamic_inventory.rst ansible-2.6.1/docs/docsite/rst/user_guide/intro_dynamic_inventory.rst --- ansible-2.6.0/docs/docsite/rst/user_guide/intro_dynamic_inventory.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/user_guide/intro_dynamic_inventory.rst 2018-07-05 19:54:50.000000000 +0000 @@ -248,7 +248,7 @@ If you use an OpenStack based cloud, instead of manually maintaining your own inventory file, you can use the openstack.py dynamic inventory to pull information about your compute instances directly from OpenStack. -You can download the latest version of the OpenStack inventory script `here `_ +You can download the latest version of the OpenStack inventory script `here `_. You can use the inventory script explicitly (by passing the `-i openstack.py` argument to Ansible) or implicitly (by placing the script at `/etc/ansible/hosts`). @@ -289,7 +289,7 @@ Download the latest version of the OpenStack dynamic inventory script, make it executable and copy it to `/etc/ansible/hosts`:: - wget https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/openstack.py + wget https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/openstack_inventory.py chmod +x openstack.py sudo cp openstack.py /etc/ansible/hosts diff -Nru ansible-2.6.0/docs/docsite/rst/user_guide/playbooks_reuse_roles.rst ansible-2.6.1/docs/docsite/rst/user_guide/playbooks_reuse_roles.rst --- ansible-2.6.0/docs/docsite/rst/user_guide/playbooks_reuse_roles.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/user_guide/playbooks_reuse_roles.rst 2018-07-05 19:54:50.000000000 +0000 @@ -397,7 +397,7 @@ The client ``ansible-galaxy`` is included in Ansible. The Galaxy client allows you to download roles from Ansible Galaxy, and also provides an excellent default framework for creating your own roles. -Read the Ansible Galaxy introduction _ page for more information +Read the Ansible Galaxy documentation _ page for more information .. seealso:: diff -Nru ansible-2.6.0/docs/docsite/rst/vmware/faq.rst ansible-2.6.1/docs/docsite/rst/vmware/faq.rst --- ansible-2.6.0/docs/docsite/rst/vmware/faq.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/vmware/faq.rst 2018-07-05 19:54:50.000000000 +0000 @@ -4,5 +4,10 @@ Ansible VMware FAQ ****************** -How can I improve this ...? -=========================== +vmware_guest +============ + +Can I deploy a virtual machine on a standalone ESXi server ? +------------------------------------------------------------ + +Yes. vmware_guest can deploy a virtual machine with required settings on a standalone ESXi server. diff -Nru ansible-2.6.0/docs/docsite/rst/vmware/scenario_clone_template.rst ansible-2.6.1/docs/docsite/rst/vmware/scenario_clone_template.rst --- ansible-2.6.0/docs/docsite/rst/vmware/scenario_clone_template.rst 1970-01-01 00:00:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/vmware/scenario_clone_template.rst 2018-07-05 19:54:50.000000000 +0000 @@ -0,0 +1,213 @@ +.. _vmware_guest_from_template: + +**************************************** +Deploy a virtual machine from a template +**************************************** + +Introduction +============ + +This guide will show you how to utilize Ansible to clone a virtual machine from already existing VMware template. + +Scenario Requirements +===================== + +* Software + + * Ansible 2.5 or later must be installed + + * The Python module *Pyvmomi* must be installed on the Ansible (or Target host if not executing against localhost) + + * Installing the latest *Pyvmomi* via pip is recommended [as the OS packages are usually out of date and incompatible] + +* Hardware + + * At least one standalone ESXi server or + + * vCenter Server with at least one ESXi server + +* Access / Credentials + + * Ansible (or the target server) must have network access to the either vCenter server or the ESXi server you will be deploying to + + * Username and Password + + * Administrator user with following privileges + + - Virtual machine.Provisioning.Clone virtual machine on the virtual machine you are cloning + - Virtual machine.Inventory.Create from existing on the datacenter or virtual machine folder + - Virtual machine.Configuration.Add new disk on the datacenter or virtual machine folder. + - Resource.Assign virtual machine to resource pool on the destination host, cluster, or resource pool. + - Datastore.Allocate space on the destination datastore or datastore folder. + - Network.Assign network on the network to which the virtual machine will be assigned. + - Virtual machine.Provisioning.Customize on the virtual machine or virtual machine folder if you are customizing the guest operating system. + - Virtual machine.Provisioning.Read customization specifications on the root vCenter Server if you are customizing the guest operating system. + +Assumptions +=========== + +- All variable names and VMware object names are case sensitive +- VMware allows creation of virtual machine and templates with same name across datacenters and within datacenters. +- You need to use Python 2.7.9 version in order to use *validate_certs* option, as this version is capable of changing the SSL verification behaviours. + +Caveats +======= + +- Hosts in the ESXi cluster must have access to the datastore that the template resides on. +- Multiple templates with the same name will cause module failures. +- In order to utilize Guest Customization, VMWare Tools must be installed on the template. For Linux, the open-vm-tools package is recommended, and it requires that Perl be installed. + + +Example Description +=================== + +In this use case / example, we will be selecting a virtual machine template and cloning it into a specific folder in our Datacenter / Cluster. The following Ansible playbook showcases the basic parameters that are needed for this. + +.. code-block:: yaml + + --- + - name: Create a VM from a template + hosts: localhost + connection: local + gather_facts: no + tasks: + - name: Clone the template + vmware_guest: + hostname: 192.0.2.44 + username: administrator@vsphere.local + password: vmware + validate_certs: False + name: testvm_2 + template: template_el7 + datacenter: DC1 + folder: /DC1/vm + state: poweredon + wait_for_ip_address: yes + + +Since Ansible utilizes the VMware API to perform actions, in this use case we will be connecting directly to the API from our localhost. This means that our playbooks will not be running from the vCenter or ESXi Server. We do not necessarily need to collect facts about our localhost, so the *gather_facts* parameter will be disabled. You can run these modules against another server that would then connect to the API if your localhost does not have access to vCenter. If so, the required Python modules will need to be installed on that target server. + +To begin, there are a few bits of information we will need. First and foremost is the hostname of the ESXi server or vCenter server. After this, you will need the username and password for this server. For now, you will be entering these directly, but in a more advanced playbook this can be abstracted out and stored in a more secure fashion [1][2]. If your vCenter or ESXi server is not setup with proper CA certificates that can be verified from the Ansible server, then it is necessary to disable validation of these certificates by using the *validate_certs* parameter. To do this you need to set ``validate_certs=False`` in your playbook. + +Now you need to supply the information about the virtual machine which will be created. Give your virtual machine a name, one that conforms to all VMware requirements for naming conventions. Next, select the display name of the template from which you want to clone new virtual machine. This must match what's displayed in VMware Web UI exactly. Then you can specify a folder to place this new virtual machine in. This path can either be a relative path or a full path to the folder including the Datacenter. You may need to specify a state for the virtual machine. This simply tells the module which action you want to take, in this case you will be ensure that the virtual machine exists and is powered on. An optional parameter is *wait_for_ip_address*, this will tell Ansible to wait for the virtual machine to fully boot up and VMware Tools is running before completing this task. + + +What to expect +-------------- + +- You will see a bit of JSON output after this playbook completes. This output shows various parameters that are returned from the module and from vCenter about the newly created VM. + +.. code-block:: yaml + + { + "changed": true, + "instance": { + "annotation": "", + "current_snapshot": null, + "customvalues": {}, + "guest_consolidation_needed": false, + "guest_question": null, + "guest_tools_status": "guestToolsNotRunning", + "guest_tools_version": "0", + "hw_cores_per_socket": 1, + "hw_datastores": [ + "ds_215" + ], + "hw_esxi_host": "192.0.2.44", + "hw_eth0": { + "addresstype": "assigned", + "ipaddresses": null, + "label": "Network adapter 1", + "macaddress": "00:50:56:8c:19:f4", + "macaddress_dash": "00-50-56-8c-19-f4", + "portgroup_key": "dvportgroup-17", + "portgroup_portkey": "0", + "summary": "DVSwitch: 50 0c 5b 22 b6 68 ab 89-fc 0b 59 a4 08 6e 80 fa" + }, + "hw_files": [ + "[ds_215] testvm_2/testvm_2.vmx", + "[ds_215] testvm_2/testvm_2.vmsd", + "[ds_215] testvm_2/testvm_2.vmdk" + ], + "hw_folder": "/DC1/vm", + "hw_guest_full_name": null, + "hw_guest_ha_state": null, + "hw_guest_id": null, + "hw_interfaces": [ + "eth0" + ], + "hw_is_template": false, + "hw_memtotal_mb": 512, + "hw_name": "testvm_2", + "hw_power_status": "poweredOff", + "hw_processor_count": 2, + "hw_product_uuid": "420cb25b-81e8-8d3b-dd2d-a439ee54fcc5", + "hw_version": "vmx-13", + "instance_uuid": "500cd53b-ed57-d74e-2da8-0dc0eddf54d5", + "ipv4": null, + "ipv6": null, + "module_hw": true, + "snapshots": [] + }, + "invocation": { + "module_args": { + "annotation": null, + "cdrom": {}, + "cluster": "DC1_C1", + "customization": {}, + "customization_spec": null, + "customvalues": [], + "datacenter": "DC1", + "disk": [], + "esxi_hostname": null, + "folder": "/DC1/vm", + "force": false, + "guest_id": null, + "hardware": {}, + "hostname": "192.0.2.44", + "is_template": false, + "linked_clone": false, + "name": "testvm_2", + "name_match": "first", + "networks": [], + "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", + "port": 443, + "resource_pool": null, + "snapshot_src": null, + "state": "present", + "state_change_timeout": 0, + "template": "template_el7", + "username": "administrator@vsphere.local", + "uuid": null, + "validate_certs": false, + "vapp_properties": [], + "wait_for_ip_address": true + } + } + } + +- State is changed to *True* which notifies that the virtual machine is built using given template. The module will not complete until the clone task in VMware is finished. This can take some time depending on your environment. + +- If you utilize the *wait_for_ip_address* parameter, then it will also increase the clone time as it will wait until virtual machine boots into the OS and an IP Address has been assigned to the given NIC. + + + +Troubleshooting +--------------- + +Things to inspect + +- Check if the values provided for username and password are correct +- Check if the datacenter you provided is available +- Check if the template specified exists and you have permissions to access the datastore +- Ensure the full folder path you specified already exists. It will not create folders automatically for you. + + + +Appendix +-------- + +- [1] - https://docs.ansible.com/ansible/latest/vault.html + +- [2] - https://docs.ansible.com/ansible-tower/latest/html/userguide/credentials.html + diff -Nru ansible-2.6.0/docs/docsite/rst/vmware/vmware_scenarios.rst ansible-2.6.1/docs/docsite/rst/vmware/vmware_scenarios.rst --- ansible-2.6.0/docs/docsite/rst/vmware/vmware_scenarios.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/docsite/rst/vmware/vmware_scenarios.rst 2018-07-05 19:54:50.000000000 +0000 @@ -14,6 +14,7 @@ .. toctree:: :maxdepth: 2 + scenario_clone_template vmware_scenario_1 - \ No newline at end of file + diff -Nru ansible-2.6.0/docs/man/man1/ansible.1 ansible-2.6.1/docs/man/man1/ansible.1 --- ansible-2.6.0/docs/man/man1/ansible.1 2018-06-28 23:31:39.000000000 +0000 +++ ansible-2.6.1/docs/man/man1/ansible.1 2018-07-05 19:55:24.000000000 +0000 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH ANSIBLE 1 "" "Ansible 2.6.0" "System administration commands" +.TH ANSIBLE 1 "" "Ansible 2.6.1" "System administration commands" .SH NAME ansible \- Define and run a single task 'playbook' against a set of hosts . @@ -330,21 +330,27 @@ .sp The following environment variables may be specified. .sp -ANSIBLE_CONFIG \-\- Override the default ansible config file +ANSIBLE_CONFIG \-\- Specify override location for the ansible config file .sp Many more are available for most options in ansible.cfg +.sp +For a full list check \fI\%https://docs.ansible.com/\fP\&. or use the \fIansible\-config\fP command. .SH FILES .sp /etc/ansible/ansible.cfg \-\- Config file, used if present .sp ~/.ansible.cfg \-\- User config file, overrides the default config if present +.sp +\&./ansible.cfg \-\- Local config file (in current working direcotry) assumed to be \(aqproject specific\(aq and overrides the rest if present. +.sp +As mentioned above, the ANSIBLE_CONFIG environment variable will override all others. .SH AUTHOR .sp Ansible was originally written by Michael DeHaan. .SH COPYRIGHT .sp -Copyright © 2017 Red Hat, Inc | Ansible. -Ansible is released under the terms of the GPLv3 License. +Copyright © 2018 Red Hat, Inc | Ansible. +Ansible is released under the terms of the GPLv3 license. .SH SEE ALSO .sp \fBansible\-config\fP (1), \fBansible\-console\fP (1), \fBansible\-doc\fP (1), \fBansible\-galaxy\fP (1), \fBansible\-inventory\fP (1), \fBansible\-playbook\fP (1), \fBansible\-pull\fP (1), \fBansible\-vault\fP (1) diff -Nru ansible-2.6.0/docs/man/man1/ansible-config.1 ansible-2.6.1/docs/man/man1/ansible-config.1 --- ansible-2.6.0/docs/man/man1/ansible-config.1 2018-06-28 23:31:38.000000000 +0000 +++ ansible-2.6.1/docs/man/man1/ansible-config.1 2018-07-05 19:55:22.000000000 +0000 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH ANSIBLE-CONFIG 1 "" "Ansible 2.6.0" "System administration commands" +.TH ANSIBLE-CONFIG 1 "" "Ansible 2.6.1" "System administration commands" .SH NAME ansible-config \- View, edit, and manage ansible configuration. . @@ -88,21 +88,27 @@ .sp The following environment variables may be specified. .sp -ANSIBLE_CONFIG \-\- Override the default ansible config file +ANSIBLE_CONFIG \-\- Specify override location for the ansible config file .sp Many more are available for most options in ansible.cfg +.sp +For a full list check \fI\%https://docs.ansible.com/\fP\&. or use the \fIansible\-config\fP command. .SH FILES .sp /etc/ansible/ansible.cfg \-\- Config file, used if present .sp ~/.ansible.cfg \-\- User config file, overrides the default config if present +.sp +\&./ansible.cfg \-\- Local config file (in current working direcotry) assumed to be \(aqproject specific\(aq and overrides the rest if present. +.sp +As mentioned above, the ANSIBLE_CONFIG environment variable will override all others. .SH AUTHOR .sp Ansible was originally written by Michael DeHaan. .SH COPYRIGHT .sp -Copyright © 2017 Red Hat, Inc | Ansible. -Ansible is released under the terms of the GPLv3 License. +Copyright © 2018 Red Hat, Inc | Ansible. +Ansible is released under the terms of the GPLv3 license. .SH SEE ALSO .sp \fBansible\fP (1), \fBansible\-console\fP (1), \fBansible\-doc\fP (1), \fBansible\-galaxy\fP (1), \fBansible\-inventory\fP (1), \fBansible\-playbook\fP (1), \fBansible\-pull\fP (1), \fBansible\-vault\fP (1) diff -Nru ansible-2.6.0/docs/man/man1/ansible-console.1 ansible-2.6.1/docs/man/man1/ansible-console.1 --- ansible-2.6.0/docs/man/man1/ansible-console.1 2018-06-28 23:31:38.000000000 +0000 +++ ansible-2.6.1/docs/man/man1/ansible-console.1 2018-07-05 19:55:22.000000000 +0000 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH ANSIBLE-CONSOLE 1 "" "Ansible 2.6.0" "System administration commands" +.TH ANSIBLE-CONSOLE 1 "" "Ansible 2.6.1" "System administration commands" .SH NAME ansible-console \- REPL console for executing Ansible tasks. . @@ -287,21 +287,27 @@ .sp The following environment variables may be specified. .sp -ANSIBLE_CONFIG \-\- Override the default ansible config file +ANSIBLE_CONFIG \-\- Specify override location for the ansible config file .sp Many more are available for most options in ansible.cfg +.sp +For a full list check \fI\%https://docs.ansible.com/\fP\&. or use the \fIansible\-config\fP command. .SH FILES .sp /etc/ansible/ansible.cfg \-\- Config file, used if present .sp ~/.ansible.cfg \-\- User config file, overrides the default config if present +.sp +\&./ansible.cfg \-\- Local config file (in current working direcotry) assumed to be \(aqproject specific\(aq and overrides the rest if present. +.sp +As mentioned above, the ANSIBLE_CONFIG environment variable will override all others. .SH AUTHOR .sp Ansible was originally written by Michael DeHaan. .SH COPYRIGHT .sp -Copyright © 2017 Red Hat, Inc | Ansible. -Ansible is released under the terms of the GPLv3 License. +Copyright © 2018 Red Hat, Inc | Ansible. +Ansible is released under the terms of the GPLv3 license. .SH SEE ALSO .sp \fBansible\fP (1), \fBansible\-config\fP (1), \fBansible\-doc\fP (1), \fBansible\-galaxy\fP (1), \fBansible\-inventory\fP (1), \fBansible\-playbook\fP (1), \fBansible\-pull\fP (1), \fBansible\-vault\fP (1) diff -Nru ansible-2.6.0/docs/man/man1/ansible-doc.1 ansible-2.6.1/docs/man/man1/ansible-doc.1 --- ansible-2.6.0/docs/man/man1/ansible-doc.1 2018-06-28 23:31:38.000000000 +0000 +++ ansible-2.6.1/docs/man/man1/ansible-doc.1 2018-07-05 19:55:23.000000000 +0000 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH ANSIBLE-DOC 1 "" "Ansible 2.6.0" "System administration commands" +.TH ANSIBLE-DOC 1 "" "Ansible 2.6.1" "System administration commands" .SH NAME ansible-doc \- plugin documentation tool . @@ -117,21 +117,27 @@ .sp The following environment variables may be specified. .sp -ANSIBLE_CONFIG \-\- Override the default ansible config file +ANSIBLE_CONFIG \-\- Specify override location for the ansible config file .sp Many more are available for most options in ansible.cfg +.sp +For a full list check \fI\%https://docs.ansible.com/\fP\&. or use the \fIansible\-config\fP command. .SH FILES .sp /etc/ansible/ansible.cfg \-\- Config file, used if present .sp ~/.ansible.cfg \-\- User config file, overrides the default config if present +.sp +\&./ansible.cfg \-\- Local config file (in current working direcotry) assumed to be \(aqproject specific\(aq and overrides the rest if present. +.sp +As mentioned above, the ANSIBLE_CONFIG environment variable will override all others. .SH AUTHOR .sp Ansible was originally written by Michael DeHaan. .SH COPYRIGHT .sp -Copyright © 2017 Red Hat, Inc | Ansible. -Ansible is released under the terms of the GPLv3 License. +Copyright © 2018 Red Hat, Inc | Ansible. +Ansible is released under the terms of the GPLv3 license. .SH SEE ALSO .sp \fBansible\fP (1), \fBansible\-config\fP (1), \fBansible\-console\fP (1), \fBansible\-galaxy\fP (1), \fBansible\-inventory\fP (1), \fBansible\-playbook\fP (1), \fBansible\-pull\fP (1), \fBansible\-vault\fP (1) diff -Nru ansible-2.6.0/docs/man/man1/ansible-galaxy.1 ansible-2.6.1/docs/man/man1/ansible-galaxy.1 --- ansible-2.6.0/docs/man/man1/ansible-galaxy.1 2018-06-28 23:31:38.000000000 +0000 +++ ansible-2.6.1/docs/man/man1/ansible-galaxy.1 2018-07-05 19:55:23.000000000 +0000 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH ANSIBLE-GALAXY 1 "" "Ansible 2.6.0" "System administration commands" +.TH ANSIBLE-GALAXY 1 "" "Ansible 2.6.1" "System administration commands" .SH NAME ansible-galaxy \- None . @@ -315,21 +315,27 @@ .sp The following environment variables may be specified. .sp -ANSIBLE_CONFIG \-\- Override the default ansible config file +ANSIBLE_CONFIG \-\- Specify override location for the ansible config file .sp Many more are available for most options in ansible.cfg +.sp +For a full list check \fI\%https://docs.ansible.com/\fP\&. or use the \fIansible\-config\fP command. .SH FILES .sp /etc/ansible/ansible.cfg \-\- Config file, used if present .sp ~/.ansible.cfg \-\- User config file, overrides the default config if present +.sp +\&./ansible.cfg \-\- Local config file (in current working direcotry) assumed to be \(aqproject specific\(aq and overrides the rest if present. +.sp +As mentioned above, the ANSIBLE_CONFIG environment variable will override all others. .SH AUTHOR .sp Ansible was originally written by Michael DeHaan. .SH COPYRIGHT .sp -Copyright © 2017 Red Hat, Inc | Ansible. -Ansible is released under the terms of the GPLv3 License. +Copyright © 2018 Red Hat, Inc | Ansible. +Ansible is released under the terms of the GPLv3 license. .SH SEE ALSO .sp \fBansible\fP (1), \fBansible\-config\fP (1), \fBansible\-console\fP (1), \fBansible\-doc\fP (1), \fBansible\-inventory\fP (1), \fBansible\-playbook\fP (1), \fBansible\-pull\fP (1), \fBansible\-vault\fP (1) diff -Nru ansible-2.6.0/docs/man/man1/ansible-inventory.1 ansible-2.6.1/docs/man/man1/ansible-inventory.1 --- ansible-2.6.0/docs/man/man1/ansible-inventory.1 2018-06-28 23:31:38.000000000 +0000 +++ ansible-2.6.1/docs/man/man1/ansible-inventory.1 2018-07-05 19:55:23.000000000 +0000 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH ANSIBLE-INVENTORY 1 "" "Ansible 2.6.0" "System administration commands" +.TH ANSIBLE-INVENTORY 1 "" "Ansible 2.6.1" "System administration commands" .SH NAME ansible-inventory \- None . @@ -139,21 +139,27 @@ .sp The following environment variables may be specified. .sp -ANSIBLE_CONFIG \-\- Override the default ansible config file +ANSIBLE_CONFIG \-\- Specify override location for the ansible config file .sp Many more are available for most options in ansible.cfg +.sp +For a full list check \fI\%https://docs.ansible.com/\fP\&. or use the \fIansible\-config\fP command. .SH FILES .sp /etc/ansible/ansible.cfg \-\- Config file, used if present .sp ~/.ansible.cfg \-\- User config file, overrides the default config if present +.sp +\&./ansible.cfg \-\- Local config file (in current working direcotry) assumed to be \(aqproject specific\(aq and overrides the rest if present. +.sp +As mentioned above, the ANSIBLE_CONFIG environment variable will override all others. .SH AUTHOR .sp Ansible was originally written by Michael DeHaan. .SH COPYRIGHT .sp -Copyright © 2017 Red Hat, Inc | Ansible. -Ansible is released under the terms of the GPLv3 License. +Copyright © 2018 Red Hat, Inc | Ansible. +Ansible is released under the terms of the GPLv3 license. .SH SEE ALSO .sp \fBansible\fP (1), \fBansible\-config\fP (1), \fBansible\-console\fP (1), \fBansible\-doc\fP (1), \fBansible\-galaxy\fP (1), \fBansible\-playbook\fP (1), \fBansible\-pull\fP (1), \fBansible\-vault\fP (1) diff -Nru ansible-2.6.0/docs/man/man1/ansible-playbook.1 ansible-2.6.1/docs/man/man1/ansible-playbook.1 --- ansible-2.6.0/docs/man/man1/ansible-playbook.1 2018-06-28 23:31:39.000000000 +0000 +++ ansible-2.6.1/docs/man/man1/ansible-playbook.1 2018-07-05 19:55:23.000000000 +0000 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH ANSIBLE-PLAYBOOK 1 "" "Ansible 2.6.0" "System administration commands" +.TH ANSIBLE-PLAYBOOK 1 "" "Ansible 2.6.1" "System administration commands" .SH NAME ansible-playbook \- Runs Ansible playbooks, executing the defined tasks on the targeted hosts. . @@ -338,21 +338,27 @@ .sp The following environment variables may be specified. .sp -ANSIBLE_CONFIG \-\- Override the default ansible config file +ANSIBLE_CONFIG \-\- Specify override location for the ansible config file .sp Many more are available for most options in ansible.cfg +.sp +For a full list check \fI\%https://docs.ansible.com/\fP\&. or use the \fIansible\-config\fP command. .SH FILES .sp /etc/ansible/ansible.cfg \-\- Config file, used if present .sp ~/.ansible.cfg \-\- User config file, overrides the default config if present +.sp +\&./ansible.cfg \-\- Local config file (in current working direcotry) assumed to be \(aqproject specific\(aq and overrides the rest if present. +.sp +As mentioned above, the ANSIBLE_CONFIG environment variable will override all others. .SH AUTHOR .sp Ansible was originally written by Michael DeHaan. .SH COPYRIGHT .sp -Copyright © 2017 Red Hat, Inc | Ansible. -Ansible is released under the terms of the GPLv3 License. +Copyright © 2018 Red Hat, Inc | Ansible. +Ansible is released under the terms of the GPLv3 license. .SH SEE ALSO .sp \fBansible\fP (1), \fBansible\-config\fP (1), \fBansible\-console\fP (1), \fBansible\-doc\fP (1), \fBansible\-galaxy\fP (1), \fBansible\-inventory\fP (1), \fBansible\-pull\fP (1), \fBansible\-vault\fP (1) diff -Nru ansible-2.6.0/docs/man/man1/ansible-pull.1 ansible-2.6.1/docs/man/man1/ansible-pull.1 --- ansible-2.6.0/docs/man/man1/ansible-pull.1 2018-06-28 23:31:39.000000000 +0000 +++ ansible-2.6.1/docs/man/man1/ansible-pull.1 2018-07-05 19:55:24.000000000 +0000 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH ANSIBLE-PULL 1 "" "Ansible 2.6.0" "System administration commands" +.TH ANSIBLE-PULL 1 "" "Ansible 2.6.1" "System administration commands" .SH NAME ansible-pull \- pulls playbooks from a VCS repo and executes them for the local host . @@ -329,21 +329,27 @@ .sp The following environment variables may be specified. .sp -ANSIBLE_CONFIG \-\- Override the default ansible config file +ANSIBLE_CONFIG \-\- Specify override location for the ansible config file .sp Many more are available for most options in ansible.cfg +.sp +For a full list check \fI\%https://docs.ansible.com/\fP\&. or use the \fIansible\-config\fP command. .SH FILES .sp /etc/ansible/ansible.cfg \-\- Config file, used if present .sp ~/.ansible.cfg \-\- User config file, overrides the default config if present +.sp +\&./ansible.cfg \-\- Local config file (in current working direcotry) assumed to be \(aqproject specific\(aq and overrides the rest if present. +.sp +As mentioned above, the ANSIBLE_CONFIG environment variable will override all others. .SH AUTHOR .sp Ansible was originally written by Michael DeHaan. .SH COPYRIGHT .sp -Copyright © 2017 Red Hat, Inc | Ansible. -Ansible is released under the terms of the GPLv3 License. +Copyright © 2018 Red Hat, Inc | Ansible. +Ansible is released under the terms of the GPLv3 license. .SH SEE ALSO .sp \fBansible\fP (1), \fBansible\-config\fP (1), \fBansible\-console\fP (1), \fBansible\-doc\fP (1), \fBansible\-galaxy\fP (1), \fBansible\-inventory\fP (1), \fBansible\-playbook\fP (1), \fBansible\-vault\fP (1) diff -Nru ansible-2.6.0/docs/man/man1/ansible-vault.1 ansible-2.6.1/docs/man/man1/ansible-vault.1 --- ansible-2.6.0/docs/man/man1/ansible-vault.1 2018-06-28 23:31:39.000000000 +0000 +++ ansible-2.6.1/docs/man/man1/ansible-vault.1 2018-07-05 19:55:24.000000000 +0000 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH ANSIBLE-VAULT 1 "" "Ansible 2.6.0" "System administration commands" +.TH ANSIBLE-VAULT 1 "" "Ansible 2.6.1" "System administration commands" .SH NAME ansible-vault \- encryption/decryption utility for Ansible data files . @@ -215,21 +215,27 @@ .sp The following environment variables may be specified. .sp -ANSIBLE_CONFIG \-\- Override the default ansible config file +ANSIBLE_CONFIG \-\- Specify override location for the ansible config file .sp Many more are available for most options in ansible.cfg +.sp +For a full list check \fI\%https://docs.ansible.com/\fP\&. or use the \fIansible\-config\fP command. .SH FILES .sp /etc/ansible/ansible.cfg \-\- Config file, used if present .sp ~/.ansible.cfg \-\- User config file, overrides the default config if present +.sp +\&./ansible.cfg \-\- Local config file (in current working direcotry) assumed to be \(aqproject specific\(aq and overrides the rest if present. +.sp +As mentioned above, the ANSIBLE_CONFIG environment variable will override all others. .SH AUTHOR .sp Ansible was originally written by Michael DeHaan. .SH COPYRIGHT .sp -Copyright © 2017 Red Hat, Inc | Ansible. -Ansible is released under the terms of the GPLv3 License. +Copyright © 2018 Red Hat, Inc | Ansible. +Ansible is released under the terms of the GPLv3 license. .SH SEE ALSO .sp \fBansible\fP (1), \fBansible\-config\fP (1), \fBansible\-console\fP (1), \fBansible\-doc\fP (1), \fBansible\-galaxy\fP (1), \fBansible\-inventory\fP (1), \fBansible\-playbook\fP (1), \fBansible\-pull\fP (1), diff -Nru ansible-2.6.0/docs/templates/man.j2 ansible-2.6.1/docs/templates/man.j2 --- ansible-2.6.0/docs/templates/man.j2 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/templates/man.j2 2018-07-05 19:54:50.000000000 +0000 @@ -76,17 +76,18 @@ The following environment variables may be specified. {% if inventory %} -ANSIBLE_INVENTORY -- Override the default ansible inventory file +ANSIBLE_INVENTORY -- Override the default ansible inventory sources {% endif %} {% if library %} ANSIBLE_LIBRARY -- Override the default ansible module library path {% endif %} -ANSIBLE_CONFIG -- Override the default ansible config file +ANSIBLE_CONFIG -- Specify override location for the ansible config file Many more are available for most options in ansible.cfg +For a full list check https://docs.ansible.com/. or use the `ansible-config` command. FILES ----- @@ -99,6 +100,9 @@ ~/.ansible.cfg -- User config file, overrides the default config if present +./ansible.cfg -- Local config file (in current working direcotry) assumed to be 'project specific' and overrides the rest if present. + +As mentioned above, the ANSIBLE_CONFIG environment variable will override all others. AUTHOR ------ @@ -109,8 +113,8 @@ COPYRIGHT --------- -Copyright © 2017 Red Hat, Inc | Ansible. -Ansible is released under the terms of the GPLv3 License. +Copyright © 2018 Red Hat, Inc | Ansible. +Ansible is released under the terms of the GPLv3 license. SEE ALSO diff -Nru ansible-2.6.0/docs/templates/plugin.rst.j2 ansible-2.6.1/docs/templates/plugin.rst.j2 --- ansible-2.6.0/docs/templates/plugin.rst.j2 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/docs/templates/plugin.rst.j2 2018-07-05 19:54:50.000000000 +0000 @@ -118,6 +118,7 @@ {# parameter name with required and/or introduced label #} @{ key }@ + {% if value.get('type', None) %}
@{ value.type }@
{% endif %} {% if value.get('required', False) %}
required
{% endif %} {% if value.version_added %}
(added in @{value.version_added}@)
{% endif %} @@ -270,6 +271,7 @@ @{ key }@
@{ value.type }@
+ {% if value.version_added %}
(added in @{value.version_added}@)
{% endif %} @{ value.returned | html_ify }@ @@ -341,6 +343,7 @@ @{ key }@
@{ value.type }@
+ {% if value.version_added %}
(added in @{value.version_added}@)
{% endif %} @{ value.returned | html_ify }@ diff -Nru ansible-2.6.0/lib/ansible/cli/__init__.py ansible-2.6.1/lib/ansible/cli/__init__.py --- ansible-2.6.0/lib/ansible/cli/__init__.py 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/lib/ansible/cli/__init__.py 2018-07-05 19:54:50.000000000 +0000 @@ -664,7 +664,7 @@ ansible_versions[counter] = 0 try: ansible_versions[counter] = int(ansible_versions[counter]) - except: + except Exception: pass if len(ansible_versions) < 3: for counter in range(len(ansible_versions), 3): @@ -809,6 +809,12 @@ # the code, ensuring a consistent view of global variables variable_manager = VariableManager(loader=loader, inventory=inventory) + if hasattr(options, 'basedir'): + if options.basedir: + variable_manager.safe_basedir = True + else: + variable_manager.safe_basedir = True + # load vars from cli options variable_manager.extra_vars = load_extra_vars(loader=loader, options=options) variable_manager.options_vars = load_options_vars(options, CLI.version_info(gitinfo=False)) diff -Nru ansible-2.6.0/lib/ansible/config/manager.py ansible-2.6.1/lib/ansible/config/manager.py --- ansible-2.6.0/lib/ansible/config/manager.py 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/lib/ansible/config/manager.py 2018-07-05 19:54:50.000000000 +0000 @@ -6,6 +6,7 @@ import os import sys +import stat import tempfile from collections import namedtuple @@ -141,7 +142,7 @@ return value -def find_ini_config_file(): +def find_ini_config_file(warnings=None): ''' Load INI Config File order(first found is used): ENV, CWD, HOME, /etc/ansible ''' # FIXME: eventually deprecate ini configs @@ -151,7 +152,14 @@ if os.path.isdir(path0): path0 += "/ansible.cfg" try: - path1 = os.getcwd() + "/ansible.cfg" + path1 = os.getcwd() + perms1 = os.stat(path1) + if perms1.st_mode & stat.S_IWOTH: + if warnings is not None: + warnings.add("Ansible is in a world writable directory (%s), ignoring it as an ansible.cfg source." % to_text(path1)) + path1 = None + else: + path1 += "/ansible.cfg" except OSError: path1 = None path2 = unfrackpath("~/.ansible.cfg", follow=False) @@ -170,6 +178,7 @@ UNABLE = {} DEPRECATED = [] + WARNINGS = set() def __init__(self, conf_file=None, defs_file=None): @@ -195,7 +204,7 @@ if self._config_file is None: # set config using ini - self._config_file = find_ini_config_file() + self._config_file = find_ini_config_file(self.WARNINGS) # consume configuration if self._config_file: diff -Nru ansible-2.6.0/lib/ansible/constants.py ansible-2.6.1/lib/ansible/constants.py --- ansible-2.6.0/lib/ansible/constants.py 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/lib/ansible/constants.py 2018-07-05 19:54:50.000000000 +0000 @@ -17,6 +17,16 @@ from ansible.config.manager import ConfigManager, ensure_type, get_ini_config_value +def _warning(msg): + ''' display is not guaranteed here, nor it being the full class, but try anyways, fallback to sys.stderr.write ''' + try: + from __main__ import display + display.warning(msg) + except: + import sys + sys.stderr.write(' [WARNING] %s\n' % (msg)) + + def _deprecated(msg, version='2.8'): ''' display is not guaranteed here, nor it being the full class, but try anyways, fallback to sys.stderr.write ''' try: @@ -24,7 +34,7 @@ display.deprecated(msg, version=version) except: import sys - sys.stderr.write('[DEPRECATED] %s, to be removed in %s' % (msg, version)) + sys.stderr.write(' [DEPRECATED] %s, to be removed in %s\n' % (msg, version)) def mk_boolean(value): @@ -189,3 +199,6 @@ value = ensure_type(value, setting.type) set_constant(setting.name, value) + +for warn in config.WARNINGS: + _warning(warn) diff -Nru ansible-2.6.0/lib/ansible/inventory/manager.py ansible-2.6.1/lib/ansible/inventory/manager.py --- ansible-2.6.0/lib/ansible/inventory/manager.py 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/lib/ansible/inventory/manager.py 2018-07-05 19:54:50.000000000 +0000 @@ -183,7 +183,6 @@ for name in C.INVENTORY_ENABLED: plugin = inventory_loader.get(name) if plugin: - plugin.set_options() self._inventory_plugins.append(plugin) else: display.warning('Failed to load inventory plugin, skipping %s' % name) diff -Nru ansible-2.6.0/lib/ansible/modules/cloud/ovirt/README.rst ansible-2.6.1/lib/ansible/modules/cloud/ovirt/README.rst --- ansible-2.6.0/lib/ansible/modules/cloud/ovirt/README.rst 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/lib/ansible/modules/cloud/ovirt/README.rst 2018-07-05 19:54:50.000000000 +0000 @@ -47,7 +47,7 @@ ---------------------- Please read -`link `__, +`link `__, first to know what common properties, functions and features every module must have. @@ -210,7 +210,7 @@ ------- - Integration testing is currently done in oVirt's CI system - `here `__ + `here `__ and `here `__. - Please consider using these integrationtests if you create a new module or add a new feature to an existing diff -Nru ansible-2.6.0/lib/ansible/modules/files/file.py ansible-2.6.1/lib/ansible/modules/files/file.py --- ansible-2.6.0/lib/ansible/modules/files/file.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/modules/files/file.py 2018-07-05 19:54:50.000000000 +0000 @@ -322,6 +322,9 @@ b_path = to_bytes(path, errors='surrogate_or_strict') prev_state = get_state(b_path) + # Unfortunately, touch always changes the file because it updates file's timestamp + result = {'dest': path, 'changed': True} + if not module.check_mode: if prev_state == 'absent': # Create an empty file if the filename did not already exist @@ -369,8 +372,8 @@ os.remove(b_path) raise - # Unfortunately, touch always changes the file because it updates file's timestamp - return {'dest': path, 'changed': True, 'diff': diff} + result['diff'] = diff + return result def ensure_file_attributes(path, follow): diff -Nru ansible-2.6.0/lib/ansible/modules/net_tools/nsupdate.py ansible-2.6.1/lib/ansible/modules/net_tools/nsupdate.py --- ansible-2.6.0/lib/ansible/modules/net_tools/nsupdate.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/modules/net_tools/nsupdate.py 2018-07-05 19:54:50.000000000 +0000 @@ -53,7 +53,7 @@ key_algorithm: description: - Specify key algorithm used by C(key_secret). - choices: ['HMAC-MD5.SIG-ALG.REG.INT', 'hmac-md5', 'hmac-sha1', 'hmac-sha224', 'hmac-sha256', 'hamc-sha384', + choices: ['HMAC-MD5.SIG-ALG.REG.INT', 'hmac-md5', 'hmac-sha1', 'hmac-sha224', 'hmac-sha256', 'hmac-sha384', 'hmac-sha512'] default: 'hmac-md5' zone: @@ -322,7 +322,7 @@ def main(): tsig_algs = ['HMAC-MD5.SIG-ALG.REG.INT', 'hmac-md5', 'hmac-sha1', 'hmac-sha224', - 'hmac-sha256', 'hamc-sha384', 'hmac-sha512'] + 'hmac-sha256', 'hmac-sha384', 'hmac-sha512'] module = AnsibleModule( argument_spec=dict( diff -Nru ansible-2.6.0/lib/ansible/modules/network/files/net_get.py ansible-2.6.1/lib/ansible/modules/network/files/net_get.py --- ansible-2.6.0/lib/ansible/modules/network/files/net_get.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/modules/network/files/net_get.py 2018-07-05 19:54:50.000000000 +0000 @@ -18,9 +18,9 @@ module: net_get version_added: "2.6" author: "Deepak Agrawal (@dagrawal)" -short_description: Copy files from a network device to Ansible Controller +short_description: Copy a file from a network device to Ansible Controller description: - - This module provides functionlity to copy file from network device to + - This module provides functionality to copy file from network device to ansible controller. options: src: @@ -40,7 +40,7 @@ either be the full path on the Ansible control host or a relative path from the playbook or role root directory. default: - - Same filename as specified in src. The path will be playbook root + - Same filename as specified in I(src). The path will be playbook root or role root directory if playbook is part of a role. requirements: @@ -48,15 +48,15 @@ notes: - Some devices need specific configurations to be enabled before scp can work - These configuration should be pre-configued before using this module - e.g ios - C(ip scp server enable) - - User privileage to do scp on network device should be pre-configured - e.g. ios - need user privileage 15 by default for allowing scp - - Default destination of source file + These configuration should be pre-configured before using this module + e.g ios - C(ip scp server enable). + - User privilege to do scp on network device should be pre-configured + e.g. ios - need user privilege 15 by default for allowing scp. + - Default destination of source file. """ EXAMPLES = """ -- name: copy file from the network device to ansible controller +- name: copy file from the network device to Ansible controller net_get: src: running_cfg_ios1.txt diff -Nru ansible-2.6.0/lib/ansible/modules/network/files/net_put.py ansible-2.6.1/lib/ansible/modules/network/files/net_put.py --- ansible-2.6.0/lib/ansible/modules/network/files/net_put.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/modules/network/files/net_put.py 2018-07-05 19:54:50.000000000 +0000 @@ -18,9 +18,9 @@ module: net_put version_added: "2.6" author: "Deepak Agrawal (@dagrawal)" -short_description: Copy files from Ansibe controller to a network device +short_description: Copy a file from Ansible Controller to a network device description: - - This module provides functionlity to copy file from Ansible controller to + - This module provides functionality to copy file from Ansible controller to network devices. options: src: @@ -48,10 +48,10 @@ notes: - Some devices need specific configurations to be enabled before scp can work - These configuration should be pre-configued before using this module + These configuration should be pre-configured before using this module e.g ios - C(ip scp server enable). - - User privileage to do scp on network device should be pre-configured - e.g. ios - need user privileage 15 by default for allowing scp. + - User privilege to do scp on network device should be pre-configured + e.g. ios - need user privilege 15 by default for allowing scp. - Default destination of source file. """ diff -Nru ansible-2.6.0/lib/ansible/modules/network/junos/junos_config.py ansible-2.6.1/lib/ansible/modules/network/junos/junos_config.py --- ansible-2.6.0/lib/ansible/modules/network/junos/junos_config.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/modules/network/junos/junos_config.py 2018-07-05 19:54:50.000000000 +0000 @@ -63,8 +63,8 @@ statements on the remote device. confirm: description: - - The C(confirm) argument will configure a time out value for - the commit to be confirmed before it is automatically + - The C(confirm) argument will configure a time out value in minutes + for the commit to be confirmed before it is automatically rolled back. If the C(confirm) argument is set to False, this argument is silently ignored. If the value for this argument is set to 0, the commit is confirmed immediately. diff -Nru ansible-2.6.0/lib/ansible/modules/network/meraki/meraki_network.py ansible-2.6.1/lib/ansible/modules/network/meraki/meraki_network.py --- ansible-2.6.0/lib/ansible/modules/network/meraki/meraki_network.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/modules/network/meraki/meraki_network.py 2018-07-05 19:54:50.000000000 +0000 @@ -227,6 +227,16 @@ meraki.result['changed'] = True else: net = meraki.get_net(meraki.params['org_name'], meraki.params['net_name'], data=nets) + proposed = payload + if meraki.params['timezone']: + proposed['timeZone'] = meraki.params['timezone'] + else: + proposed['timeZone'] = 'America/Los_Angeles' + if not meraki.params['tags']: + proposed['tags'] = None + if not proposed['type']: + proposed['type'] = net['type'] + if meraki.is_update_required(net, payload): path = meraki.construct_path('update', net_id=meraki.get_net_id(net_name=meraki.params['net_name'], data=nets) diff -Nru ansible-2.6.0/lib/ansible/modules/system/pamd.py ansible-2.6.1/lib/ansible/modules/system/pamd.py --- ansible-2.6.0/lib/ansible/modules/system/pamd.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/modules/system/pamd.py 2018-07-05 19:54:50.000000000 +0000 @@ -290,6 +290,17 @@ self.prev = None self.next = None + @property + def is_valid(self): + if self.line == '': + return True + return False + + def validate(self): + if not self.is_valid: + return False, "Rule is not valid " + self.line + return True, "Rule is valid " + self.line + # Method to check if a rule matches the type, control and path. def matches(self, rule_type, rule_control, rule_path, rule_args=None): return False @@ -324,7 +335,7 @@ class PamdRule(PamdLine): valid_types = ['account', 'auth', 'password', 'session'] - valid_simple_controls = ['required', 'requisite', 'sufficicent', 'optional', 'include', 'substack'] + valid_simple_controls = ['required', 'requisite', 'sufficient', 'optional', 'include', 'substack'] valid_control_values = ['success', 'open_err', 'symbol_err', 'service_err', 'system_err', 'buf_err', 'perm_denied', 'auth_err', 'cred_insufficient', 'authinfo_unavail', 'user_unknown', 'maxtries', 'new_authtok_reqd', 'acct_expired', 'session_err', 'cred_unavail', @@ -405,15 +416,19 @@ return True return False + @property + def is_valid(self): + return self.validate()[0] + def validate(self): # Validate the rule type if self.rule_type not in PamdRule.valid_types: return False, "Rule type, " + self.rule_type + ", is not valid in rule " + self.line # Validate the rule control - if isinstance(self.rule_control, str) and self.rule_control not in PamdRule.valid_simple_controls: + if isinstance(self._control, str) and self.rule_control not in PamdRule.valid_simple_controls: return False, "Rule control, " + self.rule_control + ", is not valid in rule " + self.line - elif isinstance(self.rule_control, list): - for control in self.rule_control: + elif isinstance(self._control, list): + for control in self._control: value, action = control.split("=") if value not in PamdRule.valid_control_values: return False, "Rule control value, " + value + ", is not valid in rule " + self.line @@ -653,8 +668,8 @@ current_line = self._head while current_line is not None: - if not current_line.is_valid()[0]: - return current_line.is_valid() + if not current_line.validate()[0]: + return current_line.validate() current_line = current_line.next return True, "Module is valid" diff -Nru ansible-2.6.0/lib/ansible/modules/web_infrastructure/supervisorctl.py ansible-2.6.1/lib/ansible/modules/web_infrastructure/supervisorctl.py --- ansible-2.6.0/lib/ansible/modules/web_infrastructure/supervisorctl.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/modules/web_infrastructure/supervisorctl.py 2018-07-05 19:54:50.000000000 +0000 @@ -55,6 +55,7 @@ notes: - When C(state) = I(present), the module will call C(supervisorctl reread) then C(supervisorctl add) if the program/group does not exist. - When C(state) = I(restarted), the module will call C(supervisorctl update) then call C(supervisorctl restart). + - When C(state) = I(absent), the module will call C(supervisorctl reread) then C(supervisorctl remove) to remove the target program/group. requirements: [ "supervisorctl" ] author: - "Matt Wright (@mattupstate)" diff -Nru ansible-2.6.0/lib/ansible/modules/windows/win_domain.ps1 ansible-2.6.1/lib/ansible/modules/windows/win_domain.ps1 --- ansible-2.6.0/lib/ansible/modules/windows/win_domain.ps1 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/modules/windows/win_domain.ps1 2018-07-05 19:54:50.000000000 +0000 @@ -72,7 +72,7 @@ SafeModeAdministratorPassword=$sm_cred; Confirm=$false; SkipPreChecks=$true; - InstallDNS=$true; + InstallDns=$true; NoRebootOnCompletion=$true; } if ($database_path) { diff -Nru ansible-2.6.0/lib/ansible/modules/windows/win_group_membership.ps1 ansible-2.6.1/lib/ansible/modules/windows/win_group_membership.ps1 --- ansible-2.6.0/lib/ansible/modules/windows/win_group_membership.ps1 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/modules/windows/win_group_membership.ps1 2018-07-05 19:54:50.000000000 +0000 @@ -1,107 +1,36 @@ #!powershell -# (c) 2017, Andrew Saraceni -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright: (c) 2017, Andrew Saraceni +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# WANT_JSON -# POWERSHELL_COMMON +#Requires -Module Ansible.ModuleUtils.Legacy +#Requires -Module Ansible.ModuleUtils.SID $ErrorActionPreference = "Stop" function Test-GroupMember { <# .SYNOPSIS - Parse desired member into domain and username. + Return SID and consistent account name (DOMAIN\Username) format of desired member. Also, ensure member can be resolved/exists on the target system by checking its SID. .NOTES Returns a hashtable of the same type as returned from Get-GroupMember. - Accepts username (users, groups) and domains in the following formats: - - username - - .\username - - SERVERNAME\username - - NT AUTHORITY\username - - DOMAIN\username - - username@DOMAIN + Accepts username (users, groups) and domains in the formats accepted by Convert-ToSID. #> param( [String]$GroupMember ) $parsed_member = @{ - domain = $null - username = $null - combined = $null + sid = $null + account_name = $null } - # Split domain and account name into separate values - # '\' or '@' needs additional parsing, otherwise assume local computer + $sid = Convert-ToSID -account_name $GroupMember + $account_name = Convert-FromSID -sid $sid - if ($GroupMember -match "\\") { - # DOMAIN\username - $split_member = $GroupMember.Split("\") - - if ($split_member[0] -in @($env:COMPUTERNAME, ".")) { - # Local - $parsed_member.domain = $env:COMPUTERNAME - } - else { - # Domain or service (i.e. NT AUTHORITY) - $parsed_member.domain = $split_member[0] - } - $parsed_member.username = $split_member[1] - } - elseif ($GroupMember -match "@") { - # username@DOMAIN - $parsed_member.domain = $GroupMember.Split("@")[1] - $parsed_member.username = $GroupMember.Split("@")[0] - } - else { - # Local - $parsed_member.domain = $env:COMPUTERNAME - $parsed_member.username = $GroupMember - } - - if ($parsed_member.domain -match "\.") { - # Assume FQDN was passed - change to NetBIOS/short name for later ADSI membership comparisons - $netbios_name = (Get-CimInstance -ClassName Win32_NTDomain -Filter "DnsForestName = '$($parsed_member.domain)'").DomainName - - if (!$netbios_name) { - Fail-Json -obj $result -message "Could not resolve NetBIOS name for domain $($parsed_member.domain)" - } - $parsed_member.domain = $netbios_name - } - - # Set SID check arguments, and 'combined' for later comparison and output reporting - if ($parsed_member.domain -eq $env:COMPUTERNAME) { - $sid_check_args = @($parsed_member.username) - $parsed_member.combined = "{0}" -f $parsed_member.username - } - else { - $sid_check_args = @($parsed_member.domain, $parsed_member.username) - $parsed_member.combined = "{0}\{1}" -f $parsed_member.domain, $parsed_member.username - } - - try { - $user_object = New-Object -TypeName System.Security.Principal.NTAccount -ArgumentList $sid_check_args - $user_object.Translate([System.Security.Principal.SecurityIdentifier]) - } - catch { - Fail-Json -obj $result -message "Could not resolve group member $GroupMember" - } + $parsed_member.sid = $sid + $parsed_member.account_name = $account_name return $parsed_member } @@ -120,35 +49,28 @@ $members = @() $current_members = $Group.psbase.Invoke("Members") | ForEach-Object { - ([ADSI]$_).InvokeGet("ADsPath") + $bytes = ([ADSI]$_).InvokeGet("objectSID") + $sid = New-Object -TypeName Security.Principal.SecurityIdentifier -ArgumentList $bytes, 0 + $adspath = ([ADSI]$_).InvokeGet("ADsPath") + + @{sid = $sid; adspath = $adspath} | Write-Output } foreach ($current_member in $current_members) { $parsed_member = @{ - domain = $null - username = $null - combined = $null + sid = $current_member.sid + account_name = $null } - $rootless_adspath = $current_member.Replace("WinNT://", "") + $rootless_adspath = $current_member.adspath.Replace("WinNT://", "") $split_adspath = $rootless_adspath.Split("/") - if ($split_adspath -match $env:COMPUTERNAME) { - # Local - $parsed_member.domain = $env:COMPUTERNAME - $parsed_member.username = $split_adspath[-1] - $parsed_member.combined = $split_adspath[-1] - } - elseif ($split_adspath.Count -eq 1 -and $split_adspath[0] -like "S-1*") { - # Broken SID - $parsed_member.username = $split_adspath[0] - $parsed_member.combined = $split_adspath[0] - } - else { - # Domain or service (i.e. NT AUTHORITY) - $parsed_member.domain = $split_adspath[0] - $parsed_member.username = $split_adspath[1] - $parsed_member.combined = "{0}\{1}" -f $split_adspath[0], $split_adspath[1] + # Ignore lookup on a broken SID, and just return the SID as the account_name + if ($split_adspath.Count -eq 1 -and $split_adspath[0] -like "S-1*") { + $parsed_member.account_name = $split_adspath[0] + } else { + $account_name = Convert-FromSID -sid $current_member.sid + $parsed_member.account_name = $account_name } $members += $parsed_member @@ -170,8 +92,7 @@ } if ($state -eq "present") { $result.added = @() -} -elseif ($state -eq "absent") { +} elseif ($state -eq "absent") { $result.removed = @() } @@ -189,31 +110,29 @@ $user_in_group = $false foreach ($current_member in $current_members) { - if ($current_member.combined -eq $group_member.combined) { + if ($current_member.sid -eq $group_member.sid) { $user_in_group = $true break } } - $member_adspath = "WinNT://{0}/{1}" -f $group_member.domain, $group_member.username + $member_sid = "WinNT://{0}" -f $group_member.sid try { if ($state -eq "present" -and !$user_in_group) { if (!$check_mode) { - $group.Add($member_adspath) - $result.added += $group_member.combined + $group.Add($member_sid) + $result.added += $group_member.account_name } $result.changed = $true - } - elseif ($state -eq "absent" -and $user_in_group) { + } elseif ($state -eq "absent" -and $user_in_group) { if (!$check_mode) { - $group.Remove($member_adspath) - $result.removed += $group_member.combined + $group.Remove($member_sid) + $result.removed += $group_member.account_name } $result.changed = $true } - } - catch { + } catch { Fail-Json -obj $result -message $_.Exception.Message } } @@ -221,10 +140,9 @@ $final_members = Get-GroupMember -Group $group if ($final_members) { - $result.members = [Array]$final_members.combined -} -else { + $result.members = [Array]$final_members.account_name +} else { $result.members = @() } -Exit-Json -obj $result +Exit-Json -obj $result \ No newline at end of file diff -Nru ansible-2.6.0/lib/ansible/modules/windows/win_group_membership.py ansible-2.6.1/lib/ansible/modules/windows/win_group_membership.py --- ansible-2.6.0/lib/ansible/modules/windows/win_group_membership.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/modules/windows/win_group_membership.py 2018-07-05 19:54:50.000000000 +0000 @@ -4,9 +4,6 @@ # Copyright: (c) 2017, Andrew Saraceni # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# this is a windows documentation stub. actual code lives in the .ps1 -# file of the same name - ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} @@ -27,9 +24,11 @@ members: description: - A list of members to ensure are present/absent from the group. - - Accepts local users as username, .\username, and SERVERNAME\username. + - Accepts local users as .\username, and SERVERNAME\username. - Accepts domain users and groups as DOMAIN\username and username@DOMAIN. - Accepts service users as NT AUTHORITY\username. + - Accepts all local, domain and service user types as username, + favoring domain lookups when in a domain. required: yes state: description: @@ -69,7 +68,7 @@ empty if no members are added. returned: success and C(state) is C(present) type: list - sample: ["NewLocalAdmin", "DOMAIN\\TestUser"] + sample: ["SERVERNAME\\NewLocalAdmin", "DOMAIN\\TestUser"] removed: description: A list of members removed when C(state) is C(absent); this is empty if no members are removed. @@ -81,5 +80,5 @@ if the group contains no members. returned: success type: list - sample: ["DOMAIN\\TestUser", "NewLocalAdmin"] + sample: ["DOMAIN\\TestUser", "SERVERNAME\\NewLocalAdmin"] ''' diff -Nru ansible-2.6.0/lib/ansible/module_utils/ansible_release.py ansible-2.6.1/lib/ansible/module_utils/ansible_release.py --- ansible-2.6.0/lib/ansible/module_utils/ansible_release.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/module_utils/ansible_release.py 2018-07-05 19:54:50.000000000 +0000 @@ -19,6 +19,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -__version__ = '2.6.0' +__version__ = '2.6.1' __author__ = 'Ansible, Inc.' __codename__ = 'Heartbreaker' diff -Nru ansible-2.6.0/lib/ansible/module_utils/basic.py ansible-2.6.1/lib/ansible/module_utils/basic.py --- ansible-2.6.0/lib/ansible/module_utils/basic.py 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/lib/ansible/module_utils/basic.py 2018-07-05 19:54:50.000000000 +0000 @@ -173,7 +173,7 @@ ) from ansible.module_utils.six.moves import map, reduce, shlex_quote from ansible.module_utils._text import to_native, to_bytes, to_text -from ansible.module_utils.parsing.convert_bool import BOOLEANS_FALSE, BOOLEANS_TRUE, boolean +from ansible.module_utils.parsing.convert_bool import BOOLEANS, BOOLEANS_FALSE, BOOLEANS_TRUE, boolean PASSWORD_MATCH = re.compile(r'^(?:.+[-_\s])?pass(?:[-_\s]?(?:word|phrase|wrd|wd)?)(?:[-_\s].+)?$', re.I) diff -Nru ansible-2.6.0/lib/ansible/module_utils/network/meraki/meraki.py ansible-2.6.1/lib/ansible/module_utils/network/meraki/meraki.py --- ansible-2.6.0/lib/ansible/module_utils/network/meraki/meraki.py 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/lib/ansible/module_utils/network/meraki/meraki.py 2018-07-05 19:54:50.000000000 +0000 @@ -128,17 +128,6 @@ ignored_keys = ('id', 'organizationId') if not optional_ignore: optional_ignore = ('') - - # self.fail_json(msg="Update required check", original=original, proposed=proposed) - - for k, v in original.items(): - try: - if k not in ignored_keys and k not in optional_ignore: - if v != proposed[k]: - is_changed = True - except KeyError: - if v != '': - is_changed = True for k, v in proposed.items(): try: if k not in ignored_keys and k not in optional_ignore: diff -Nru ansible-2.6.0/lib/ansible/plugins/callback/grafana_annotations.py ansible-2.6.1/lib/ansible/plugins/callback/grafana_annotations.py --- ansible-2.6.0/lib/ansible/plugins/callback/grafana_annotations.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/plugins/callback/grafana_annotations.py 2018-07-05 19:54:50.000000000 +0000 @@ -48,13 +48,14 @@ - section: callback_grafana_annotations key: grafana_url validate_grafana_certs: - description: (bool) validate the SSL certificate of the Grafana server. (For HTTPS url) + description: validate the SSL certificate of the Grafana server. (For HTTPS url) env: - name: GRAFANA_VALIDATE_CERT ini: - section: callback_grafana_annotations key: validate_grafana_certs default: True + type: bool http_agent: description: The HTTP 'User-agent' value to set in HTTP requets. env: diff -Nru ansible-2.6.0/lib/ansible/plugins/inventory/script.py ansible-2.6.1/lib/ansible/plugins/inventory/script.py --- ansible-2.6.0/lib/ansible/plugins/inventory/script.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/plugins/inventory/script.py 2018-07-05 19:54:50.000000000 +0000 @@ -85,6 +85,7 @@ def parse(self, inventory, loader, path, cache=None): super(InventoryModule, self).parse(inventory, loader, path) + self.set_options() if cache is None: cache = self.get_option('cache') diff -Nru ansible-2.6.0/lib/ansible/plugins/inventory/yaml.py ansible-2.6.1/lib/ansible/plugins/inventory/yaml.py --- ansible-2.6.0/lib/ansible/plugins/inventory/yaml.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/plugins/inventory/yaml.py 2018-07-05 19:54:50.000000000 +0000 @@ -90,6 +90,7 @@ ''' parses the inventory file ''' super(InventoryModule, self).parse(inventory, loader, path) + self.set_options() try: data = self.loader.load_from_file(path, cache=False) diff -Nru ansible-2.6.0/lib/ansible/plugins/netconf/junos.py ansible-2.6.1/lib/ansible/plugins/netconf/junos.py --- ansible-2.6.0/lib/ansible/plugins/netconf/junos.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/plugins/netconf/junos.py 2018-07-05 19:54:50.000000000 +0000 @@ -32,7 +32,7 @@ from ncclient import manager from ncclient.operations import RPCError from ncclient.transport.errors import SSHUnknownHostError - from ncclient.xml_ import to_ele, to_xml, new_ele + from ncclient.xml_ import to_ele, to_xml, new_ele, sub_ele except ImportError: raise AnsibleError("ncclient is not installed") @@ -144,3 +144,37 @@ def reboot(self): """reboot the device""" return self.m.reboot().data_xml + + # Due to issue in ncclient commit() method for Juniper (https://github.com/ncclient/ncclient/issues/238) + # below commit() is a workaround which build's raw `commit-configuration` xml with required tags and uses + # ncclient generic rpc() method to execute rpc on remote host. + # Remove below method after the issue in ncclient is fixed. + @ensure_connected + def commit(self, confirmed=False, check=False, timeout=None, comment=None, synchronize=False, at_time=None): + """Commit the candidate configuration as the device's new current configuration. + Depends on the `:candidate` capability. + A confirmed commit (i.e. if *confirmed* is `True`) is reverted if there is no + followup commit within the *timeout* interval. If no timeout is specified the + confirm timeout defaults to 600 seconds (10 minutes). + A confirming commit may have the *confirmed* parameter but this is not required. + Depends on the `:confirmed-commit` capability. + :confirmed: whether this is a confirmed commit + :timeout: specifies the confirm timeout in seconds + """ + obj = new_ele('commit-configuration') + if confirmed: + sub_ele(obj, 'confirmed') + if check: + sub_ele(obj, 'check') + if synchronize: + sub_ele(obj, 'synchronize') + if at_time: + subele = sub_ele(obj, 'at-time') + subele.text = str(at_time) + if comment: + subele = sub_ele(obj, 'log') + subele.text = str(comment) + if timeout: + subele = sub_ele(obj, 'confirm-timeout') + subele.text = str(timeout) + return self.rpc(obj) diff -Nru ansible-2.6.0/lib/ansible/release.py ansible-2.6.1/lib/ansible/release.py --- ansible-2.6.0/lib/ansible/release.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/release.py 2018-07-05 19:54:50.000000000 +0000 @@ -19,6 +19,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -__version__ = '2.6.0' +__version__ = '2.6.1' __author__ = 'Ansible, Inc.' __codename__ = 'Heartbreaker' diff -Nru ansible-2.6.0/lib/ansible/vars/manager.py ansible-2.6.1/lib/ansible/vars/manager.py --- ansible-2.6.0/lib/ansible/vars/manager.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/lib/ansible/vars/manager.py 2018-07-05 19:54:50.000000000 +0000 @@ -90,6 +90,7 @@ self._hostvars = None self._omit_token = '__omit_place_holder__%s' % sha1(os.urandom(64)).hexdigest() self._options_vars = defaultdict(dict) + self.safe_basedir = False # bad cache plugin is not fatal error try: @@ -110,6 +111,7 @@ omit_token=self._omit_token, options_vars=self._options_vars, inventory=self._inventory, + safe_basedir=self.safe_basedir, ) return data @@ -123,6 +125,7 @@ self._omit_token = data.get('omit_token', '__omit_place_holder__%s' % sha1(os.urandom(64)).hexdigest()) self._inventory = data.get('inventory', None) self._options_vars = data.get('options_vars', dict()) + self.safe_basedir = data.get('safe_basedir', False) @property def extra_vars(self): @@ -183,7 +186,9 @@ ) # default for all cases - basedirs = [self._loader.get_basedir()] + basedirs = [] + if self.safe_basedir: # avoid adhoc/console loading cwd + basedirs = [self._loader.get_basedir()] if play: # first we compile any vars specified in defaults/main.yml diff -Nru ansible-2.6.0/Makefile ansible-2.6.1/Makefile --- ansible-2.6.0/Makefile 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/Makefile 2018-07-05 19:54:50.000000000 +0000 @@ -9,7 +9,7 @@ # make deb-src -------------- produce a DEB source # make deb ------------------ produce a DEB # make docs ----------------- rebuild the manpages (results are checked in) -# make tests ---------------- run the tests (see https://docs.ansible.com/ansible/dev_guide/testing_units.html for requirements) +# make tests ---------------- run the tests (see https://docs.ansible.com/ansible/devel/dev_guide/testing_units.html for requirements) # make pyflakes, make pep8 -- source code checks ######################################################## diff -Nru ansible-2.6.0/PKG-INFO ansible-2.6.1/PKG-INFO --- ansible-2.6.0/PKG-INFO 2018-06-28 23:31:44.000000000 +0000 +++ ansible-2.6.1/PKG-INFO 2018-07-05 19:55:28.000000000 +0000 @@ -1,15 +1,17 @@ Metadata-Version: 2.1 Name: ansible -Version: 2.6.0 +Version: 2.6.1 Summary: Radically simple IT automation Home-page: https://ansible.com/ Author: Ansible, Inc. Author-email: info@ansible.com License: GPLv3+ -Project-URL: Bug Tracker, https://github.com/ansible/ansible/issues -Project-URL: Documentation, https://docs.ansible.com/ansible/ -Project-URL: CI: Shippable, https://app.shippable.com/github/ansible/ansible Project-URL: Source Code, https://github.com/ansible/ansible +Project-URL: CI: Shippable, https://app.shippable.com/github/ansible/ansible +Project-URL: Code of Conduct, https://docs.ansible.com/ansible/latest/community/code_of_conduct.html +Project-URL: Documentation, https://docs.ansible.com/ansible/ +Project-URL: Bug Tracker, https://github.com/ansible/ansible/issues +Project-URL: Mailing lists, https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information Description: |PyPI version| |Docs badge| |Build Status| ******* diff -Nru ansible-2.6.0/setup.py ansible-2.6.1/setup.py --- ansible-2.6.0/setup.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/setup.py 2018-07-05 19:54:50.000000000 +0000 @@ -232,7 +232,9 @@ project_urls={ 'Bug Tracker': 'https://github.com/ansible/ansible/issues', 'CI: Shippable': 'https://app.shippable.com/github/ansible/ansible', + 'Code of Conduct': 'https://docs.ansible.com/ansible/latest/community/code_of_conduct.html', 'Documentation': 'https://docs.ansible.com/ansible/', + 'Mailing lists': 'https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information', 'Source Code': 'https://github.com/ansible/ansible', }, license='GPLv3+', diff -Nru ansible-2.6.0/test/integration/targets/meraki_network/tasks/main.yml ansible-2.6.1/test/integration/targets/meraki_network/tasks/main.yml --- ansible-2.6.0/test/integration/targets/meraki_network/tasks/main.yml 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/test/integration/targets/meraki_network/tasks/main.yml 2018-07-05 19:54:51.000000000 +0000 @@ -66,7 +66,18 @@ timezone: America/Chicago delegate_to: localhost register: create_net_wireless - + +- name: Create network with type wireless and check for idempotency + meraki_network: + auth_key: '{{ auth_key }}' + state: present + org_name: '{{test_org_name}}' + net_name: IntTestNetworkWireless + type: wireless + timezone: America/Chicago + delegate_to: localhost + register: create_net_wireless_idempotent + - name: Create network with type combined meraki_network: auth_key: '{{ auth_key }}' @@ -142,6 +153,7 @@ - '"IntTestNetworkSwitch" in create_net_switch.data.name' - '"IntTestNetworkSwitchOrgID" in create_net_switch_org_id.data.name' - '"IntTestNetworkWireless" in create_net_wireless.data.name' + - create_net_wireless_idempotent.changed == False - '"first_tag" in create_net_tag.data.tags' - '"second_tag" in create_net_tags.data.tags' - '"third_tag" in create_net_modified.data.tags' diff -Nru ansible-2.6.0/test/integration/targets/win_group_membership/tasks/main.yml ansible-2.6.1/test/integration/targets/win_group_membership/tasks/main.yml --- ansible-2.6.0/test/integration/targets/win_group_membership/tasks/main.yml 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/test/integration/targets/win_group_membership/tasks/main.yml 2018-07-05 19:54:51.000000000 +0000 @@ -6,11 +6,22 @@ name: WinGroupMembershipTest state: absent +- name: Remove potentially leftover test user + win_user: &wu_absent + name: WinTestUser + state: absent + - name: Add new test group win_group: name: WinGroupMembershipTest state: present +- name: Add new test user + win_user: + name: WinTestUser + password: "W1nGr0upM3mb3rsh1pT3$tP@$$w0rd" + state: present + - name: Run tests for win_group_membership block: @@ -18,14 +29,19 @@ import_tasks: tests.yml vars: win_local_group: WinGroupMembershipTest + win_local_user: WinTestUser in_check_mode: no - name: Test in check-mode import_tasks: tests.yml vars: win_local_group: WinGroupMembershipTest + win_local_user: WinTestUser in_check_mode: yes check_mode: yes - name: Remove test group win_group: *wg_absent + +- name: Remove test user + win_group: *wu_absent \ No newline at end of file diff -Nru ansible-2.6.0/test/integration/targets/win_group_membership/tasks/tests.yml ansible-2.6.1/test/integration/targets/win_group_membership/tasks/tests.yml --- ansible-2.6.0/test/integration/targets/win_group_membership/tasks/tests.yml 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/test/integration/targets/win_group_membership/tasks/tests.yml 2018-07-05 19:54:51.000000000 +0000 @@ -1,21 +1,7 @@ # Test code for win_group_membership -# (c) 2017, Andrew Saraceni -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright: (c) 2017, Andrew Saraceni +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - name: Look up built-in Administrator account name (-500 user whose domain == computer name) raw: $machine_sid = (Get-CimInstance Win32_UserAccount -Filter "Domain='$env:COMPUTERNAME'")[0].SID -replace '(S-1-5-21-\d+-\d+-\d+)-\d+', '$1'; (Get-CimInstance Win32_UserAccount -Filter "SID='$machine_sid-500'").Name @@ -30,7 +16,7 @@ name: "{{ win_local_group }}" members: - "{{ admin_account_name }}" - - Guest + - "{{ win_local_user }}" - NT AUTHORITY\SYSTEM - NT AUTHORITY\NETWORK SERVICE state: absent @@ -53,17 +39,7 @@ - FakeUser state: present register: add_fake_local_user - failed_when: add_fake_local_user.changed != false or add_fake_local_user.msg != "Could not resolve group member FakeUser" - - -- name: Add fake FQDN domain user - win_group_membership: - name: "{{ win_local_group }}" - members: - - FakeUser@domain.fake - state: present - register: add_fake_fqdn_domain_user - failed_when: add_fake_fqdn_domain_user.changed != false or add_fake_fqdn_domain_user.msg != "Could not resolve NetBIOS name for domain domain.fake" + failed_when: add_fake_local_user.changed != false or add_fake_local_user.msg is not search("account_name FakeUser is not a valid account, cannot get SID.*") - name: Add users to group @@ -71,7 +47,7 @@ name: "{{ win_local_group }}" members: - "{{ admin_account_name }}" - - Guest + - "{{ win_local_user }}" - NT AUTHORITY\SYSTEM state: present register: add_users_to_group @@ -80,8 +56,8 @@ assert: that: - add_users_to_group.changed == true - - add_users_to_group.added == [admin_account_name, "Guest", "NT AUTHORITY\\SYSTEM"] - - add_users_to_group.members == [admin_account_name, "Guest", "NT AUTHORITY\\SYSTEM"] + - add_users_to_group.added == ["{{ ansible_hostname }}\\{{ admin_account_name }}", "{{ ansible_hostname }}\\{{ win_local_user }}", "NT AUTHORITY\\SYSTEM"] + - add_users_to_group.members == ["{{ ansible_hostname }}\\{{ admin_account_name }}", "{{ ansible_hostname }}\\{{ win_local_user }}", "NT AUTHORITY\\SYSTEM"] when: not in_check_mode - name: Test add_users_to_group (check-mode) @@ -102,7 +78,7 @@ that: - add_users_to_group_again.changed == false - add_users_to_group_again.added == [] - - add_users_to_group_again.members == [admin_account_name, "Guest", "NT AUTHORITY\\SYSTEM"] + - add_users_to_group_again.members == ["{{ ansible_hostname }}\\{{ admin_account_name }}", "{{ ansible_hostname }}\\{{ win_local_user }}", "NT AUTHORITY\\SYSTEM"] when: not in_check_mode @@ -111,7 +87,7 @@ <<: *wgm_present members: - '{{ ansible_hostname }}\{{ admin_account_name }}' - - .\Guest + - '.\{{ win_local_user }}' register: add_different_syntax_users_to_group_again - name: Test add_different_syntax_users_to_group_again (normal mode) @@ -119,7 +95,7 @@ that: - add_different_syntax_users_to_group_again.changed == false - add_different_syntax_users_to_group_again.added == [] - - add_different_syntax_users_to_group_again.members == [admin_account_name, "Guest", "NT AUTHORITY\\SYSTEM"] + - add_different_syntax_users_to_group_again.members == ["{{ ansible_hostname }}\\{{ admin_account_name }}", "{{ ansible_hostname }}\\{{ win_local_user }}", "NT AUTHORITY\\SYSTEM"] when: not in_check_mode - name: Test add_different_syntax_users_to_group_again (check-mode) @@ -143,7 +119,7 @@ that: - add_another_user_to_group.changed == true - add_another_user_to_group.added == ["NT AUTHORITY\\NETWORK SERVICE"] - - add_another_user_to_group.members == [admin_account_name, "Guest", "NT AUTHORITY\\SYSTEM", "NT AUTHORITY\\NETWORK SERVICE"] + - add_another_user_to_group.members == ["{{ ansible_hostname }}\\{{ admin_account_name }}", "{{ ansible_hostname }}\\{{ win_local_user }}", "NT AUTHORITY\\SYSTEM", "NT AUTHORITY\\NETWORK SERVICE"] when: not in_check_mode - name: Test add_another_user_to_group (check-mode) @@ -164,7 +140,7 @@ that: - add_another_user_to_group_again.changed == false - add_another_user_to_group_again.added == [] - - add_another_user_to_group_again.members == [admin_account_name, "Guest", "NT AUTHORITY\\SYSTEM", "NT AUTHORITY\\NETWORK SERVICE"] + - add_another_user_to_group_again.members == ["{{ ansible_hostname }}\\{{ admin_account_name }}", "{{ ansible_hostname }}\\{{ win_local_user }}", "NT AUTHORITY\\SYSTEM", "NT AUTHORITY\\NETWORK SERVICE"] when: not in_check_mode @@ -178,7 +154,7 @@ assert: that: - remove_users_from_group.changed == true - - remove_users_from_group.removed == [admin_account_name, "Guest", "NT AUTHORITY\\SYSTEM"] + - remove_users_from_group.removed == ["{{ ansible_hostname }}\\{{ admin_account_name }}", "{{ ansible_hostname }}\\{{ win_local_user }}", "NT AUTHORITY\\SYSTEM"] - remove_users_from_group.members == ["NT AUTHORITY\\NETWORK SERVICE"] when: not in_check_mode @@ -209,7 +185,7 @@ <<: *wgm_absent members: - '{{ ansible_hostname }}\{{ admin_account_name }}' - - .\Guest + - '.\{{ win_local_user }}' register: remove_different_syntax_users_from_group_again - name: Test remove_different_syntax_users_from_group_again (normal mode) @@ -263,4 +239,4 @@ - remove_another_user_from_group_again.changed == false - remove_another_user_from_group_again.removed == [] - remove_another_user_from_group_again.members == [] - when: not in_check_mode + when: not in_check_mode \ No newline at end of file diff -Nru ansible-2.6.0/test/legacy/Makefile ansible-2.6.1/test/legacy/Makefile --- ansible-2.6.0/test/legacy/Makefile 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/test/legacy/Makefile 2018-07-05 19:54:51.000000000 +0000 @@ -1,7 +1,7 @@ # This Makefile is for legacy integration tests. # Most new tests should be implemented using ansible-test. # Existing tests are slowly being migrated to ansible-test. -# See: https://docs.ansible.com/ansible/dev_guide/testing_integration.html +# See: https://docs.ansible.com/ansible/devel/dev_guide/testing_integration.html TEST_DIR ?= ~/ansible_testing INVENTORY ?= inventory diff -Nru ansible-2.6.0/test/sanity/import/lib/ansible/module_utils/basic.py ansible-2.6.1/test/sanity/import/lib/ansible/module_utils/basic.py --- ansible-2.6.0/test/sanity/import/lib/ansible/module_utils/basic.py 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/test/sanity/import/lib/ansible/module_utils/basic.py 2018-07-05 19:54:50.000000000 +0000 @@ -173,7 +173,7 @@ ) from ansible.module_utils.six.moves import map, reduce, shlex_quote from ansible.module_utils._text import to_native, to_bytes, to_text -from ansible.module_utils.parsing.convert_bool import BOOLEANS_FALSE, BOOLEANS_TRUE, boolean +from ansible.module_utils.parsing.convert_bool import BOOLEANS, BOOLEANS_FALSE, BOOLEANS_TRUE, boolean PASSWORD_MATCH = re.compile(r'^(?:.+[-_\s])?pass(?:[-_\s]?(?:word|phrase|wrd|wd)?)(?:[-_\s].+)?$', re.I) diff -Nru ansible-2.6.0/test/sanity/import/lib/ansible/module_utils/network/meraki/meraki.py ansible-2.6.1/test/sanity/import/lib/ansible/module_utils/network/meraki/meraki.py --- ansible-2.6.0/test/sanity/import/lib/ansible/module_utils/network/meraki/meraki.py 2018-06-28 23:31:00.000000000 +0000 +++ ansible-2.6.1/test/sanity/import/lib/ansible/module_utils/network/meraki/meraki.py 2018-07-05 19:54:50.000000000 +0000 @@ -128,17 +128,6 @@ ignored_keys = ('id', 'organizationId') if not optional_ignore: optional_ignore = ('') - - # self.fail_json(msg="Update required check", original=original, proposed=proposed) - - for k, v in original.items(): - try: - if k not in ignored_keys and k not in optional_ignore: - if v != proposed[k]: - is_changed = True - except KeyError: - if v != '': - is_changed = True for k, v in proposed.items(): try: if k not in ignored_keys and k not in optional_ignore: diff -Nru ansible-2.6.0/test/sanity/validate-modules/schema.py ansible-2.6.1/test/sanity/validate-modules/schema.py --- ansible-2.6.0/test/sanity/validate-modules/schema.py 2018-06-28 23:31:01.000000000 +0000 +++ ansible-2.6.1/test/sanity/validate-modules/schema.py 2018-07-05 19:54:51.000000000 +0000 @@ -50,7 +50,7 @@ 'default': Any(None, float, int, bool, list, dict, *string_types), 'suboptions': Any(None, *list_dict_suboption_schema), # Note: Types are strings, not literal bools, such as True or False - 'type': Any(None, "bool") + 'type': Any(None, 'str', 'list', 'dict', 'bool', 'int', 'float', 'path', 'raw', 'jsonarg', 'json', 'bytes', 'bits') }, extra=PREVENT_EXTRA )