Compare commits

..

493 Commits

Author SHA1 Message Date
48b75cad8e New release v2.5.2 2018-04-26 10:39:44 -07:00
f529d75865 Update test-module (#39331)
Update test-module To use C.DEFAULT_LOCAL_TMP

(cherry picked from commit efdd92e1c0)
2018-04-26 08:56:00 -07:00
757fb5263f Backports to 2.5 of recent oVirt fixes (#38835)
* ovirt_disks: Fix fail condition for LUN disk

Fixes: https://github.com/ansible/ansible/issues/38661

* ovirt_host_networks: Fix removing of network attachments

* ovirt: Support removing unmanaged networks

* ovirt: FCP storage domains don't have to have target
2018-04-26 11:48:53 -04:00
cb27ed5a58 Winrm encoding in exception fix (#39333)
Exceptions need to use native strings.  We need to make sure we're
combining native strings with native strings.

(cherry picked from commit 0b643009db)

Add changelog entry for winrm encoding fix

(cherry picked from commit a5e33969b1)
2018-04-25 17:15:43 -07:00
75c5bc0ef7 Update the cloudstack test container reference.
(cherry picked from commit ac1fbbeabc)
2018-04-25 12:32:23 -07:00
d1e6b9a199 Reduce warnings (#39254) (#39323)
* fixes from 4b52a54e18
* leaves out the stub 2.6 porting guide
2018-04-25 13:50:28 -05:00
3bcca725fc Documentation for query/q. Fixes #38275 (#38558) (#39316)
(cherry picked from commit 476d1f818e)
2018-04-25 13:34:19 -05:00
b88161055f removes broken link to old module name (#39249) (#39307) 2018-04-25 11:37:27 -05:00
6458a6699b fixes broken links in Amazon module docs (#39248) (#39306)
(cherry picked from commit 0d38c80395)
2018-04-25 11:37:04 -05:00
7dbe964de5 We need to return virtual_facts after VMWare platform detection (#39149)
(cherry picked from commit 4f36d7965e)
2018-04-25 17:54:54 +05:30
6b4b2d5381 Add note about the dangers of ANSIBLE_DEBUG (#39261)
* Add note about the dangers of ANSIBLE_DEBUG

* Wording tweaks

(cherry picked from commit 72456711c3)
2018-04-24 20:44:09 -07:00
6c03fcdc0e Fix mysql-server install/upgrade on Ubuntu 16.04. (#39241)
* Fix mysql-server install/upgrade on Ubuntu 16.04.
* Prevent service restart in docker_secret test.

(cherry picked from commit 996f9c2467)
2018-04-24 13:37:25 -07:00
f0761660bb corrects links to 'list_of' pages (#39161) (#39230) 2018-04-24 12:27:26 -05:00
0e961f9ace k8s inventory: add pod nodeport (#39107)
Node port field is not populated on K8S pods, and it's certainely the most useful port to use in pod when we need to interact with ansible outside of the cluster
2018-04-24 18:32:10 +02:00
b372eb0947 adds index page for roadmaps to support internal links (#39109) (#39192)
* adds index page for roadmaps to support internal links

* includes only roadmaps index page in TOC

(cherry picked from commit becc2a0347)
2018-04-24 08:46:32 -05:00
6ab0d60e81 Ansible.ModuleUtils.FileUtil - backport 2.5 Add ability to test non file system provider paths (#39203)
* Ansible.ModuleUtils.FileUtil - Add ability to test non file system provider paths (#39200)


(cherry picked from commit b6afe6946d)

* Added changelog fragment
2018-04-24 13:17:43 +10:00
250d5b74fa Fix for win_get_url module (Fixes #39151) - 2.5 backport (#39207)
* Fix for win_get_url module (#39152)


(cherry picked from commit 0c96863ec6)

* Added changelog fragment
2018-04-24 12:46:40 +10:00
299861a302 remove slice filter as it already exists in jinja 2018-04-23 18:33:32 -04:00
ec8bce2051 Add changelog for #38302 2018-04-23 18:01:21 -04:00
711769db4f allow incremental update for vars in loop for set_fact/include_vars (#38302)
* fix set_fact/include_vars looping

* tests for all behaviours affected

* add tests with injection off/on

(cherry picked from commit 2afb1090b1)
2018-04-23 18:01:21 -04:00
1a96cd67d0 Internal refs (#39094)
* fixes community refs

* fixes appendix refs

* fixes scenario refs, keeps ACI guide link to devel

* fixes windows refs

* fixes user guide refs

* fixes dev guide refs

(cherry picked from commit bbfd6c6ab1)
2018-04-23 12:36:38 -07:00
ea765be993 Link fixes (#39038)
* fixes links on plugins pages

* fixes links in community pages

* fixes links in user guide

* adds anchors on playbooks pages

(cherry picked from commit 408e29cbd2)
2018-04-23 12:36:08 -07:00
3a0e8efc21 Fixes more rST errors (#39042)
* removes include, avoids duplicate label rST warnings

* reduces literal_block errors on playbooks_filters

* addresses TOC errors

* ref error on modules page

* trying ref for list_of_database_modules

(cherry picked from commit 64dcc7def0)
2018-04-23 12:35:37 -07:00
628492f8b3 avoids not-in-toc errors with :orphan:
(cherry picked from commit 0fef3f1b48)
2018-04-23 12:15:59 -07:00
cd7042857c Fix copy to only follow symlinks for files in the non-recursive case
Revert "**Temporary**"

This reverts commit 28b86b1148.

We don't need this now that copy has been fixed

(cherry picked from commit f332151f59)
2018-04-20 12:48:32 -07:00
94d40c8515 Fix ios and iosxr terminal prompt regex (#39063) (#39089)
Fixes #38732

Make matching leading newline for cli prompt
optional as there are cases when returned repsonse
for ios/iosx remote host doesn't have newline before
cli prompt.
(cherry picked from commit eebfa66c2b)
2018-04-20 23:49:19 +05:30
d6872a7b07 Backport #38747 for 2.5 - Block copy and reparenting improvements (#38829)
* Attempt 4: Prevent reparenting a block with itself (#38747)

* More concisely reparent, ensuring we don't go too shallow or too deep in this process. Fixes #38357

* More explicit reparenting, with a short circuit for a common case

* We need new_block to have a parent, otherwise we lose context with this approach

* Remove duplicate parent assignment

* Change callers of Block.copy to not use exclude_parent=True, when including the parent, exclude tasks

(cherry picked from commit f474195a3b)

* Add changelog for #38747
2018-04-20 12:31:56 -05:00
0bbb67383b Backport #38827 for 2.5 - Allow inheriting attrs from static parents (#38847)
* Skip self._parent on dynamic, defer to grandparent for attr lookup (#38827)

* Skip self._parent on dynamic, defer to grandparent for attr lookup

* Revert _inheritable

* Add tests for include inheritance from static blocks

Fixes #38037 #36194

(cherry picked from commit 354aa8d602)

* Add changelog for #38827
2018-04-20 11:45:28 -05:00
017f9a4876 Backport #37083 for 2.5 - IncludedFile comparison fix for free strategy (#38981)
* Consider parent also when comparing IncludedFile (#37083)

* Consider parent also when comparing IncludedFile

* Add new tests for IncludedFile and convert to pytest

(cherry picked from commit cdb79b0e3a)

* Add changelog for #37083
2018-04-20 11:42:30 -05:00
07ca962417 Backport #38884 for 2.5 - docker/docker-py guard (#38889)
* Error if docker and docker-py are simultaneously (#38884)

* Error if docker and docker-py are simultaneously installed over top of each other. Fixes #36125

* Remove duplicate installed

(cherry picked from commit 68e3ff80a7)

* Add changelog for #36470
2018-04-20 11:41:35 -05:00
3e54803fa4 Modules to link relatively to docs (#39081) (#39086)
* Modules to link relatively to docs

* consistency

(cherry picked from commit 9e028ab704)
2018-04-20 17:40:56 +01:00
0e98011f3a Clarify recursive
If recursive is set to yes, the module changes the attributes of the directory recursively even though state: directory is not set.

(cherry picked from commit 785c660432)
2018-04-19 12:09:54 -07:00
27ad5808e2 File module: correct description of "state" (#36327)
* File module: correct description of "state"

It was probably intended to say "intermediate subdirectories will be created" and not "immediate subdirectories will be created".

(cherry picked from commit a81c6668eb)
2018-04-19 12:05:14 -07:00
057ceb724d [file] Update description of state (#38451)
* [file] Update description of state

(cherry picked from commit af9d6aadf0)
2018-04-19 11:53:24 -07:00
0a7f2093a3 Update info on python support (#38855)
* Update the documentation to list Python 3 as official
* Add some reference targets for inventory variables so we can link to docs
* Add a platform FAQ section
  Populate it with

  * virtualenv info (previously on the python3 support page)
  * BSD (Link to the working with BSD page)
  * Solaris (Document how to work around the non-POSIX shell on some
    Solaris hosts)

  Fixes #21594

* Fix some refs in the release_and_maintenance document

* Fix unindent error in module template

Fix for the module/plugin template unintentionally unindented inside of
a raw block, leading to errors like:

ERROR: docs/docsite/rst/modules/redshift_facts_module.rst:289:0: Explicit markup ends without a blank line; unexpected unindent.

* Make wording for Solaris troubleshooting better.

(cherry picked from commit a08459a814)
2018-04-19 11:40:48 -07:00
a2df7ab75e adds FAQ TOC entry, links & examples to modules (#38706)
* adds FAQ TOC entry, links & examples to modules
* moves link to Notes, corrects examples

(cherry picked from commit 0ebc0b9e5a)
2018-04-19 11:40:05 -07:00
5ec8a19b79 Reinstate code of conduct to the community TOC; add links to code of conduct to a few conspicuous spots in the community guide. (#38501)
(cherry picked from commit 6454aedb44)
2018-04-19 11:39:14 -07:00
0e5c66ae72 Fixes for multiline doc descriotions breaking rst formatting
* strip whitespace to preserve indent level
* Make sure to indent subsequent lines of indentation

(cherry picked from commit 6ddc64bc7c)
2018-04-19 11:38:14 -07:00
0d83a0a888 make aef test more predictable
revert "Disable any_errors_fatal test."
This reverts commit 56189cc312.

fixes #38407

(cherry picked from commit 3c996d0f74)
2018-04-19 10:35:23 -07:00
cb5083b679 [cloud] Add AWSRetry to ec2_vpc_net and ec2_vpc_dhcp_option to stabilize return values (#36264) (#38975)
Fixes #36063, fixes #37323, fixes #36078 (#37354)

* Add AWSRetry when describing VPCs to help stabilize integration tests

* Add retry on create_tags because it is possible to reach this API call before the VPC is finished creating

* Increase delay and tries for ec2_vpc_net backoff

* Wait for DHCP option to be created in ec2_vpc_dhcp_option

* Wait for all modifications to the VPC

* Use the vpc_available waiter because is uses Filters

* Optimize retries to only occur if the functionality is available

Cherry-from:
- 16f8a993a0
- e9c57e732f
2018-04-19 09:28:57 -04:00
4d95f467f5 elb_target_group: use port parameter as default for target port (#38578) (#38992)
The docs suggest that `port` parameter is the default port upon
which targets listen. As such, a target need only provide a `Port`
key to override the default.

(cherry picked from commit dc09ddfbd5)
2018-04-19 09:25:24 -04:00
2b985137d7 [AWS cloudfront_distribution] Update minimum protocol versions (#38644) (#38990)
As per docs, the current set of values is

```
'SSLv3'|'TLSv1'|'TLSv1_2016'|'TLSv1.1_2016'|'TLSv1.2_2018'
```

Fixes #38642

(cherry picked from commit 6b970348b1)
2018-04-19 09:24:17 -04:00
16f48b539f ensure cli dir exists before saving files to it
(cherry picked from commit 28015d8ae9)
2018-04-18 20:53:40 -07:00
ed473d792b New release v2.5.1 2018-04-18 16:48:39 -07:00
3d0c00091d Clean up Grafana docs a bit (#37516)
* Clean up Grafana docs a bit

But more is needed, default values, missing choices, proper
descriptions, actual sentences :-)

* Remove validate-modules entries

(cherry picked from commit 51662acc6c)
2018-04-18 10:14:02 -07:00
2f64d6fcfb Ensure non ansilbe exceptions keep tracebacks (#37523)
(cherry picked from commit d9430b79f9)
2018-04-18 10:13:29 -07:00
20430f901e show changed in online
(cherry picked from commit 32cf79c044)
2018-04-18 10:13:04 -07:00
3362ad16b1 Load plugin config defs on first load only (fixes #37553) (#37584)
(cherry picked from commit 0d0bdbec62)
2018-04-18 10:11:36 -07:00
5ea8fa4052 Update porting_guide_2.5.rst (#37927)
The example regarding `include_*` is a bit unclear. First it seems like the v2.4 and v2.5 examples are the same. So I attempted to make the relevant change in the examples more obvious.

 label: docsite_pr
(cherry picked from commit 55fd3d62fb)
2018-04-18 10:08:58 -07:00
5e8aeddc85 remove unused optoins from inventory cli
fixes #31929

(cherry picked from commit 1b9879ccbf)
2018-04-18 10:08:58 -07:00
d4be7f772a Some more fixes for the docs :ref: disambiguation
The big one is that we needed to set plugin_type when we processed the by_support template.

Also added to list_of_CATEGORY_plugins page (which might not be used)
and corrected a place where I did module_name instead of name_module

(cherry picked from commit 8cdd75a09f)
2018-04-18 10:06:44 -07:00
07bb0407ad documented actual precedence (#38009)
fixes #22025
(cherry picked from commit 5ad13d66aa)
2018-04-18 10:02:37 -07:00
529d778015 docs: Document disabling diff on task level (#37998)
* docs: Document disabling diff on task level

Tasks that deal with secrets may leak sensitive information when
running in Check Mode. This change updates the documentation explaining
that the diff can be deactivated on task level.

The feature was requested in #14860 and got introduced in Ansible 2.4
with #28581.

* Updated for clarity

(cherry picked from commit 9cca9a9c10)
2018-04-18 10:01:55 -07:00
5fc9f3d219 module_common: handle None value for templar (#36651)
* module_common: set required parameter templar

Fix the following error (related to b455901):

  $ ./hacking/test-module -m ./lib/ansible/modules/system/ping.py -I ansible_python_interpreter=/usr/bin/python
  Traceback (most recent call last):
    File "./hacking/test-module", line 268, in <module>
      main()
    File "./hacking/test-module", line 249, in main
      (modfile, modname, module_style) = boilerplate_module(options.module_path, options.module_args, interpreters, options.check, options.filename)
    File "./hacking/test-module", line 152, in boilerplate_module
      task_vars=task_vars
    File "ansible/lib/ansible/executor/module_common.py", line 910, in modify_module
      environment=environment)
    File "ansible/lib/ansible/executor/module_common.py", line 736, in _find_module_utils
      shebang, interpreter = _get_shebang(u'/usr/bin/python', task_vars, templar)
    File "ansible/lib/ansible/executor/module_common.py", line 452, in _get_shebang
      interpreter = templar.template(task_vars[interpreter_config].strip())
  AttributeError: 'NoneType' object has no attribute 'template'

* module_common.modify_module: templar is required

(cherry picked from commit 7908f78fa6)
2018-04-18 10:01:31 -07:00
8473765ae6 yaml callback fails on python3
When the URI module returns complex JSON objects, the YAML callback
fails while trying to represent these objects.  The problem arises
because the filter method returns an iterator in Python 3, rather than a
str object.  Therefore, the str method expandtabs() is not available,
and the callback fails with the following error:

[WARNING]: Failure using method (v2_runner_on_failed) in callback plugin (<ansible.plugins.callback.yaml.CallbackModule object at 0x7f7c7ed8aa20>): 'filter' object has no attribute 'expandtabs'

Issue can be replicated by running this playbook:

- hosts: localhost
  gather_facts: false
  tasks:
    - uri:
        url: https://jsonplaceholder.typicode.com/posts

ansible-playbook tmp.yml -v

(cherry picked from commit 5839f07e0f)
2018-04-18 10:00:44 -07:00
b37facb234 fix set options in callbacks for foreman
(cherry picked from commit 082b03c829)
2018-04-18 10:00:07 -07:00
d31d84cfa3 avoid caching invetnory sources in loader (#38242)
* fix inventory plugin source caching

 - avoid caching invetnory sources in loader in base
 - same fix for yaml plugin
 - idem for 'auto' plugin

fixes #37162

* fix mock dataloader func sig

(cherry picked from commit 886c4edfb9)
2018-04-18 09:59:35 -07:00
a3798d9b62 fix bug in modules/system/user.py (#37552)
for freebsd tool "pw" use date not days in "modify_user"
(cherry picked from commit d512bed495)
2018-04-18 09:57:56 -07:00
923015d9d7 Set raw=True when reading passwords from ConfigParser files. (#35582)
* Set `raw=True` when reading passwords from ConfigParser files.

The assumption is that no one is actually doing interpolation on the
password value, even if they may for other configuration values, and
passwords are far more likely to contain '%'.

* Add vmware_inventory as well.

(cherry picked from commit 15b6ec66bb)
2018-04-18 09:41:16 -07:00
0852ea6dc0 clarify os x password with user module (#38344)
also removed pointer to non existing example

fixes #36427
(cherry picked from commit f630d420c6)
2018-04-18 09:40:44 -07:00
dfbba6e75b Reduce recursion within group methods
This offers an optimization that allows loading larger
inventories of various structure by improving the
scaling laws involved for adding hosts and groups.

The primary speed benefit is the elimination of duplicate
recusion from traversing converging paths.

(cherry picked from commit 153c9bd539)
2018-04-18 09:32:30 -07:00
cf1cb61efb clarifying docs with first_found (#36951)
better examlpes as this was never really a task loop, but contained inside the lookup itself
(cherry picked from commit 42d15671d0)
2018-04-18 09:31:30 -07:00
00848dff17 made missing cli tools non fatal (#37194)
* made missing cli tools non fatal

* remove bare exceptions

these shoudl not be there as they can prevent 'wanted' exits

(cherry picked from commit 0c2e7fd841)
2018-04-18 09:24:58 -07:00
f670602448 Fix places in docs that refer to modules without namespace
We've namespaced all plugin docs.  Change the docs to reflect that

(cherry picked from commit 9faf7b949e)
2018-04-18 08:48:41 -07:00
751ae4f4a9 playbooks_variables.rst: fix facts code-block (#38520)
(cherry picked from commit 5297eac46d)
2018-04-18 08:44:27 -07:00
145f42eba3 fix displaying group vars in graph
(cherry picked from commit 265d838ec9)
2018-04-18 08:34:24 -07:00
003c52f1ef Modules that have a link to their own deprecated section need to use a different link syntax (#38697)
The :ref: syntax is for linking to targets which are defined for the
whole document tree.  `link`_ is for linking to targets which are inside
of the document.  We want the latter for deprecated sections because
otherwise we'd have to create namespaced link targets for them.

Also fix expansion of version a deprecated module will be removed in
(cherry picked from commit 25523666ce)
2018-04-18 08:28:59 -07:00
61e3f32f81 Auth method for the k8s lookup plugin now matches other modules (#37533) (#37618) 2018-04-18 08:08:15 -07:00
456fe2add1 nxos bugfixes cherry-pick (#38950)
* fix nxos_ntp_options (#38695)

(cherry picked from commit 1d975bdc93)

* fix ntp_auth issues (#38824)

(cherry picked from commit a372142434)

* update nxos changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-04-18 09:59:39 -04:00
9a7da8d3da add instanceUuid (also called PersistentId) in vmware utils (#38870)
(cherry picked from commit 0cdba9ff70)
2018-04-18 17:41:15 +05:30
0fede2ba60 Tolerate win line endings on module load 2.5 (#38919)
* Tolerate win line endings on windows module_util load (#37291)

* tolerate windows line endings when loading windows module utils.  Helpful for old custom windows modules.

* add test modules to demonstrate win line ending module load behaviour.

* attempt to fix sanity check failures

* pep8 fix

* explict skip of test modules from shebang check (core modules must still have expected unix style line endings)

* switch to rstrip() following core team meeting feedback

(cherry picked from commit ad94d03ba1)

* Added changelog fragment

* Added ignore rules to older sanity tests

* Removed test files due to old shebang not being possible without bigger change
2018-04-18 15:25:18 +10:00
4b55ecc825 Update win_certificate_store.py (#38860) (#38927)
* Update win_certificate_store.py

Improvements to describe the different destination stores.

+label: docsite_pr

* Update win_certificate_store.py

Whole line needs to be quoted -- lingfish YAML fail.

(cherry picked from commit d684c51815)
2018-04-18 14:31:09 +10:00
8606fa0431 Update httptester container reference.
(cherry picked from commit 35748e5228)
2018-04-17 21:26:02 -07:00
893807bfc9 [WIP] disambiguating autogenerated module docs attempted fix of #38439. (#38890)
Disambiguates autogenerated module docs - fixes #38439.

(cherry picked from commit c97e508806)
2018-04-17 18:49:27 -07:00
4091ab479f Add alias's as a :ref: target for modules
This is especially important for deprecated modules as we want to link
to those in porting guides and such.

(cherry picked from commit 8f1b5fc47b)
2018-04-17 18:49:20 -07:00
10aa5a37aa win_regedit: backport 2.5 stabilise tests (#38918)
* win_regedit: stabilise tests (#38912)

(cherry picked from commit 77ef4802f0)

* Added changelog fragment
2018-04-18 08:45:00 +10:00
9178def456 Fix typo in windows_faq.rst (#38864) (#38916)
Fix typo in `python-pip` packet name.
+label: docsite_pr

(cherry picked from commit 92f4065157)
2018-04-18 08:06:42 +10:00
2b73a5b69f Restore docker_secret test on RHEL.
(cherry picked from commit 57f1298074)
2018-04-17 13:57:05 -07:00
938625add7 Disable failing fortios_* tests. 2018-04-17 11:55:41 -07:00
867bc8967e Upgrade PYPI badge to point to new Warehouse site
It should become default quite soon:
https://github.com/pypa/warehouse/milestone/1
2018-04-17 16:03:11 +02:00
ae79eef0b2 Add changelog entry for grafana base64 port
(cherry picked from commit f5cc4acc53)
2018-04-17 06:52:56 -07:00
24c1e2ed0a Fix deprecated warnings
(cherry picked from commit 98fb47b061)
2018-04-17 06:52:50 -07:00
f5befa5ab4 Correct formatting (#38874) (#38877)
(cherry picked from commit 3d3781db57)
2018-04-17 13:22:43 +01:00
507423f111 issue:38321 fix onyx_config module failed while using python = 3.5 (#38343) (#38869)
* issue:38321 fix onyx_config module failed while using python = 3.5 (#38343)

(cherry picked from commit 0d79268a6d)

* changelog
2018-04-17 13:16:03 +01:00
bb50c65769 VMware: handle permission denied while reading facts (#38868)
This fix adds exception handling which is raised when user
does not have correct set of permissions/privileges to read virtual machine
facts especially host system configuration.

Fixes: #37056

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit efc3f4f824)
2018-04-17 16:20:46 +05:30
5f8758d6a3 Use correct esxi host variable in vmware_cfg_backup
Fixed bug where hostname could not be found and minor documentation changes.

(cherry picked from commit 8f5320435f)
2018-04-17 15:20:09 +05:30
d9436f18f5 VMware: correct documentation for datacenter
This fixes documentation related to datacenter in vmware_guest_find
module.

Fixes: #38290

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 2367130ba3)
2018-04-17 15:07:05 +05:30
95386d6075 Correct module name in vcenter_license.py (#37672) (#37728)
Module name should be vcenter_license not vmware_license.

(cherry picked from commit 0214a85382)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-17 15:01:00 +05:30
8f2d46ecf8 Add supported connection in junos module documentation (#38813) (#38865)
* Add supported connection in junos module documentation

Add supported connection type in junos module doucmentation.

* adds link to platform docs

* makes recommended connection a code snippet

* does this fix banner and command?

* does this fix the rest of the errors?

(cherry picked from commit 67d561b0c8)
2018-04-17 11:58:40 +05:30
897eab8d04 win_updates: fix when failed is not present in output (#38856) (#38857)
(cherry picked from commit f1c16438c1)
2018-04-17 11:39:45 +10:00
ce1913a76f Use new vcenter simulator container location.
(cherry picked from commit 1d5c933ecf)
2018-04-16 15:17:08 -07:00
4d7e174748 centralize doc/config plugin lists (#38775)
* centralize doc/config plugin lists

also update list for generation in docsite
added note to ensure they are in sync

* updated shell page to list plugins

added some more docs hinting at plugins being configurable

* fix edit link for plugins

(cherry picked from commit bdbb89378f)
2018-04-16 13:02:29 -07:00
b523910269 add changelog 2018-04-16 11:09:30 -04:00
23fd9bb328 better handling of diff key types in compose
also made separator configurable
fixed some exception types
better error msgs

(cherry picked from commit c679186f17)
2018-04-16 11:09:30 -04:00
1684823196 Use correct action in warning about missing name (#38481)
(cherry picked from commit fd96bcd22f)
2018-04-16 14:42:11 +02:00
829f9fda7a doc changes for backup option of network _config modules (#38797) 2018-04-16 12:30:05 +05:30
6030535917 VMware: Set default network type as 'dhcp' (#38755)
If user does not specify any network type then set network type
to dhcp. There are additional checks around 'ip', 'netmask' and
'type' in network spec.

Fixes: #38466

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 9b139baacb)
2018-04-14 21:58:49 +05:30
30d338f664 Add details to see decrypted vault value (#37341) (#38746)
* Improves ansible-vault section of network getting started
(cherry picked from commit 521ea56e77)
2018-04-13 17:54:34 +01:00
0fdfb27e0f corrects Junos network_cli example & variables (#38601) (#38705)
* corrects Junos network_cli example & variables

* vdacosta feedback, thanks
2018-04-13 16:43:42 +01:00
1de0515af9 nmcli: change default value of autoconnect (#38686)
There was discrepancy between documentation and actual code.

Fixes: #38671

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit f1cd254265)
2018-04-13 11:28:39 -04:00
e8469a5117 inaugural Network FAQ (#38359) (#38703)
(cherry picked from commit ea99cf3231)
2018-04-13 09:00:57 -05:00
0143aa9416 Fix in eos get_config cliconf api (#38682) (#38720)
If format is passed as None to get_config api, wrong command is
genereted ie. `show running-configuration | None | section interface`.
Add format type in command only if format value is either not `text`
or  `None`.
(cherry picked from commit 88662d0c56)

Update changelog
2018-04-13 15:55:14 +05:30
fdcbcf313a Suppress a UserWarning about unknown dist option 2018-04-13 00:59:32 +02:00
7993dc90e5 Refactor setup.py helper code 2018-04-13 00:59:32 +02:00
34861a3524 Shield setup module from accidental setup exec
This might happen when third-parties like analizers import this
module for testing purposes.
2018-04-13 00:59:32 +02:00
c1c65168d5 Update python requirements in distribution meta
This has been discussed during #38413 review, but got missed.
2018-04-13 00:59:32 +02:00
9011a0abc6 Add a list or extra URLs to distribution metadata
This should enable Warehouse PYPI implementation pypa/warehouse#3604
to pull data from GitHub and show it on the project page.
2018-04-13 00:59:32 +02:00
5f98ee878e Give hint when lookup fails on one element list (#38406) (#38480)
(cherry picked from commit 81a8c42115)
2018-04-12 20:54:04 +02:00
3a6f93c190 fixed documentation to include esxi host (#38668) (#38673)
(cherry picked from commit c0243a8a31)
2018-04-12 11:42:37 -04:00
0ce544c29b win_setup: backport 2.5 fix for machine sid to work in domains with lots of users (#38659)
* win_setup: fix for machine sid to work in domains with lots of users (#38646)

(cherry picked from commit 2fc3ac3516)

* Added changelog fragment
2018-04-12 20:30:34 +10:00
5f8812ec23 minor typo fix https://github.com/ansible/ansible/pull/38589 2018-04-12 19:06:36 +10:00
86f5a82457 Use a temp directory that is more likely to exist (#38645)
`env:SystemDrive\temp` does not necessarily exist

`env:temp` is much more likely to exist. Use that

(cherry picked from commit 4ba29c8bf1)
2018-04-12 19:02:49 +10:00
955ef020ef Add troubleshooting URL for persistent socket path related issue (#38542) (#38577)
* Add troubleshooting URL for persistent socket path related issue

socket path timeout related error messages are not displayed on the
console as the ansible-connection process does not have access to it.
Until this is fixed need to point to troubleshooting URL so that
users can take corrective actions.

* Fix CI issue

* Update changelog fragments
(cherry picked from commit 53d3e7e306)
2018-04-12 10:43:02 +05:30
4b436847fc Add changelog entry 2018-04-11 17:54:59 -04:00
78484137c0 restrore showing stderr on script success (#38177)
* restore showing stderr on script success

accidentally removed during transition to plugin, with toggle for those
who prefer the quiet way

fixes #33776

* stderr display if no other errors capture first
* fixed issue with error encoding

(cherry picked from commit eef70d028f)
2018-04-11 17:54:59 -04:00
0f524a1632 Fix edgeos_config: {backup: yes} (#37619) (#37733)
* Fix edgeos_config: {backup: yes}

* Add actual plugin copy

(cherry picked from commit 6aed74a97d)
2018-04-11 17:50:13 -04:00
27f2653c7f Update installation docs for RHEL based distributions. (#38053)
Upstream rpms are no longer in Extras but EPEL as well as releases.ansible.com.
Add instructions for adding Ansible Engine repo to RHEL.
2018-04-11 16:28:09 -04:00
48a4b00ade When I rebased the README as rst PR, I missed a few changes.
(cherry picked from commit 98a6827be0)
2018-04-11 13:26:41 -07:00
9fd122d7be Add docs badge to README
(cherry picked from commit 2a55c64da9)
2018-04-11 11:58:09 -07:00
28651a85ab Convert README from Markdown to ReStructured Text and use as longdesc (#22330)
* Convert README from Markdown to ReStructured Text and use as longdesc

Discussion in #13758 led to deciding to switch README to rst and having
setup.py consume it as the long_description.

* Fix long string in setup.py for pep8 compliance

* Open README.rst as read-only

* Update usages of root README.md to README.rst

Unsure about the file ./packaging/debian/docs as it (only) contains the
text README.md. I believe it's referencing ./packaging/debian/README.md
but maybe someone who knows debian packaging could review it?

* Pick up fixes that had been merged into README.md after the initial conversion to rst

(cherry picked from commit 7afa34ae8a)
2018-04-11 11:57:24 -07:00
430195f0f1 README.md was renamed. Fix deb build reference to the README
(cherry picked from commit 19a5f96a1a)
2018-04-11 11:23:44 -07:00
91c8a8dccc nxos_igmp_snooping fix cherry-pick (#38596)
* fix nxos_igmp_snooping issues (#38566)

* fix nxos_igmp_snooping issue

* shippable error fix

(cherry picked from commit ed42331105)

* update nxos changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-04-11 12:47:33 -04:00
8b8455523d Fall back to ValueError if JSONDecodeError is not available (#38276) (#38423)
(cherry picked from commit e05cad785e)
2018-04-11 09:01:47 -04:00
23e57fe095 Add junos connection type check (#38527) (#38579)
junos_netconf works only with connection=network_cli
Add check to report appropriate error if any other
connection type is used.
(cherry picked from commit 16c2d3717e)

Update Changelog fragments
2018-04-11 14:03:07 +05:30
96efaa3ff3 Explicitly exclude W504 (#38539) (#38550)
pycodestyle 2.4 has changed the default for W504
(cherry picked from commit 38491fe93d)
2018-04-10 21:01:26 +01:00
0a441eb2f1 Bkprt py3 consul kv (#37802)
* consul_kv: decodes kv values from Consul to utf-8 (#35894)

* Decodes kv values from Consul to utf-8.

* Switches to using module utils to perform text decoding.

* Adds self to authors list to help community maintenance.

(cherry picked from commit a4a2b4a381)

* Add a changelog fragment for consul_kv python3 fix
2018-04-10 10:03:30 -07:00
bbcb7d9118 Cherry pick 35568 (#38347)
* eos_vlan: Modified logic to allow for more than 6 interfaces to be assigned to … (#35568)

* Modified logic to allow for more than 6 interfaces to be assigned to a vlan

* arista output to json.  removing logic for string size.

(cherry picked from commit 99627ab99d)

* Add changelog fragment
2018-04-10 18:57:56 +02:00
7f55954cc1 nxos_igmp and nxos_hsrp fix (#38513)
* fix nxos_igmp issues (#38496)

(cherry picked from commit 361437b042)

* fix nxos_hsrp issues (#38410)

* fix nxos_hsrp issues

* shippable fix

* add examples for md5 auth

(cherry picked from commit dabe5e6d07)

* update changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-04-10 01:51:41 -04:00
0525d4cf9d winrm: backport 2.5 added flag handler for kinit to request forwardable ticket when delegation is set (#38508)
* winrm: added flag handler for kinit to request forwardable ticket when delegation is set (#37815)

(cherry picked from commit 22f2388ef1)

* Added changelog fragment
2018-04-10 14:24:21 +10:00
7e621b3dbe win_uri: backport 2.5 fix for when status codes are provided as a comma separated list (#38509)
* fix for when status codes are provided as a comma separated list (#38080)

* fix for when status codes are provided as an array of strings

* convert status codes to int, additional tests

(cherry picked from commit c38617a736)

* Added changelog fragment
2018-04-10 14:24:00 +10:00
3ac6c6ebd9 win_exec_wrapper: fix tests after recent change (#38504) (#38506)
(cherry picked from commit 0d374f28d2)
2018-04-10 11:31:03 +10:00
31e28a04a5 Fix 'New Vault password' on vault 'edit' (#35923) (#38003)
* Fix 'New Vault password' on vault 'edit'

ffe0ddea96 introduce a
change on 'ansible-vault edit' that tried to check
for --encrypt-vault-id in that mode. But '--encrypt-vault-id'
is not intended for 'edit' since the 'edit' should always
reuse the vault secret that was used to decrypt the text.

Change cli to not check for --encrypt-vault-id on 'edit'.

VaultLib.decrypt_and_get_vault_id() was change to return
the vault secret used to decrypt (in addition to vault_id
and the plaintext).

VaultEditor.edit_file() will now use 'vault_secret_used'
as returned from decrypt_and_get_vault_id() so that
an edited file always gets reencrypted with the same
secret, regardless of any vault id configuration or
cli options.

Fixes #35834

(cherry picked from commit 6e737c8cb6)
2018-04-09 14:57:34 -07:00
b9ccac8550 Fix incorrect RN used in module (#38249)
This is backported from devel as this bug makes the module fail for VMM
domains.
2018-04-09 14:46:59 -07:00
9d0ebfdea6 ovirt: Cherry picks of recent fixes to devel branch (#38341)
* ovirt_host_networks: Fix idempotency

* ovirt_hosts: Fix failed_state after PM fence

* ovirt_host_networks: Fix of bond assignment (#38054)

* ovirt_host_networks: Fix of bond assignment

* ovirt_host_networks: Fix bond modes

* ovirt_host_networks: Fix incorrect prefix documentation

* ovrit_cluster: fix for CPU arch entity #37425 (#37436)

* ovrit_cluster: fix for CPU arch entity #37425

* Corrected Indentation

* Condition to check if `architecture` is defined
2018-04-09 14:35:50 -07:00
9bb2a36289 win_updates: backport 2.5 handle failure on module load (#38498)
* win_updates: handle if module failed to run (#38363)

(cherry picked from commit ccc56e138a)

* Added changelog fragment
2018-04-10 06:39:09 +10:00
38a13f41cd powershell: 2.5 backport display non-ascii characters in command outputs (#38365)
* powershell: display non-ascii characters in command outputs (#37229)

(cherry picked from commit 71e8527d7c)

* Added changelog fragment
2018-04-10 05:25:02 +10:00
2e881f2929 modules: zypper: Optimize the 'search' subcommand (#37191) (#37234)
When looking for installed packages we do not need to query
repositories since we only care about the rpmdb. As such, we can
disable all the repositories operations in order to improve the
performance of that step

Before this patch, when using 'state: present' in the zypper module,
the operation was taking about 12 seconds to complete:

time ansible-playbook foo.yml 1>/dev/null

real	0m12.614s
user	0m10.880s
sys	0m0.683s

After this patch:

time ansible-playbook foo.yml 1>/dev/null

real	0m4.193s
user	0m2.560s
sys	0m0.575s

see:
https://bugzilla.opensuse.org/show_bug.cgi?id=1084525
(cherry picked from commit 5234b78b5f)
2018-04-09 11:54:39 -07:00
28b41f5c83 Update playbooks_loops.rst (#38440) (#38475)
Missing parentheses
+label: docsite_pr

(cherry picked from commit 061ecac3b5)
2018-04-09 11:35:04 -07:00
f96c109286 Backport azure_rm_image Tag fix for 2.5 (#38131) (#38228)
* fix typo (#38131)

(cherry picked from commit 1c00a14c31)

* add changelog fragment for 38131 backport to 2.5

Signed-off-by: Adam Miller <admiller@redhat.com>

* Fixes #37700 Azure image can be created with tag (#37981)

* image can be create or add

* update tags

* can remove all tags

* Update azure_rm_common.py
2018-04-09 10:46:42 -05:00
4875477d17 Fix junos transport check (#38460) (#38467)
For connection=local check only if the transport value in
provider is cli and the respective module support cli
transport. If not report back appropriate error message.
(cherry picked from commit e10e0d42d8)
2018-04-09 19:13:40 +05:30
4f0389ad4e Backport/2.5/38386 (#38462)
* openssl_certificate: Handle dump() in check_mode (#38386)

Currently, when ones run the module in check_mode it tries to retrieve
values from the actual certificate generated in the generate() function.

Since in check_mode we call dump() without calling generate(), self.cert
is None, leading to self.cert.get_notBefore(), self.cert.get_notAfter()
and self.cert.get_serial_number() raising an error.

>  NoneType' object has no attribute 'get_notBefore'

The solution is to have two way to handle dump() method, whether its run
in check_mode=True or check_mode=False leading to different way the
information is retrieved.
(cherry picked from commit 99497ce54c)
2018-04-09 09:49:09 +01:00
57931804ed Mobile CSS update - adds scrolling inertia (#38443) (#38445) 2018-04-07 16:47:31 -07:00
2895daacdb Tweaks docs CSS to fix minor issue with main content page display cutting off at the bottom. (#38432) (#38434) 2018-04-06 23:28:38 -07:00
e60c4d4690 Removes modules from TOC, speeding up build time and reducing doc disk space requirements. (#38428)
(cherry picked from commit 62c2b9a544)
2018-04-06 15:12:05 -07:00
14011dbe2a Additional docs CSS fix for mobile (#38376)
(cherry picked from commit 2381d2207e)
2018-04-06 14:45:53 -07:00
32a99acc88 The ssh change note has been removed
Since the note was about 2.0 versus 1.x, this has been removed.  The
file implementing it is gone so we need to stop referencing it.

(cherry picked from commit f1b63f435e)
2018-04-06 12:44:52 -07:00
2b78985ff2 Fixes CSS so docs display properly on mobile (#38373)
(cherry picked from commit 79c5a34b0b)
2018-04-06 12:42:32 -07:00
604b748295 Reinstated element to fix doc display on mobile devices. (#38246)
(cherry picked from commit 68f81a6799)
2018-04-06 12:42:32 -07:00
222c1f1090 DOCS: Network Best Practices fixes (#38293) (#38360)
* fixes typo per #38217, corrects link anchor

* adds ssh-agent info per #35649

(cherry picked from commit 24fe8674a6)
2018-04-06 14:34:47 +01:00
f10b82c0d3 Add eos_smoke integration tests (#36957) (#38397)
* added eos_smoke tests

* removed left over file

* added note to uncomment broken eapi test when #36919 is fixed

* uncommented fixed test, added unbecome test

* skip become tests when connection=local

(cherry picked from commit 712d30f46c)
2018-04-06 08:44:14 -04:00
f25eea16e6 added junos_smoke tests (#37216) (#38396)
* added junos_smoke tests

* enable check mode test

* fix check mode test

(cherry picked from commit 0bd2cd4394)
2018-04-06 08:40:24 -04:00
cbeadb2c9a added iosxr_smoke (#37828) (#38395)
* added iosxr_smoke tests

* finalized netconf tests

* cleaning up files

(cherry picked from commit 38fa1d0b15)
2018-04-06 08:37:32 -04:00
4aafa90c89 Backport/2.5/37287 Eos :do not push config to device if check_mode is enabled (#38382)
* Eos :do not push config to device if check_mode is enabled (#37287)

* eos can not check config without config session support

* add testcase for check_mode without config session

* fix eos eapi to read use_session env var

(cherry picked from commit a1026dbce5)

* Backport/2.5/37287 - Eos do not push config is check_mode is enabled
2018-04-06 14:31:54 +05:30
536dff507d stable-2.5 nxos bugfix cherry-pick (#38372)
* nxos_vlan purge (#38202)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 119352b538)

* fix nxos_aaa_server issues (#38117)

(cherry picked from commit 697c301f04)

* fix nxos_aaa_server_host issues (#38188)

(cherry picked from commit 24cc6b80bd)

* fix nxos_static_route issues (#37614)

* fix nxos_static_route issues

* remove nxos_static_route from ignore

(cherry picked from commit 0df5cfd41f)

* fix nxos_acl issues (#38283)

* fix nxos_acl issues

* typo fix

* typo fix in sanity.yaml

* another typo fix in sanity.yaml

(cherry picked from commit 1bf29651af)

* nxos_acl_interface tests addition (#38230)

(cherry picked from commit b8cb382a40)

* update changelog with nxos bugfixes for 2.5

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* revert ignore.txt

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-04-06 02:30:32 -04:00
ff03fc0f67 win_setup: backport Added connection name to interfaces (#38362)
* win_setup: Added connection name to interfaces (#37327)

(cherry picked from commit fd4d264253)

* Added changelog fragment
2018-04-06 08:38:13 +10:00
c97c02e83b Fix the automatic docsite_pr label (#37999) (#38351)
(cherry picked from commit cdf9e39647)
2018-04-05 19:20:03 +01:00
8b62aef632 Update docs to reflect support for CDP neighbors (#38051) (#38350)
(cherry picked from commit dca61cc397)
2018-04-05 19:17:03 +01:00
58bafcb01c added nxos_smoke tests (#36647) (#37252)
* added nxos_smoke tests

* add connection information, check length of output

* updated name of task

(cherry picked from commit 5e827f4cc4)
2018-04-05 18:12:23 +01:00
8277989039 Backport #38194 for 2.5 - include_vars error fix (#38225)
* Don't pass keyword args as positional, include file_name. Fixes #38190 (#38194)

(cherry picked from commit ddf937d642)

* Add changelog for #38194
2018-04-05 12:29:01 -04:00
63566334f6 fixes issue when netconf would report ios is not supported (#38155) (#38240)
* fixes issue when netconf would report ios is not supported

This change now will map ansible_network_os=ios to the correct netconf
plugin implementation.  This will resolve an error where the netconf
connection plugin will report that ios is unsupported.

(cherry picked from commit 91a748e33b)
2018-04-05 10:37:01 -04:00
50c971df43 Network connection backports (#37529)
* Close & remove paramiko connection where appropriate (#37528)

* Update unit test

(cherry picked from commit 594840c1d6)

* Put back $PATH checking in ansible-connection call (#37933)

(cherry picked from commit 169209c32a)
2018-04-05 10:36:31 -04:00
5cf1420251 Fix typo in Slack Callback plugin (#38286)
`get_options` is an undefined method from CallbackBase

As a result, remove the trailing `s` letter.

Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
2018-04-05 16:18:41 +02:00
20a5987c30 ISSUE-37945 output not populated on failure (#37952) (#38322)
* ISSUE-37945 output not populated on failure

This always includes output, but it is empty on failure.

* handle the other failcases as well

(cherry picked from commit 509f52a8ed)
2018-04-05 13:41:20 +01:00
92562a2ba9 demonstrates best practices for group vars (#37930) (#38287)
* demonstrates best practices for group vars

* removes vm-specific var from example

* adds brackets to all [group:vars] refs

(cherry picked from commit 380c074808)
2018-04-05 13:17:44 +01:00
05cf76cbd7 Backport/2.5/38191 (#38327)
* issue:38167 add support for onyx version 3.6.6000 for onyx_linkagg (#38191)

Signed-off-by: Samer Deeb <samerd@mellanox.com>
(cherry picked from commit 72d42bd065)

* fragment
2018-04-05 12:27:56 +01:00
08029a38df issue:37307 Add support for changes in pfc output in onyx 3.6.6000 (#… (#38330)
* issue:37307 Add support for changes in pfc output in onyx 3.6.6000 (#37651)

* issue:37307 Add support for changes in pfc output in onyx 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>
(cherry picked from commit 9dfb665e43)

* fragment
2018-04-05 12:27:37 +01:00
aed8aea3f3 issue:37306 Fix issue with vlan support for onyx version 3.6.6000 (#37310) (#37635)
* issue:37306 Fix issue with vlan support for onyx version 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>
(cherry picked from commit a89bafce2e)
2018-04-05 12:12:24 +01:00
323e3b6914 nso_verify handle leaf-list in 4.5 and identityref (#37393) (#37634)
* nso_verify handle leaf-list in 4.5 and identityref (#37393)

NSO verify did not handle leaf-list value verification in 4.5 and
later due to changes made for configuration writing made.

map prefix for identityref types in verification.
(cherry picked from commit 6308047dc9)

* Remove timeout
2018-04-05 12:02:44 +01:00
5ee10ad19c fixes example address parameters (#37765) (#38328)
(cherry picked from commit 7324f49829)
2018-04-05 11:55:56 +01:00
4e3e2c712a Have the ios_interface module include CDP when checking neighbors (#38046)
* Add CDP support for the neighbors option (#37655)

(cherry picked from commit 0f90853f67)

* Add ios_interface CDP support to changelog
2018-04-05 11:51:18 +01:00
febd1ca44a ansible_password & ansible_ssh_pass are the ENV variable (#38035) (#38324)
* ansible_password & ansible_ssh_pass are the ENV variable
(cherry picked from commit a4e932ee9f)
2018-04-05 11:47:34 +01:00
b86d376a85 Document that this module was renamed recently (#37420) (#37422)
(cherry picked from commit ff15a9e7e2)
2018-04-05 10:44:30 +10:00
eaa484f05d fix RPM builds when REPOTAG is not defined
* add to mock/rpmbuild args only when defined
2018-04-04 13:55:56 -07:00
6e1ca544dd Update EdgeOS modules to be community supported (#38112) (#38125)
(cherry picked from commit a4c82d5842)
2018-04-04 09:31:01 -07:00
fa57dec5e0 Add error handling for junos in case wrong connection type (#38023) (#38256)
* Add error handling for junos in case wrong connection type

Fixes #37990

If a junos module doesn't support given connection/transport type
return appropriate error message.

* Fix CI issues

* Fix review comment

(cherry picked from commit 3a4fc4af08)
2018-04-04 16:23:16 +05:30
09dc621238 win_service: backport of special char in name handler (#38250)
* win_service: fix when dealing with paths with special chars and change WMI to CIM cmdlets (#37897)

* win_service: fix when dealing with paths with special chars and change WMI to CIM cmdlets

* compare username in lowercase for test

(cherry picked from commit f37a44430f)

* Added changelog fragment
2018-04-04 13:43:33 +10:00
f629825299 Adds VMWare to TOC; sort scenario guides alphabetically (#38238) 2018-04-03 13:44:10 -07:00
f2b0171b93 azure_rm_virtualmachine - backport of docs change around images supported (#37764)
* Updated text for azure_rm_virtualmachine around images that can be used (#37686)

(cherry picked from commit 04539ca448)

* Added changelog fragment
2018-04-03 08:32:02 +10:00
800980ec83 win_copy: backport 2.5 preserve local tmp path when sending multiple files (#37977)
* win_copy: added fix for win_copy deleting local tmp folder (#37964)

(cherry picked from commit b1ac65d95a)

* Added changelog fragment
2018-04-03 08:30:49 +10:00
886a88a967 win_uri: backport fix custom header override (#37889)
* append request headers instead of replacing (#37845)

(cherry picked from commit 2c44061a04)

* Added changelog fragment
2018-04-03 08:30:09 +10:00
0c88f199ec azure_rm_networkinterface: backport no public IP fix (#37762)
* azure_rm_networkinterface: fixed issue when public ip address should not be created (#36824)

* fixed issue when public ip address should not be created

* adding test for public ip address

* fixed samples

* another fix to sample formatting

* fixed test

* fix test

* fixed test

* another attempt to fix test

* maybe it works now

* still wrong

* improved check per customer request

* removed stupid semicolon

* updated test to match main scenario

* changed ip configurations to list

* another attempt

(cherry picked from commit 89401f13f7)

* Added changelog fragment
2018-04-03 06:32:01 +10:00
c056b8a35c win_reboot: backport warning message arguments (#37971)
* win_reboot: fixed up warning message for dep args (#37898)

(cherry picked from commit c4e7b54630)

* Added changelog fragment
2018-04-03 06:31:07 +10:00
d0f1a23c45 Ansible.ModuleUtils.FileUtil - backport catch DirectoryNotFoundException (#37976)
* Ansible.ModuleUtils.FileUtil: catch DirectoryNotFoundException when testing a path (#37968)

(cherry picked from commit 68e44e082e)

* Added changelog fragments
2018-04-03 06:30:53 +10:00
f1a060743a Doc build warning/broken link clean-a-palooza (#37382) (#38185)
* Doc build warning/broken link clean-a-palooza, WIP commit 1.

* Fixed broken anchor

* Fixing additional broken links; converting from doc to ref.

* Fix anchor

(cherry picked from commit 381359a8f8)
2018-04-02 11:53:24 -07:00
112f577d3a letsencrypt: doc: Making clearer that the module has to be executed twice, and that the second run needs the data of the first (#37884). (#38135) (#38160)
(cherry picked from commit 93fc99c576)
2018-03-31 20:15:50 +02:00
00623c3da5 cloudstack: do not rely on APIs list queries for names (#37910) (#38014)
Fixes #37824
(cherry picked from commit abae7a49f7)
2018-03-31 09:41:07 +02:00
46cf6ed677 cs_vpc_offering: listVPCOffering API returns any matching names (#37783) (#37832)
(cherry picked from commit 270e799cb6)
2018-03-31 09:39:29 +02:00
3ac91f7e28 Improving EC account key parsing (see #37275). (#37276)
(cherry picked from commit ec977988b35caacd0f13470ef62d55ec91d16de1)
2018-03-31 09:36:49 +02:00
ca3457458f Fix PEP 8 issue. 2018-03-29 19:27:12 -07:00
8f5565f948 Add changelog for https://github.com/ansible/ansible/pull/37460 2018-03-29 19:10:47 -07:00
663400b504 Avoid 2nd processing of facts for actions
include_vars and set_fact are already updating hostvars in strategy
no need to 're add again' with lower priority the same data.

fixes #37535, mostly by avoiding reprocessing and 'cleaning'

(cherry picked from commit 3bec76fc85)
2018-03-29 15:26:40 -07:00
d64a352a40 Fix redundant yaml error blurbs on ModArgs parse errors (#36923)
* Fix redundant yaml error blurbs on ModArgs parse errors

Some of the AnsibleParserErrors from parsing.mod_args
are created with the obj=some_yaml_ds options but
some are not.

If they were, we don't want to add another yaml_ds to
it, because that will result in double yaml error blurbs.
And since we dont need to add info, we can just re raise it.

But if there is no ._obj, add it here so we get the extra
detail in the error message (see issue #14790) and raise
a new AnsibleParserError instance.

Fixes #36848

* cleanup existing test_tasks pep8/sanity issues

(cherry picked from commit e166946a0a)
2018-03-29 15:23:32 -07:00
27382f38dc Fixing domain to authorization matching for ACME v2. (#37558) (#37572)
(cherry picked from commit 190755ff65)
Signed-off-by: Rene Moser <mail@renemoser.net>
2018-03-29 15:20:43 -07:00
5b0d8ab868 Fixes #32146 Fixes reconcile inventory to correctly remove hosts from ungrouped
(cherry picked from commit e02c72d856)
2018-03-29 15:19:29 -07:00
4ecd16b2ae Bkprt py3 pull fix (#37663)
* Compare byte strings to byte strings

* Fix a traceback in ansible-pull on python3 comparing output from
  subprocess with a text string.
* Rename variables that hold byte strings so we are clear that those are
  not text strings.
* Use to_text() to transform variable that's being displayed as it's
  less fragile than str().

Fixes #36962

(cherry picked from commit b98ad3a12b)

* Add changelog entry for python3 ansible-pull fix
2018-03-29 15:16:12 -07:00
389c4d1536 Bkprt py3 ec2 user data (#37664)
* Fix use of user_data field with spot_price in ec2 module (#37628)

The user_data field is base64 encoded inside of the boto library.  In
Python3, base64 must be used with byte strings.  So we make sure to
encode the user_data into a byte string before passing it on to the boto
library.

Fixes #34978

(cherry picked from commit 0d55081ba8)

* Python3 ec2 fix added to changelog
2018-03-29 15:13:42 -07:00
97a0516cf6 Bkprt py3 csvfile (#37665)
* Fix csvfile traceback on Python3 (#37625)

* Fix csvfile traceback on Python3

The csvfile lookup uses some custom iterators.  These needed to be
ported to handle the python3 iterator protocol.  In addition, the
csvfile module takes an iterator of byte strings in Python2 and an
iterator of text strings in Python3

Fixes #36808

(cherry picked from commit 09325b619e)

* Add changelog entry for csvfile python3 fix
2018-03-29 15:11:14 -07:00
87119348b5 VMware: Use environment variable for connection (#37726) (#37745)
This fix adds environment variables for connection in vmware_*
modules.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 0ae7a0e88c)
2018-03-29 15:05:44 -07:00
64cdeba7a2 Bkprt py3 jira (#37800)
* make jira authentication Python3 compatible (#33862)

* make jira authentication Python3 compatible

(cherry picked from commit a51a699314)

* Add changelog fragment for py3 jira fix
2018-03-29 14:59:15 -07:00
8d008d00ed Py3 vargrant inv (#37803)
* Fix dynamic inventory for vagrant does not work on python3 (#37631)

* Fix dynamic inventory for vagrant does not work on python3 #35129

(cherry picked from commit 1b121fc9e4)

* Add vagrant python3 fix to the changelog
2018-03-29 14:58:19 -07:00
f23c100419 Bkprt py3 haproxy (#37791)
* Fix python3 interpreter issue (#34811) (#35176)

* Fix python3 interpreter issue (#34811)

* Update ansible.module_utils._text (#34811)

* Convert to text later to account for multibyte characters

(cherry picked from commit 340064bfb9)

* Add a changelog fragment for haproxy python3 fix
2018-03-29 14:57:40 -07:00
2dd02eb812 Fixed issue with accessing response in digital_ocean module (#37780)
(cherry picked from commit 6ad784bbbb)
2018-03-29 14:56:30 -07:00
ae0a9a5e9c continue fact gathering even without dmidecode (#34925) (#38001)
* continue fact gathering even without dmidecode

If dmidecode is not available we still wan to continue with fact
gathering.
On certain platforms dmidecode just won't work

(cherry picked from commit cbe2915ba5)

Fixes #37911
2018-03-29 14:48:45 -07:00
d47e020d55 add missing to_bytes import in interfaces_file 2018-03-29 14:46:17 -07:00
98633e5157 Fix interfaces_file for proper file contents (#37818)
The generated file was completely unusable by the system
therefore the fix which ensures that diffing the file
prior to changes and after only shows diffs

Furthermore the code did not work for Python 3.6
>       f.writelines(to_bytes(lines, errors='surrogate_or_strict'))
E       TypeError: a bytes-like object is required, not 'int'

The other modifications (lambda variable renaming) is to
comply with default flake8 rules
(cherry picked from commit 612d0d6634)
2018-03-29 14:42:25 -07:00
4e5f17e52d win_certificate_store: backport fix of typo key_storage (#37862)
* win_certificate_store: fix typo stopping key_storage from working (#37810)

(cherry picked from commit b7ce2b1c5a)

* Added changelog fragment
2018-03-29 14:18:53 -07:00
5ac9a7418f fixes bug: puppet module is no longer updating persistent external facts (#38026)
(cherry picked from commit 0efbb702b9)
2018-03-29 14:13:35 -07:00
f91cda4b02 Fix junos modules check_mode issue (#37311) (#37918)
Fixes #37208

If check_mode is enabled instead of committing th config need to
discard all the chnages to cnadidate db
In case of cli to discard changes issue `rollback 0` command
and for netconf execute `discard-changes` rpc call
(cherry picked from commit 8eaa9cc938)
2018-03-29 19:00:15 +05:30
ec59181a28 Fix eos_facts eapi integration test failures (#37919)
(cherry picked from commit af777c0f89)
2018-03-29 18:59:14 +05:30
4dffcd35cd eos_config module exit session gracefully (#37920)
Fixes #36979
If `abort` is not issued in the top level session prompt
the existing session goes to pending state.
The fix is to come out of config mode by issuing `end` command
and again to same config session and execute `abort` which
`abort` is issued at the top level session prompt.

(cherry picked from commit 017ea018d0)
2018-03-29 18:58:43 +05:30
a716fe97e3 nxos bugfixes cherry-pick (#38091)
* Fix nxos_switchport (#37328)

(cherry picked from commit ff57fd0bb4)

* Fix nxos_l2_interface and test typo (#37336)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit ba5e562c76)

* fix ios_l2_interface (#37389)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit dd37857884)

* fix required args for nxos_snapshot and docs improvement (#37232)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit a10df8b0b5)

* add nxos_snapshot test for missing required param (#37248)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 2501834c42)

* Ensure network_cli nxos test is run only once - remove unnecessary files (#37462)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 957ab02e52)

* Integration Tests only: nxos_user (#37852)

* add new integration file to nxos_user

* fix shippable error

* change nxapi to connection

* review comments

(cherry picked from commit 63da50e1d8)

* fix UnboundLocalError nxos_bgp_af module (#37610)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 00abe6dbe7)

* Fix nxos_vrf issues (#37092)

* fix nxos_vrf issues

* fix doc

(cherry picked from commit dc61f4c6b1)

* fix nxos_vrf_af issues (#37211)

(cherry picked from commit 74e79d9f5e)

* fix nxos_udld issues (#37418)

(cherry picked from commit 05b266cc66)

* fix nxos_vlan issues (#38008)

(cherry picked from commit 6f2cb28bb9)

* add changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-29 08:47:32 -04:00
60e7aa0dbd [cloud]Ensure SGs in default VPCs get default egress rule (#38018)
SGs created when a VPC ID was not specified would not necessarily
get the default egress rule, even when no explicit egress rules
were set.

Add some checks for egress rules in results from existing tests

(cherry picked from commit 98b29f8ad6)
2018-03-28 17:52:17 -04:00
ae4c246a3c ec2_asg: fix #28087 and #35993 (#36679)
Fixes #35993 - Changes to update_size in commit eb4cc31 made it so
the group dict passed into update_size was not modified. As a result,
the 'replace' call does not see an updated min_size like it previously
did and doesn't pause to wait for any new instances to spin up. Instead,
it moves straight into terminating old instances. Fix is to add batch_size
to min_size when calling wait_for_new_inst.

Fixes #28087 - Make replace_all_instances and replace_instances behave
exactly the same by setting replace_instances = current list of instances
when replace_all_instances used. Root cause of issue was that without lc_check
terminate_batch will terminate all instances passed to it and after updating
the asg size we were querying the asg again for the list of instances - so terminate batch
saw the list including new ones just spun up.

When creating new asg with replace_all_instances: yes and lc_check: false
the instances that are initially created are then subsequently replaced.
This change makes it so replace only occurs if the asg already existed.

Add integration tests for #28087 and #35993.

(cherry picked from commit a2b3120e85)
2018-03-28 17:36:32 -04:00
0b0bb65198 Backport #36372 for 2.5 (#37666)
* Fix name parameter templating in include_role module (#36372)

An IncludedFile() object built using the original_task will have
its _task bound to the original_task. The iterative reassignment of
original_task._role_name during with_item loops leaves all returned
included_files with the same ._task._role_name (the final name from
the with_items list). This commit builds IncludedFile() objects
from an original_task.copy() to avoid the problematic binding.

(cherry picked from commit 54e70fc783)

* Test include role with items in name #36372 (#37001)

* Tests for #36372

* Tests for #36372

* Tests for #36372

(cherry picked from commit 8c4f349743)

* Add changelog for #36372
2018-03-28 11:05:03 -05:00
687780323a Backport #37881 for 2.5.1 (#37937)
* Don't overwrite builtin jinja2 filters with tests (#37881)

* Don't overwrite builtin jinja2 filters with tests. Fixes #37856

* Fix tests and other callers of _get_filters

(cherry picked from commit 1f824bd620)

* Add changelog for #37881
2018-03-28 11:04:44 -05:00
e33f1777fe Backport #37646 for 2.5 (#37653)
* Fix py3 issue in wait_for_connection (#37646)

(cherry picked from commit 6c3e565ba3)

* Add changelog entry for #36470
2018-03-28 11:04:06 -05:00
617d156eac revises network portion of 2.5 porting guide (#37938)
* revises network portion of 2.5 porting guide
(cherry picked from commit b72960fdd4)
2018-03-28 08:27:44 -07:00
2604832858 Fixes scrolling issue without breaking header nav (#37864)
(cherry picked from commit 3554e2c2d9)
2018-03-26 13:08:26 -07:00
4b406de19a pick up missing plugin docs boolean coercion backport 2018-03-23 05:04:13 -07:00
f237508caa Fix nested parameters in module docs (#37793)
(cherry picked from commit 69c0f96112)
2018-03-23 00:00:30 -07:00
44d3bcbc6f re-sort unified RPM changelog 2018-03-22 23:03:42 -07:00
2c2dd1a1b3 New release v2.5.0 2018-03-22 17:50:20 -07:00
a57a2e1d4f sync old changelogs 2018-03-22 16:45:26 -07:00
2665912356 Fix docker_secret test on RHEL.
(cherry picked from commit f1899f784b)
2018-03-22 12:03:03 -07:00
6b0b4ddf00 Pin httptester SHA.
(cherry picked from commit 8232c95f42)
2018-03-21 10:02:11 -07:00
61887e7c2f Fix uri test on Python 2.6.
(cherry picked from commit 1fd9a616a4)
2018-03-21 10:02:03 -07:00
144e5ae65a New release v2.5.0rc3 2018-03-15 18:12:31 -07:00
3b1df95798 Various module doc fixes (#37256)
This PR includes:
- A fix for multiple-choice defaults
- A fix for messed up dictionary samples
- Cleaner defaults when they don't appear part of choices
(cherry picked from commit 80ba7b7402)
2018-03-15 17:58:14 -07:00
20fcaeb854 fix spelling mistakes in several modules (#36296)
* fix more spelling mistakes

* fix spelling mistakes

(cherry picked from commit 16c564c4b4)
2018-03-15 17:57:11 -07:00
2f8a851b44 Update porting_guide_2.5.rst
A fix to a minor typo. ("Previouslu" -> "Previously")

 label: docsite_pr
(cherry picked from commit 0cf2ecbc62)
2018-03-15 17:55:35 -07:00
5ebce3e618 Disable failing github_issue integration test.
(cherry picked from commit 30bb70cf2d)
2018-03-15 17:40:20 -07:00
1381de72d0 Backport of ACI document changes (#37502)
* Backport of ACI document changes

* Add missing test change
2018-03-15 17:35:18 -07:00
934462a5db terraform: fixed typo, name error sdtout -> stdout (#37253) (#37270)
(cherry picked from commit 3bf6c50fa9)
2018-03-15 14:30:04 -07:00
b8c6adbe18 Add a note to iosxr_(command|config|facts) stating netconf is not supported (#37401)
(cherry picked from commit ed3dcae0b8)
2018-03-15 14:29:27 -07:00
9f02fea15b ovirt_vms: Pass correct VM entity to create method (#37460) 2018-03-15 13:56:25 -07:00
8d7fe469ea Clarify the apt module force documentation (#37353) (#37491)
The force parameter is inherently insecure.  Be clearer in the
documentation that this is the case.

Fixes #25242

(cherry picked from commit 5bdc8fe9f6)
2018-03-15 13:55:43 -07:00
1b3433b969 Raise error when trying to use older iosxr modules with netconf (#37423) (#37480)
(cherry picked from commit 85cc5ea129)
2018-03-15 13:54:44 -07:00
c264061272 Bkprt conn err msg no template (#37381)
*  Connection error messages are unsafe: wrap them (#37329)

* Check that connection error msg are not unsafe

* Connection error messages are unsafe: wrap them

For example, in case of error, docker connection plugin returns exception
message containing Go template. These messages weren't tagged as unsafe
and were consequently rendered:

The conditional check 'result is failed' failed. The error was:
{
  'msg': u'Docker version check ([\'/usr/bin/docker\', \'version\', \'--format\', "\'{{.Server.Version}}\'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied\n',
  'failed': True
}:
template error while templating string: unexpected '.'.
String: Docker version check (['/usr/bin/docker', 'version', '--format', "'{{.Server.Version}}'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied

(cherry picked from commit 4378542ac7)

* Add a changelog for the no-template error message fix
2018-03-15 13:52:33 -07:00
36186c3a04 Bkprt onyx tmp file (#37358)
* issue:36955 remove creating temp file for debug

Signed-off-by: Samer Deeb <samerd@mellanox.com>
(cherry picked from commit 9031533c0c)

* Add changelog fragment for the onyx tempfile issue
2018-03-15 13:50:02 -07:00
c47401463d issue:36955 remove creating temp file for debug (#37373)
Signed-off-by: Samer Deeb <samerd@mellanox.com>
(cherry picked from commit 9031533c0c)
2018-03-15 13:49:24 -07:00
9ff46ca52f Fix ansible_lo being used inside of ansible_facts (#37360)
The logic was keeping ansible_facts['ansible_lo'] instead of fixing it
to be ansible_facts['lo']

(cherry picked from commit 31878ee0ea)
2018-03-15 13:48:46 -07:00
0a2db12370 fix changelog yamllint failure 2018-03-09 17:53:10 -08:00
482e204afa fix RPM dist/repotag labeling 2018-03-09 17:52:54 -08:00
d6127361d3 fix changelog_aggregate task name in Makefile 2018-03-09 15:31:54 -08:00
aa1c4a0de2 asciidoc comment fix 2018-03-09 14:39:32 -08:00
cc46e752e0 replace VERSION usage in man generation
* VERSION no longer exists, use lib/ansible/release.py instead as  sentinel file for staleness check
2018-03-09 14:38:21 -08:00
573c53fd00 remove stale VERSION file (no longer needed) 2018-03-09 13:37:21 -08:00
2ee6a85463 New release v2.5.0rc2 2018-03-08 23:39:28 -08:00
de039e914f version_helper sanity fixes 2018-03-08 23:35:06 -08:00
643fe472e7 2.5.0rc2 changelog catchup/cleanup 2018-03-08 23:29:46 -08:00
1258bf57e6 Dynamic RPM/DEB versioning
* still partially WIP
2018-03-08 22:57:00 -08:00
24d98f9e70 Porting guide (#37226) (#37228)
* Add the lookup plugin strictness to the porting guide

* Edited for clarity.

* Wordsmithing.

(cherry picked from commit fafcb3452f)
2018-03-08 16:06:34 -08:00
05b3b73185 Fixes commit a28eb94, which broke validate_certs = False for python < 2.7.9 (#34887) (#37018)
(cherry picked from commit ce416f247f)
2018-03-08 15:21:09 -08:00
1842e34a73 DigitalOcean: typecast map function for Python3 (#37168)
In Python2, `map` returns list whereas Python3, `map` function
 returns iterator. This fix typecast map function for Python3.

Fixes: #37114

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 8f3f7f104f)
2018-03-08 15:19:29 -08:00
e02b237649 Do not try to add an entry if none exist (#37152) (#37213)
When commit revisions are disabled, there will be no revision items returned.
Add note about setting ANSIBLE_PERSISTENT_COMMAND_TIMEOUT to a higer value to avoid timeouts.

(cherry picked from commit 3134ba6bee)
2018-03-08 14:55:43 -08:00
acef6d25b1 powershell: backport environment string handler fixes 2.5 (#37223)
* win: handle non string as an environment value (#37215)

* win: handle non string as an environment value

* Changed powershell environment handler to use .net function instead for special chars

(cherry picked from commit 708869edd6)

* Added changelog fragement for powershell environment handler fix

* typo in changelog
2018-03-08 14:49:22 -08:00
044aa1cb73 Fixing module docs so they dont show up as a list on ansible docs. (#37203) (#37218)
* Fixing module docs so they dont show up as a list on ansible docs.

* Fixing spacing in description.

(cherry picked from commit df0f9d1d91)
2018-03-08 13:23:38 -08:00
4df0be4b1b stable-2.5 docs in sync with devel (#37214) 2018-03-08 12:04:16 -08:00
9e315f15ee cs_instance: fix py3 user_data base64 (#37135) (#37199)
* cs_instance: tests: reproduce py3 user_data base64 issue

* cs_instance: fix base64 encoding with py3

(cherry picked from commit 0130490faa)
2018-03-08 17:57:14 +01:00
51bf373fd1 vultr: fix py3 compat (#37171) (#37195)
* vr_server: fix base64 encoding with py3

* vultr: fix AttributeError with py3

(cherry picked from commit 4b6b2d4206)
2018-03-08 17:55:11 +01:00
4477ce809f VMware: Re-enable VM poweroff testcases (#36734) (#36765)
This testcases were failing due to vcsim version.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 87d6bdaf98)
2018-03-08 08:40:09 -08:00
bb3cbac738 Backport #36685 for stable-2.5 (#36686)
* zfs: Fix handling of parameters passed via check_invalid_arguments

cc7a5228 had a typo, so the merged set of arguments was shoved into the
wrong parameter and ignored.

`origin` is an actual module parameter and should be processed like one.

pop()ing makes debug output misleading.

* zfs: fix command generation for `zfs snapshot`

Creating a snapshot and supplying an origin are mutually exclusive,
but were not treated as such. We should throw an error instead of
running an invalid command (`zfs snapshot origin foo@snapname`.)
2018-03-08 08:35:39 -08:00
fb8a9d4e79 VMware: Add missing state param in argument spec (#36339) (#36487)
This fix adds missing argument parameter called 'state'
and its documentation.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 77b903bd85)
2018-03-08 08:28:20 -08:00
d06f8dda3b Using correct content type (as per version 10 of ACME draft). (#37165) (#37190)
* Using correct content type (as per version 10 of ACME draft).

* Another incompatibility with ACME v2: body must be {} and not contain v1 data (Pebble fails otherwise).

(cherry picked from commit 155adb1631)
2018-03-08 16:55:49 +01:00
7213d0017b fix NIOS DNS lookup example (#36737) (#37139)
(cherry picked from commit 905b3e2f65)
2018-03-08 10:55:20 -05:00
2e145cd1f2 fix nxos_switchport/l2_interface trunk_vlans state absent (#37180) (#37181)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 02999b77a4)
2018-03-08 18:22:43 +05:30
934d1df0d1 2.5 network changelog (#37179)
Add details of major Network features added in Ansible 2.5
2018-03-08 12:38:04 +00:00
e6effb32b8 Update developing_api.rst (#37108) (#37178)
Fix for #17716 and #36110
(cherry picked from commit 19f92005b9)
2018-03-08 10:54:29 +00:00
193687851b cs_instance: fix error when state destroyed but querying user_data (#37175)
(cherry picked from commit 190d3fbbed)
2018-03-08 11:40:31 +01:00
bfceaf696c yum is Python 2 only. If Python 3 use dnf (#37140) (#37172)
* PY3 = dnf

Red Hat are unlikely to provide a Python 2 version of the yum bindings
as they are moving to `dnf`.

If Ansible can't find the yum Python library give the user a hint about
dnf and Python 3

(cherry picked from commit 6c8d40f653)
2018-03-08 08:36:30 +00:00
0fd9c9b014 Bkprt unarchive fix (#37159)
* Fix unarchive with strip-components in extra_opts (#37048)

* Fix unarchive with strip-components in extra_opts

When unarchive is given extra_opts to strip all leading directories, it
could end up trying to change the permissions on the root directory.
Tar archives shouldn't contain absolute paths anyways so make sure that
all paths are relative as we handle them.

Fixes #21397

(cherry picked from commit cca0ccaf97)
2018-03-07 18:41:29 -08:00
09de6dc020 win_uri: backport return value fix for non 200 responses (#37156)
* win_uri: return response info on non 200 responses, convert DateTime values to ISO 8601 (#37104)

(cherry picked from commit c1f5e11cdf)

* Added changelog fragment for win_uri return value fix
2018-03-08 10:38:32 +10:00
3b1be8d881 Backport #37151 for 2.5 (#37154)
* Add ansible-config and ansible-inventory to setup.py scripts (#37151)

(cherry picked from commit bd43776acf)

* Add changelog entry for #37151
2018-03-07 17:02:54 -06:00
f230d8e9c4 cs_router: fix missing doc (#37107)
* cs_router: fix missing doc

* update ignore.txt

(partly cherry picked from commit e1297af18a)
2018-03-07 19:12:25 +01:00
c054527d65 cs_ip_address.py: fix missing doc (#37109)
* cs_ip_address.py: fix missing doc

* update ignore.txt

(partly cherry picked from commit 67d8c8f5c6)
2018-03-07 19:12:25 +01:00
895d9abd7b 2.5lenovo license update (#37118)
* Syncing with the latest License information in main branch

* Adding License to 2.5 branch
2018-03-07 14:11:47 +00:00
0c4d8a9ce5 cloudstack: fix common E324 in docs (#37082) (#37119)
Notes about precedence of common args.

(partly cherry picked from commit 2559e832df)
2018-03-07 13:39:36 +00:00
ee67c6c1e3 fix nxos_l2_interface tests for fretta (#37086) (#37101)
(cherry picked from commit b7bc61c7df)
2018-03-07 10:42:16 +05:30
4bb5f40e99 Fixes #37042 (#37044)
* correctly check that the no_device attribute is specified
 * ignore volume_size requirement if no_device is specified
2018-03-07 09:39:42 +10:00
2be960f84a Don't fail on configure in command (#37094)
* Don't fail on configure in command

* Change test to check mode

(cherry picked from commit efb8b539c1)
2018-03-06 18:24:43 -05:00
b1f8fd7edb Fix side-effect of flags being passed to ios get_config again (#37084) (#37085)
(cherry picked from commit f0dc0b28d4)
2018-03-06 18:09:34 -05:00
33773624fb win_wait_for: fix local port check on port not accessible externally (#37093)
* win_wait_for: use loopback IP instead of hostname if 127.0.0.1 is used (#36762)

* win_wait_for: use loopback IP instead of hostname if 127.0.0.1 is used

* removed reverse dns lookup in port check

(cherry picked from commit 67ffde4ac1)

* Added changelog for win_wait_for local port fix
2018-03-07 08:55:39 +10:00
f0a808e02c Win lineinfix fix (#36888)
* Win lineinfile fix (#35100)

* win_lineinfile: fix #33858. Removed conversion from \r\n

* win_lineinfile: added test for #33858

* win_lineinfile: added documentation and more tests for change

* win_lineinfile: fixed wrong hash in testing

(cherry picked from commit e15a903bdf)

* Added changelog for win_lineinfile fix

* fix typo in changelog
2018-03-06 13:05:31 -08:00
471e75a019 Fix consul module service deregistration (#34847) (#37089)
* Fix consul module service deregistration

Upstream pr in the python-consul library:
https://github.com/cablehead/python-consul/pull/174

This is based on work from https://github.com/bobh

Fixes ansible/ansible#34628

* Pass ACL token when deregistering consul service

(cherry picked from commit c9cb0016a0)
2018-03-06 20:28:03 +00:00
4ad30ad9b5 Clarify Docker SDK rather than Docker API 2018-03-06 09:00:26 -08:00
111c2d6c1f Add a changelog fragment for the docker 3 api changes. 2018-03-06 07:08:49 -08:00
fccb6962fe Network modules to link to network guide (#37033) (#37069)
* Network modules to link to network guide

* Make it clear what's deprecated
* enable -> become
* Detail when provider is still needed (eAPI/NX-API)
* Link to specific sections
* rx_rate & tx_rate to link to conditional docs

(cherry picked from commit ebc71bcb16)
2018-03-06 12:40:25 +00:00
c2cc6e4ac8 Add compatibility for docker-py version 3 (#36973) (#37071) 2018-03-06 07:34:02 -05:00
5ec5c05f0d remove unused tx_rate and rx_rate from vyos_interface (#37062) (#37064)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 5f3feac7fa)
2018-03-06 17:03:53 +05:30
c4cb7daa6b Link to new network platform pages (#37057) (#37058)
Also fix a few broken links
(cherry picked from commit 7a4e270ae0)
2018-03-06 09:34:40 +00:00
e03b17e2e5 filesystem: fix documentation (#36556) (#36633)
(cherry picked from commit 07927f52ae)
2018-03-06 08:35:54 +00:00
f48d636500 Fix n3k separate to combined image upgrade (#37017) (#37055)
* Fix n3k separate to combined image upgrade

* Address review comments

(cherry picked from commit 51e8eab9db)
2018-03-06 10:40:02 +05:30
bbf27efe06 Fix eos integration test failures (#37020) (#37054)
Fixes #36919

Fix other eos modules integration test failure in dci
(cherry picked from commit ba3201cd2f)
2018-03-06 10:24:54 +05:30
38a498bcfd Bkprt py3 maven artifact (#37041)
* Python3 issues in maven_artifact (#37035)

Fixes #33761

(cherry picked from commit 1bc860fafd)

* Add a changelog for the python3 maven_artifact fix
2018-03-05 18:48:29 -08:00
422e4aa310 properly pass /api/v1/ credential fields for older Towers (#36917)
(cherry picked from commit 0e7106b106)
2018-03-05 21:19:13 +00:00
ee4578c4cd properly detect the absence of credential_type in older tower-cli (#36908)
(cherry picked from commit a82043939b)
2018-03-05 21:19:13 +00:00
2bcc02e653 Add changelog fragment 2018-03-05 21:19:13 +00:00
f0e65cb05a tower cred: support credential kind/type for /api/v1/ and /api/v2/ (#36662)
older versions of Tower (3.1) don't have a concept of CredentialTypes
(this was introduced in Tower 3.2).  This change detects older versions
of pre-3.2 tower-cli that *only* support the deprecated `kind`
attribute.

(cherry picked from commit 641f8b4ef6)
2018-03-05 21:19:13 +00:00
644b116848 tower cred: update kind options in documentation
(cherry picked from commit 8a41233202)
2018-03-05 21:19:13 +00:00
86cc8ae591 tower cred: filter user name lookup by the proper key
(cherry picked from commit cd6855275e)
2018-03-05 21:19:13 +00:00
1a412d49bf tower cred: implement credential /api/v1/ kind compatability
(cherry picked from commit 9cb4b70e27)
2018-03-05 21:19:13 +00:00
8cc9abcd75 Fix credentials for Tower API V2
(cherry picked from commit 640749d54f)
2018-03-05 21:19:13 +00:00
9711c60b01 Bkprt py3 znode (#37038)
* fix python3 compatibility for znode module

kazoo client requires bytes and not string

(cherry picked from commit 2d98a2de68)
2018-03-05 13:01:48 -08:00
a50b332768 Support <hr/> in module docs (#37030) (#37031)
(cherry picked from commit 0a2dda2060)
2018-03-05 19:20:37 +00:00
a3f96ec4af ios_static_route idempotence fix (#35912) (#37012)
* Remove default admin_distance and fix the idempotence thereof

Fixes #33290

* Fix tests and use yaml anchors to shorten tests

* Add test for undefined admin_distance

* Read config from `show run` if `show ip static route` fails

* Restore flags to ios.get_config &  use get_config where appropriate

(cherry picked from commit 7016b3b9ca)
2018-03-05 10:48:18 -05:00
9ac8aa3552 Ability to link to other pages from plugin docs (#37009) (#37014)
Support relative links
(cherry picked from commit 985f09270d)
2018-03-05 15:20:49 +00:00
639f7b569a Move _start_connection() to module_utils/connection and fix Popen() call (#36249) (#37005)
* Fix Popen() call to use ansible python

* Remove PATH searching, reuse location of ansible instead

(cherry picked from commit 0feea66988)
2018-03-05 09:54:30 -05:00
801b5dcd04 [WIP] Backport/2.5/multiple docs (#36907)
Backport/2.5/multiple docs
2018-03-05 14:40:14 +00:00
36566e62a7 Fix_regex (#36569) (#37002)
(cherry picked from commit 4021194532)
2018-03-05 12:10:08 +00:00
3f8377c2d9 Enable eapi integration test for eos modules (#36934) (#36935)
(cherry picked from commit 83c3561ee5)
2018-03-02 13:02:52 +05:30
2cd49b4ab0 eos_static_route fix (#36903) (#36933)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit ef7f3fcab6)
2018-03-02 09:02:36 +05:30
3e123d8298 map network_os to ncclient device_params (#36819) (#36913)
* map network_os to ncclient device_params

Fixes #36786

* update device map

* Add default netconf fallback plugin

(cherry picked from commit b12e90311f)
2018-03-01 23:03:31 +05:30
617659a33c Network Platform docs (#36814) (#36899)
* introduces platform docs

(cherry picked from commit 4f63123320)
2018-03-01 11:47:42 +00:00
a275a39299 Fix eos_vrf integration test failures (#36893) (#36896)
(cherry picked from commit 5c2a1a6124)
2018-03-01 14:30:29 +05:30
dce80b1364 Fix junos_command py3 related issues (#36782) (#36895)
Fixes #36204

*  tostring() input string shoulb be in byte string format
*  to_ele() input is required in unicode format
(cherry picked from commit 41d75783b5)
2018-03-01 14:29:54 +05:30
f3653747bb Fix nxos_interface multiple issues (#36827) (#36891)
* fix interface_type

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix setting mtu, doc for state check param, doc for params applicable for ethernet intf

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* speed idempotence and add unittest

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fabric_forwarding_anycast_gateway applicable for svi type intf only

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix speed

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 2fbfce06e7)
2018-03-01 11:19:02 +05:30
5c65fa3e00 Convert key to snake. Fixes #36845. (#36887) 2018-02-28 22:04:54 -06:00
f5684acee5 Updated the documentation of modules to match argspec including the type setting for bool parameters (#36821) (#36860)
(cherry picked from commit 60e39b9718)
2018-02-28 16:07:45 +00:00
bfbea05d26 Fix broken links (#36864) (#36866)
(cherry picked from commit 41c066eff9)
2018-02-28 15:56:45 +00:00
8040168c4f aws_ssm_parameter_store module - value parameter should be no_log since it's often a secret (#36843) (#36859)
(cherry picked from commit 3f19ef680a)
2018-02-28 14:43:27 +00:00
3257fe28f3 Fixes for oVirt modules (#36846)
* ovirt_vms: Fix boot devices idempotence

* ovirt_host_networks: Fix removing the label

* ovirt_vms: Fix NoneType in placement policy check

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1549082

* int("255.255.255.0" does not work, fixes issue #33867 (#36271)
2018-02-28 13:33:23 +00:00
f14e0e7ee3 clarify the slicing example (#36842) (#36847)
As stated by fellow contributors, update the slicing example

Resolves:
Related: #36625
Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
(cherry picked from commit 8362ddd107)
2018-02-28 13:31:33 +00:00
d4252c89e9 nso_config break cycles in dependency sorting (#36828) (#36838)
False assumption that values can not have cyclic dependencies. Fix by
removing dependency on self and look for cycles, if found remove
dependency to get a partial sort done.
(cherry picked from commit 042c111563)
2018-02-28 11:33:18 +00:00
fb630c926a nxos_facts fix and integration tests (#36796) (#36820)
* fix nxos_facts ipv6 error

* time_range not supported for N35

(cherry picked from commit db43fe6a76)
2018-02-28 10:54:35 +05:30
409193a7dc Explain what the Ansible Quickstart video does (#36453) (#36793)
* Explain what the Ansible Quickstart video does

Rewrote what video does. The video is really not teaching you how to do the work. It explains why you'd want to use Ansible and shows you what it takes (some sample code) . Video also introduces you to other products in the Ansible ecosystem.

(cherry picked from commit de7692b1c9)
2018-02-27 18:48:13 +00:00
19ea7bcdd8 nso_config work around ordering issues (#36774) (#36785)
Include dependencies when sorting entries to avoid issues with certain
versions of NSO.
(cherry picked from commit e75989ec88)
2018-02-27 15:41:34 +00:00
99f4e016bb Added extra choice floppy for bootdev option in ipmi_boot module (#36174) (#36784)
(cherry picked from commit 52627f3fa0)
2018-02-27 15:21:41 +00:00
9e9f910cb6 ec2_group:documentation explicit a behaviour for sg rules (#36627) 2018-02-27 16:07:18 +10:00
78cc85fa27 Fix rst link syntax.
(cherry picked from commit 3937082892)
2018-02-26 11:18:38 -08:00
e1eae55e55 skip fmg_script unit test if the pyFMG script is not present (#36732) (#36749)
* skip fmg_script unit test if the pyFMG script is not present

* appease the sanity test gods

(cherry picked from commit 6bd715a17d)
2018-02-26 12:41:14 -05:00
b86f07324e fix cliconf get_config method to match base signature (#36682)
This commit fixes up the get_config method to match the minimum method
signature as defined by the base class.  Without this patch, the
get_config method calls will fail in some cirumstances.

(cherry picked from commit fb6a8c0133)
2018-02-26 10:57:25 -05:00
eb12520854 cs_sshkeypair: fix ssh key rename (#36726) (#36730)
* tests: cs_sshkeypair: add reproducer for failed key rename

* cs_sshkeypair: fix rename ssh key

(cherry picked from commit cdb2969703)
2018-02-26 15:45:39 +01:00
5052db2698 NSO ValueBuilder improvements. 4.5 leaf-list compatability. (#36583) (#36735)
Fix issues in ValueBuilder used in nso_config and nso_verify so that it
can handle leaf-list in NSO 4.5 and detect identityref types from
unions.

Fail gracefully if a type is not found.
(cherry picked from commit 2789cc5c09)
2018-02-26 13:50:11 +00:00
d67d19bc1f Backport/2.5/36722 (#36733)
* Fix sanity checks in OpenStack docs fragment (#36722)

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>
(cherry picked from commit 8b52006d5c)
2018-02-26 13:48:38 +00:00
0aa62a54cd allows ib_spec attrs to be filtered in update (#36673)
* allows ib_spec attrs to be filtered in update

This change will allow the ib_spec entries to be be filtered on a change
object by setting the update keyword to false.  The default value for
update is true.  When the update keyword is set to false, the keyed
entry will be removed from the update object before it is sent to the
api endpoint.

fixes #36563

* fix up pep8 issues

(cherry picked from commit 93b795baf0)
2018-02-26 08:17:55 -05:00
6bf30f65b9 Fix typos (#36671) (#36724)
Fix minor typos
(cherry picked from commit 487ff1fe9b)
2018-02-26 11:27:24 +00:00
b1bdc5dae2 nxos_vlan, nxos_linkagg fix (#36711)
* fix nxos_vlan aggregate (#36710)

* fix nxos_vlan aggregate

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 44332bda78)

* nxos_linkagg fix (#36706)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit d6912cf40e)
2018-02-26 13:01:20 +05:30
d60eac9bc4 Decouple config and state check in vlan and vrf network modules (#36386) (#36704)
* Decouple config and state check in {network_os }_vlan and { network_os }_vrf modules

Fixes #35567
Fixes #34754

`interfaces` option is used for configuration as well as operational state
check. If interface is configured to given vlan or vrf but if
operational state of interface is disabled it results in module failure.

Fix is to decouple same option usage for config and state.
With this fix `interfaces` is used as config option and a new
option named `associated_interfaces` will be used for intent check
for assigned interfaces.

* Fix CI failures

* Fix review comment

* Fixed integration test failure

(cherry picked from commit 5a6b893240)
2018-02-26 10:16:39 +05:30
a48254275f Temporarily disable subversion test on osx.
(cherry picked from commit f283edcb19)
2018-02-24 17:26:39 -08:00
b717765d59 Fix documentation of validate_certificates option in aws doc_fragment.
Unignore sanity test failures for AWS modules caused by this common
fragment.

(cherry picked from commit 2a0c7c4331)
2018-02-23 21:42:36 -08:00
e1174f8864 fix yamllint issue (#36636) 2018-02-23 13:30:48 +00:00
e77c1b9e42 New release v2.5.0rc1 2018-02-22 17:40:29 -08:00
98882b725f 2.5.0rc1 CHANGELOG prep 2018-02-22 17:34:03 -08:00
97a7c3f39c rename versioned CHANGELOGs with dash 2018-02-22 17:32:58 -08:00
2ddcdb8720 Revert "Add force option to systemd module (#35925)"
(mistaken cherry pick)

This reverts commit 9935cda4a3.
2018-02-22 17:10:05 -08:00
917e5ae5d8 Improve convert_bool error message
The error message as it was confused me when the value was 'enabled' and
there was also a module parameter named 'enabled'.

    enabled is not a valid boolean.  Valid booleans include: yes, on, 1, true, ...

So by clearly describing it as a value, the confusion would have been
avoided.

    The value 'enabled' is not a valid boolean.  Valid booleans include: yes, on, 1, true, ...

(cherry picked from commit 487cf0ee8d)
2018-02-22 16:36:29 -08:00
ed9781bbfb Do not cache the loop item label so that it will update with each item (#36609)
Add integration test for #36430 (#36432)

(cherry picked from commit d1f76939e5)
(cherry picked from commit 9fced4f0a9)
2018-02-22 16:08:00 -08:00
b1e125b718 Backport missing integration tests (#36610)
Somehow this file was missing from the previous backport.
2018-02-22 15:18:06 -08:00
3d1c8bc2e1 Network Getting started docs (#36337) (#36597)
* first draft of getting started guide
(cherry picked from commit 51a010a696)
2018-02-22 15:15:11 -08:00
f8d8d84f05 Win feature error cp (#36559)
* win_feature: better error handling to make it easier to debug issues (#36491)

* win_feature: better error handling to make it easier to debug issues

* removed ignroed pslint rules that are no longer needed

(cherry picked from commit ef4f8851dc)

* Added changelog for win_feature error handling fix
2018-02-22 15:05:13 -08:00
9bd7147bb8 Start of tests for modify_module, specifically to ensure proper shebang replacement on old style modules (#36602) (#36606)
(cherry picked from commit a7062b7587)
2018-02-22 14:56:03 -08:00
7e378e791c Bump OpenShift client req to 0.4.3. Fixes openshift_scale. (#36580) 2018-02-22 16:14:26 -05:00
980b6a00e2 Fixup VMware module docs issues (#36409) (#36523)
Fix various argspec vs documentation issue

(cherry picked from commit 5d0ed38e3a)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-22 08:44:09 -08:00
c4e94af4e9 [cloud] catch NoCredentialsError in boto3_conn (#36545) 2018-02-21 23:18:41 -05:00
e93cc41211 Bp 2.5 ansible interpreter py3 (#36561)
* Fix types when evaluating interpreter (#36541)

* Fix types when evaluating interpreter. Fixes #36536
* Rename variables that contain bytes to b_*
* Get rid of to_text() and to_bytes() calls that do nothing (because the
  data is already the proper type)

(cherry picked from commit a4df4d33ac)

* Changelog entry for the ansible_*_interpreter fix
2018-02-21 20:05:14 -08:00
84debca5fb Check for regexp match when using insertbefore or insertafter (#36474) (#36552)
Add tests to cover this scenario
Add changelog fragment
Fixes #36156

(cherry picked from commit 723daf3e3a)
2018-02-21 18:08:45 -08:00
26cdfd84a0 Bring aws_ssm None fixes into stable (from #36456) (#36492)
* aws ssm parameter lookup - change to reutrn Nones for missing variables

* aws ssm parameter lookup - fix error case message to dump response

* aws ssm parameter lookup - fix integration test cases
2018-02-21 20:53:31 -05:00
7965ecb962 efs: improve documentation about the update of an efs (#36473)
(cherry picked from commit 3abaa43b1c)
2018-02-21 20:36:04 -05:00
138ed416eb Changelog fragment copy edits. (#36555)
* Changelog fragment copy edits.

* Typo fixes.

* Typo fix 2.
2018-02-21 16:21:31 -08:00
df78df5d90 Apply all devel ACI changes missing from stable-2.5 (#36553) 2018-02-21 15:36:47 -08:00
61c1241a77 reformat multiline bugfix entries 2018-02-21 13:51:40 -08:00
0057cfa066 remove plugin sections from reno config
* we'll generate those at runtime using plugin metadata instead of trying to cobble together from sections
2018-02-21 13:12:33 -08:00
54f9f06edc [cloud] ec2_group: fix check mode when using tags (#36503)
Fixes #36412
2018-02-21 15:39:29 -05:00
cb73fba369 Add note to use script module rather than inline here documents (#32863)
* Add example on how to use a here document with shell module

* Remove here doc example and add note to use script module instead

(cherry picked from commit 5e7ee9df0a)
2018-02-21 15:10:12 -05:00
7f9fdbbb30 Revert "remove query/q (#36315)"
This reverts commit b47d2e07e1.

query is a feature for 2.5.  We're not reverting it now.

(cherry picked from commit 03a6d72633)
2018-02-21 11:03:55 -08:00
741b941f33 [cloud] If inventory file isn't able to be parsed by aws_ec2, raise an AnsibleParserError (#36387) (#36459)
* If inventory file isn't able to be parsed by aws_ec2, return an empty dict instead of None

* Raise an AnsibleParserError instead

* remove extra lines

* aws_ec2 inventory plugin - fix path matching logic
2018-02-21 13:50:14 -05:00
32515884ef [cloud] Change to longer interval jittered backoffs for AWS facts (#36266) (#36464)
* Change to longer interval jittered backoffs for security group fact gathering

* Add the ECS throttling error code to the list of things to retry on
2018-02-21 13:49:28 -05:00
77af8f36cb [cloud] Retry WAF actions on WAFStaleDataException (#36405) (#36507)
Add a util to run functions with AWSRetry to retry on WAFStaleDataExceptions and update ChangeToken for each attempt
2018-02-21 13:46:29 -05:00
234ba3f8b3 [ec2_vpc_net_facts] Fix UnsupportedOperation for regions other than u… (#35302) (#36512)
* [ec2_vpc_net_facts] Fix UnsupportedOperation for regions other than us-east-1

* Make fix more Pythonic

* Fix the exception handling for the module
2018-02-21 13:45:38 -05:00
2c8d9beca3 cherry-pick #36470 for 2.5 (#36525)
* Re-use logic from StrategyBase._load_included_file in StrategyModule.run for free and linear (#36470)

This improves include_role performance and recursion limits

(cherry picked from commit 10fefc7156)

* Add changelog for 36470
2018-02-21 09:34:13 -08:00
bcc3ce8d74 [cloud] Better handling of absent AWS SES identity notification information. (#36354) (#36515)
* Better handling of absent AWS SES identity notification information.

Fixes #36065

aws_ses_identity module now handles the cases where information about
the notification setup for the identity isn't returned by the AWS api.

This seems to happen in an edge case, believed to be eventual
consistency on registering new identities. So this case is treated
as if has been no notification setup for the identity yet.

Also fix 2 flake8 warnings in the module, a missing newline and unused
import.

* Increase the Boto Retries on SES APIs to deal with throttling.

This should address the unstable integration test failing due to
parallel runs in shippable hitting AWS throttling.

* Add retries loading SES details for inclusion in successful response.

There seems to be an eventual consistency behaviour with identity
registration. It's possible to still get no identity back after
registration.

This can cause failures in the shippable builds. This should fix that by
creating a retry of retrieving the identity information after
registration.

A similar retry loop has been added to notification attributes to ensure
this doesn't suffer from the same failure.

* Add missing sleep in get_notification_attributes to avoid busy loop.
2018-02-21 12:33:33 -05:00
7188165dd1 remove query/q (#36315)
* remove query/q

remove and fixed tests for removed func

* paren fix

(cherry picked from commit b47d2e07e1)
2018-02-21 10:45:50 -05:00
c6af155049 catch all cases of no inventory when asked to fail
fixes #36034

(cherry picked from commit fdbd1297cf)
2018-02-21 10:45:50 -05:00
16845be9b1 nxos fixes (#36514)
* fix nxos_pim module doc (#36505)

* fix nxos_pim module doc

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* address review

(cherry picked from commit 9598978e12)

* nxos_vrf fix (#36494)

* nxos_vrf fix

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Address review

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 713828804d)
2018-02-21 20:15:09 +05:30
9935cda4a3 Add force option to systemd module (#35925)
* Add force option to systemd module

* Use multi-line YAML syntax in examples

* Add version_added for new option

(cherry picked from commit 2bffcfa63b)
2018-02-21 08:30:20 -05:00
7e1ff91a5a cs_user: fix return user_api_secret for ACS v4.10 and later (#36447) (#36489)
(cherry picked from commit 6402a3e504)
2018-02-21 11:04:52 +01:00
9b00fd4ca1 fetch: set fail_on_missing: True as default as per docs (#36469)
* fetch: set fail_on_missing: True as default as per docs

* Updated docs for fetch to say behaviour was changed in 2.5 and updated tests

(cherry picked from commit df8a5d7a4f)
2018-02-21 18:11:32 +10:00
28fb690cc3 fail module when config is invalid and jsonrpc doesn't return error (#36482) (#36488)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit d5858bbcbe)
2018-02-21 13:25:12 +05:30
6eb248a327 removed to_subnet from list of imports on ios_l3_interface.py as it was not being used (#35969) (#36450)
(cherry picked from commit 15fa18a619)
2018-02-21 12:36:56 +05:30
b458dfc222 fixed conditional error message (#36476) (#36485)
(cherry picked from commit f207897f32)
2018-02-21 12:08:59 +05:30
6ff000254f vyos_config IndexError in sanitize_config (#36375) (#36484)
* Bug in del(list) logic. Say you have a list of 4 elements a[0-3]
and you have to remove index 1 and 3, if you remove index 1 first
then list is cut short a[0-2] and does not have index 3

Fix: Remove indexes in reverse sorted order e.g. 3 and 1 in above
example so that order of indexes remain preserved even after deleting

fix is to remove indexes in reverse sorted order

* Add test cases for failed case

(cherry picked from commit 0bbea9a579)
2018-02-21 12:06:16 +05:30
d86d4907cc fix nxos_bgp_neighbor_af issues (#36472) (#36481)
(cherry picked from commit 47a92386c9)
2018-02-21 10:29:18 +05:30
4f5ac56c53 Fix nxos_banner module for unstructured output (#36411) (#36479)
* Fix nxos_banner module for unstructured output

* Refactor and bug fixes

* Fix pep8 error

(cherry picked from commit ef7d574920)
2018-02-21 10:04:56 +05:30
8db5d139a1 Fix path handling in validate-modules sanity test.
(cherry picked from commit a9b58b84d8)
2018-02-20 13:57:58 -08:00
108cbbc40e fix vyos_l3_interface adding multiple addresses to interface (#36377) (#36443)
* fix vyos_l3_interface adding multiple addresses to interface

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* add test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 3d06ce245a)
2018-02-20 21:07:17 +05:30
0ee6771659 remove extra fields from debug output
fixes #35493

updated tests

(cherry picked from commit a79378fccb)
2018-02-20 08:46:12 -05:00
6d1a9a8211 hide uneeded fields for callbacks (#36259)
* hide uneeded fields for callbacks

fix selective instead of pushing uneeded fields to the methods

* piipii

(cherry picked from commit 6af5693dc2)
2018-02-20 08:43:48 -05:00
46b565cd96 now get_url defaults to module temp dir (#36218)
* now get_url and other modules default to module temp dir

also fixed 'bare' exception

* allow modules to work with older versions

* updated docs per feedback

(cherry picked from commit c119d54e4a)
2018-02-20 08:43:48 -05:00
21b74f7cce fix nxos_bgp_neighbor issues (#36318) (#36420)
(cherry picked from commit 80d19e6af3)
2018-02-20 11:21:33 +05:30
3b1c90cd7c Depreciate aos (#36029) (#36393)
* Deprecate Apstra's aos_* modules

These modules don't work with AOS 2.1 or higher.
They will be replaced non-upstreamed modules
2018-02-19 19:30:12 -08:00
9cea95203c Use pycrypto backend, rather than python-cryptography, on Ubuntu Precise
(cherry picked from commit e3192fb3a4)
2018-02-19 13:40:05 -08:00
b5122731b1 Fix the script and patch plugins tempfile ownership
Unified tmp accidentally removed the containing tmpdir from the list of
files to fix the permissions on when we're becoming a different
unprivileged user.  This resulted in a visible bug for script but not
for patch.  This is because patch also uploads the module to the same
temporary directory and the uploaded module also ends up calling
fixup_perms2() which includes the temporary directory.  So by the time
patch needs to access the temporary patch file, the directory is
appropriately set.

script's breakage was visible because script does not upload a module
(it's akin to raw in this way).  Therefore, we only call fixup_perms2()
once in script and so leaving out the tmpdir in script means that the
containing directory never has its permissions set appropriately.

Fixing both because it does not cause an extra round trip for patch so
any speedup would be minimal and it's better to fix the perms as close
as possible to where we know we need it.  Otherwise, changes to
seemingly unrelated code later could end up breaking it.

Fixes #36398

(cherry picked from commit edaeb69a35)
2018-02-19 13:08:39 -08:00
688bf25bda Fixed Arista typo in docstring (#36139) (#36399)
(cherry picked from commit 08eaf37ca8)
2018-02-19 23:15:08 +05:30
51673f431f Update network debug troubleshooting guide (#36288) (#36391)
* Update network debug troubleshooting guide

Fix #35914

Command timeout and connection timeout error messages
are dsiplayed in log file instead on console.
Update the same in troubleshooting guide.

* Update example error

* Fix CI issues

* Fix more CI failures

* More fixes

* Fix review comments

* Fix more review comments

* Copy edit

(cherry picked from commit b57cc7cf31)
2018-02-19 21:17:54 +05:30
7dcf5aed02 sphinx_rtd_theme/layout.html 2.5 (#36390) 2018-02-19 15:12:01 +00:00
9692394c7d Stable 2.5 (#36374)
* Set hostname to 'switch' on nxos_system (#36373)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit eb7f4460c8)

* fix nxos_config json pipeline error (#36236)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 736d6406c0)
2018-02-19 11:22:30 +05:30
22b4d69a7b nxos_system test fix inventory_hostname_short (#36359) (#36360)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit a5654bd63c)
2018-02-18 10:38:34 +05:30
f5fa91c152 Remove kickstart_image_required check (#36319) (#36342)
(cherry picked from commit 6e096cb0c9)
2018-02-17 13:16:11 +05:30
b08bdc5f6d nxos fix cherry-pick (#36340)
* Fix nxos_system tests (#36201)

* Fix nxos_system tests

* Add debug connection plugin info

* Move sanity test under common

(cherry picked from commit 5b5d24631a)

* Fixes for the N3500 platform that uses the A8 image (#36261)

* fix nxos_l3_interface tests as n35 doesn't support ipv6

* add terminal dont-ask to nxos_feature and nxos_lldp

* put interfaces in L2 mode for N35

* fix nxos_feature unit-tests

(cherry picked from commit e24c547a3a)
2018-02-17 12:20:42 +05:30
d568701254 Fix structured output bug (#36193) (#36310)
(cherry picked from commit ac169f5ffd)
2018-02-17 09:57:16 +05:30
9049ba0f2d Fix None stringification call to send_command (#36254) (#36309)
send_command already performs the to_bytes safely on prompts (checking
for None).  Without this check the literal 'None' became a subprompt trigger!

Fixes #35662

(cherry picked from commit f2818caa61)
2018-02-16 15:48:13 -05:00
99b23dce92 fix spelling. Seriously, that's it.
(cherry picked from commit e8fc269cd3)
2018-02-16 13:20:44 -05:00
f00dd99ea2 Fix ansible-console always asking for vault passwords
ansible-console was calling setup_vault_secrets
twice. Once directly and once via _play_prereqs()

The direct invocation was not setting auto_prompt=False.

However, the direct invocation isn't need at all so
this removes it so only _play_reqs() is used.
That fixes the unrequested vault password
prompting.

Fixes #33027

(cherry picked from commit 810fa7046b)
2018-02-16 13:19:59 -05:00
57bccd10af updates to module testing (#36043)
* updates to module testing

gives those using internal modules an alternative

* Copy edit

(cherry picked from commit 3eff279dd7)
2018-02-16 13:19:28 -05:00
cf196613ff re enabled tests that were fixed in ansible/ansible-modules-core#5008 (#36257) (#36303)
(cherry picked from commit a7c2f6d092)
2018-02-16 10:54:41 -05:00
80b91613a8 Improved language around in_vpc parameter. (#36137) (#36302)
(cherry picked from commit 6a3fd92654)
2018-02-16 13:17:35 +00:00
62139bb828 v2.5.0b2 release cut 2018-02-16 01:13:00 -08:00
3635961b1b updates to porting guide (#36219)
* updates to porting guide

(cherry picked from commit 7a6d6870d4633ae38a14cc799521b5fc1c0320fd)

* Edits to correct spelling, grammar, and clarify wording.

* Fixed typo

(cherry picked from commit 1f363a6a7c)
2018-02-15 23:55:09 -08:00
179aa475a5 aci_firmware_source: Add integration tests (#36246)
This PR includes:
- Rename 'protocol' parameter to 'url_protocol'
- Add limited integration tests (as we have no public firmware access)
- Add missing examples
(cherry picked from commit e1b5bc049c)
2018-02-15 23:53:17 -08:00
dd92db800a aci_taboo_contract: Add integration tests and examples (#36276)
This PR includes:
- Missing integration tests
- Missing examples
- Two typo's in other integration tests
(cherry picked from commit 334e405e6f)
2018-02-15 23:52:06 -08:00
51c4fceb64 aci_domain_to_encap_pool: Add integration tests (#36217)
(cherry picked from commit d86c5aee3c)
2018-02-15 23:50:07 -08:00
eb0232fa86 aci_encap_pool: Standardize on 'pool_allocation_mode' (#36215)
(cherry picked from commit e431d578da)
2018-02-15 23:46:35 -08:00
66e7c8d938 ACI: Avoid using 'previous' with query operations (#36181)
When ACI modules are being used for querying MOs, we should not return
the previous state, as there is no previous state, there's only the
current state.

This impacts a lot of tests that were used to testing the current state
as 'previous'.
(cherry picked from commit dba561efa7)
2018-02-15 23:45:50 -08:00
38b000062f aci_vlan_pool: Improve integration tests (#36173)
This PR includes:
- More elaborate integration tests
- Split static and dynamic VLAN pools in separate files
(cherry picked from commit 3093285c94)
2018-02-15 23:44:12 -08:00
92cb719a2d Relocate ACI guide and add to TOC (#36208)
(cherry picked from commit c5dd0d97af)
2018-02-15 23:43:12 -08:00
abd7a9a384 2.5 changelog update for 33393 2018-02-15 23:41:43 -08:00
fb46cf3718 VMware: Fix DVPG idempotency issue (#36285)
This fixes, cloning operation where template or existing VM
does not have network or DVPG. Also, adds some strict type checking in
network parameters.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit a377302d6b)
2018-02-16 13:07:23 +05:30
ba6a242f17 Fix typo in vars.rst (#35098)
(cherry picked from commit 43eb97ef92)
2018-02-15 23:36:53 -08:00
5ce2822855 aci_aep_to_domain: Fix query all objects (#36131)
This PR includes:
- A fix to the module where domain_type without domain caused havoc
- A fix to the integration tests when querying all binding objects
- Improvements to integration tests
(cherry picked from commit 7897558b95)
2018-02-15 23:36:11 -08:00
a3ae64440d ACI docs: Add more links to resources and community (#36101)
This PR includes:
- Adding more resources to each section
- Improving wordings
- Add links to the Ansible ACI community pages
(cherry picked from commit a875363e35)
2018-02-15 23:35:03 -08:00
5a8313f3a2 ACI docs: Add a section about common error messages (#36088)
Since we pass information directly to ACI, we sometimes get error messages back to the user that require some additional information or context.

This PR includes:
- Changes to the default error output so the error is easier to find
  when searching in e.g. Google
- 3 specific error messages that we have encountered and has confused
  our users before
(cherry picked from commit 218f008dab)
2018-02-15 23:34:25 -08:00
b85989205f aci_domain_to_vlan_pool: Add missing integration tests (#36079)
(cherry picked from commit 9f028e9dea)
2018-02-15 23:33:46 -08:00
66eed80f71 better sudo/su deprecation on config entries (#36074)
* better sudo/su deprecation on config entries

fixes #32130

* typo fixes

* Copy edit

* Fixed more instances

(cherry picked from commit 9066b17d5d)
2018-02-15 23:33:18 -08:00
e81c181881 aci_aep_to_domain: Add missing integration tests (#36071)
(cherry picked from commit 98a3059f7b)
2018-02-15 23:32:22 -08:00
b546dde48c add_host: check if name or hostname arg is provided
(cherry picked from commit 39d9496282)
2018-02-15 23:31:25 -08:00
eec7945222 aci_interface_policy_leaf_policy_group: Fix tests (#35973)
(cherry picked from commit d76db835ff)
2018-02-15 23:30:06 -08:00
76648f358e ACI: Fixes to recent change to parameter choices (#35968)
This PR includes:
- Fixes related to the recent merge of #31637 and #34537
- A generic fix for a reference for assignment issue
- Fixes to aci.boolean() in order to catch exception
(cherry picked from commit 01ba3a4efc)
2018-02-15 23:28:42 -08:00
36e5e4ad62 Fix issue with module (#35960)
(cherry picked from commit 764e78d302)
2018-02-15 23:23:51 -08:00
dd215eac0b ACI: Assorted set of fixes to docs (#35780)
* Assorted set of fixes

* Cosmetic changes to lists

* Add more information related to connection throttling

* Changes to TOC

* Document return values

* More improvements

* Fix casing in title

(cherry picked from commit 80e1e0b017)
2018-02-15 23:12:44 -08:00
c5f7b5baa5 aci_domain: Add missing integration tests (#36051)
(cherry picked from commit 30adc2f124)
2018-02-15 23:11:40 -08:00
6f62dd66bb convert CHANGELOG to per-major-ver and generated
* CHANGELOGs are now per-version
* CHANGELOGs are now RST format
* CHANGELOGs are now generated via reno from YAML fragments located in changelogs/fragements. This allows feature/bugfix changelog fragments to be cherry-picked alongside the code changes
* each version's CHANGELOG_vX.Y.rst is generatd at release-time and can be easily copied/cherry-picked into other branches
2018-02-15 23:06:39 -08:00
e8beb180e1 Add eos_command doc with more examples (#36245) (#36289)
* Add eos_command doc with more examples

*  More examples using cli and eapi transport
*  Example on how to handle json output
*  Example on handling result output in wait_for

* Fix typo

(cherry picked from commit cb52509775)
2018-02-16 12:25:50 +05:30
92e64c9eb9 VMware: re-enable vmware_guest_powerstate tests (#36094)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 66743f33fa)
2018-02-16 11:01:19 +05:30
fe9e887f86 fix nxos_bgp_af issues (#36147) (#36283)
* fix nxos_bgp_af issues

* shippable fix

* review comments

* shippable error fix

(cherry picked from commit 75a34f6668)
2018-02-16 10:12:42 +05:30
f8918e54bb Fix Porting Guide links for Ansible 2.5 (#36185)
The current links result in 404 Not Found. Also changed protocol to HTTPS.

(cherry picked from commit 86918db312)
2018-02-15 16:41:18 -05:00
5ca8b7829a False matches the docs and intentions of the previous developer (#35762)
(cherry picked from commit d212ca11b3)
2018-02-15 15:41:22 -05:00
784932875f Reduces the unit test time of select bigip modules (#36256) (#36260)
The modules in this patch include waits that need to happen to ensure
something is correctly configured on a BIG-IP. These waits were
raised as an issue in a recent ansible-testing meeting.

This patch eliminates the waits by mocking time.sleep
(cherry picked from commit 77fa41795e)
2018-02-15 20:28:45 +00:00
3d81f94349 Update ios_ping.py to allow for count > 70. (#36142) (#36250)
* Update ios_ping.py to allow for count > 70.

Find 'Success...' output rather than relying on list index.  Index -1 won't pass unit test.

(cherry picked from commit fed20b825f)
2018-02-15 14:54:30 -05:00
a7a03bbf4a Normalize usage of temp and tmp on tmp (#36221)
* Normalize usage of temp and tmp on tmp
* Rename system_tmps system_tmpdirs
* Add ANSIBLE_REMOTE_TMP spelling of environment variables

(cherry picked from commit 06f73ad578)
2018-02-15 09:01:33 -08:00
4848652c7a Add a module_utils OpenStack Cloud constructor (#20974)
Start using this to construct shade OpenStack Cloud objects in a
consistent manner. This will let us centralize things like dealing with
password arguments and whatnot. It also allows us to introduce the
ability to pass a fully formed config dict directly to the module.

Migrate all OpenStack modules to use openstack_cloud_from_module.

Have it return the shade library since it's responsible for
importing shade and shade is needed for the exceptions.

Only pull specific OpenStack arguments for the constructor

Rather than passing **module.params to the shade constructor, pull out
only the values that make sense. This should prevent the issues with
module parameters stepping on shade parameters.

Replace module.params.pop with module.params.get

We don't need to pop these anymore since the shade constructor is now
using opt-in values.

Using real urls is ungood. Use example.com domains. Also, get rid of the
antiquated port numbers.

(cherry picked from commit 0f893027c4)
2018-02-15 17:59:05 +01:00
bca8b80069 vars.clean: remove unused method inject_facts (#34838)
* vars.clean: remove unused method inject_facts

Removing this unused method seems better than fixing the typo.

* Fix typo in comments

(cherry picked from commit b3ce136256)
2018-02-15 08:56:38 -08:00
c1dcbb42c7 Alter ASA regexes to be byte-strings (#36176) (#36239)
(cherry picked from commit f67ff4a78e)
2018-02-15 10:57:11 -05:00
38717551f8 Updating URL to Nuage Python VSPK documentation (#36213) (#36232)
Fixes ansible/ansible#35766
(cherry picked from commit cffa3caa60)
2018-02-15 18:36:03 +05:30
a6be3df24c Fix nxos_linkagg tests (#36175) (#36222)
(cherry picked from commit 787114462e)
2018-02-15 11:07:18 +05:30
d4aa089639 Fix line too long
(cherry picked from commit 717c7d26b7)
2018-02-14 19:04:56 -08:00
2e91c2b640 Final fix for #35666 Previous PR (#36143) was merged prematurely.
(cherry picked from commit a612137098)
2018-02-14 18:47:57 -08:00
71a34d005c * Fix for setting remote_tmp as a subdirectory of a system temp dir (#36143)
Fixes #35666

* Check that system_temps is all absolute paths

(cherry picked from commit 15fe59ef0c)
2018-02-14 20:34:52 -05:00
74b120329c never tags docs and test (#35964)
* fufilling the promise

* moved changes

* Copy edit

(cherry picked from commit 0cf70a8970)
2018-02-14 20:34:11 -05:00
078467d18d added support for --testcase flag in ansible-test (#36134)
* added support for --testcase flag in ansible-test

* fixed command format

* added tab completion

* fixed sanity issues

* added documenation for --testcase

* don't autocomplete when multiple modules are selected

(cherry picked from commit 3f5caf659e)
2018-02-14 15:41:43 -08:00
b6c9630094 Upgrade to openshift client 0.4.0 (#35127) (#36195) 2018-02-14 14:53:01 -08:00
41c6415941 fixes to virtual facts
fixes #36038

(cherry picked from commit 97b6e99479)
2018-02-14 15:54:07 -05:00
5f46773151 deal with no config for view
fixes #35965

(cherry picked from commit 3680d65d1d)
2018-02-14 15:53:07 -05:00
15cbe1472d fix loop_control templating (#36124)
* fix loop_control templating

- properly template ALL properites for loop_control
- loop_control inherits from base, it should not, but needs validate/attribute functionality

fixes #24719

(cherry picked from commit 8de4f7cd9f)
2018-02-14 15:52:02 -05:00
03c7751394 Inv export (#36188)
* add export option

* added 'export mode' to ansible-inventory

this optimizes the output for exporting inventory vs representing the 'ansible view'

fixes #30877

* added group priority when needed

(cherry picked from commit b403653bd2)
2018-02-14 15:47:18 -05:00
7dd4625dde win_uri: fix creates/removes option (#36016)
(cherry picked from commit f8d1c97279)
2018-02-15 07:17:59 +11:00
25e02d17d2 win_domain_controller: optionally add -ReadOnlyReplica if true (#36017)
(cherry picked from commit 09d939fb00)
2018-02-15 07:17:48 +11:00
375bc11139 win_updates: fix regression when using string cat names (#36015)
(cherry picked from commit 8fb66c18de)
2018-02-15 07:16:42 +11:00
ac44b2062d Revert "Upgrade to openshift client 0.4.0 (#35127)" 2018-02-14 13:15:39 -05:00
4d79ab64d1 Upgrade to openshift client 0.4.0 (#35127) 2018-02-14 13:13:05 -05:00
67d14c963a Add unit tests for edgeos_command (#35861) (#36184)
(cherry picked from commit 97573d8b0c)
2018-02-14 15:42:27 +00:00
8833823195 Ensure docs are valid before checking deprecation (#36160) (#36182)
(cherry picked from commit 3e22efa0ba)
2018-02-14 15:39:36 +00:00
52e47ce8fe File Module docs, adding mode permission example with sticky bit (#36151) (#36164)
* File Module docs, adding mode permission example with sticky bit
(cherry picked from commit ef9dac548f)
2018-02-14 15:00:28 +00:00
b7f1163ab9 VMware: Additional check for RootSnapshot (#36001) (#36166)
This fix adds an additional check if there is no snapshot available
in VM. `rootSnapshotList` is None, if no snapshot is taken.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 52f79fa5a4)
2018-02-14 12:38:14 +00:00
df751cd834 adding support for loopback interface (#36141) (#36154)
* adding support for loopback interface

currently the loopback interface lo is not supported with vyos_l3_interface, this commit fixes that.  Right now there is a limit of loopback interfaces to just lo, if you want more interfaces you need to use a dummy interface https://wiki.vyos.net/wiki/Dummy_interfaces

* fixing spacing as per pep8 test

fixing issues for sanity test

* ugh, missed on spacing issue

* getting rid of continuation lines, the CI system does not like it

(cherry picked from commit a52a7d2065)
2018-02-14 13:16:43 +05:30
5c94b5daf2 Fixes broken nested tables in module docs (#36144)
(cherry picked from commit dc902a5022)
2018-02-13 15:25:19 -08:00
3e8b0487bb [WIP] Add ios smoke tests (#35972) (#36133)
* added basic ios_smoke files

* added smoke tests for network.common.config

* added tests for network.common.utils

* added remainder of test cases

(cherry picked from commit 01bd9759e3)
2018-02-13 14:06:09 -05:00
3b7ca2ac10 Add docs reorg to changelog 2018-02-13 11:02:05 -08:00
d03202e4d6 Followup to docs refactor pull request #36067 - fixes gitignore and c… (#36120)
* Followup to docs refactor pull request #36067 - fixes gitignore and cleanup in makefile; removes some generated files; moves a straggler to the appropriate subdirectory.

* Fixed some stragglers

* Removed redundant module entries

* Delete generated RST files.

(cherry picked from commit c10080bfba)
2018-02-13 11:00:43 -08:00
8998ec17b8 Core Docs Refactor and Redesign (#36067)
* Docs refactor as outlined in https://github.com/ansible/proposals/issues/79. Moves content into 'guides'; refactors TOC; fixes CSS; design tweaks to layout and CSS; fixes generated plugin, CLI and module docs to fix links accodingly; more.

* Adding extra blank line for shippable

(cherry picked from commit 373b1dcf59)
2018-02-13 11:00:31 -08:00
75528e56bf Acquire displayed messages from forked process (#36064) (#36119)
Also restore verbosity value from loaded `play_context`

(cherry picked from commit 527fc492b9)
2018-02-13 12:49:13 -05:00
14dcf10882 Prevent reparenting a block with itself (#36075)
* Prevent reparenting a block with itself

* Move __eq__ to Block, to avoid some unexpected problems

(cherry picked from commit 76ff3e9efc)
2018-02-13 09:32:40 -06:00
707fd61a78 Fix VyOS check mode (#35977) (#36114)
* Revert "commented out check tests (#35788)"

This reverts commit 3df2561405.

* `discard_changes()` now uses `exit discard`

instead of just `discard`. Also a slight tweak to avoid a second `exit` after
`exit discard`

(cherry picked from commit 6cdf91fd35)
2018-02-13 10:31:04 -05:00
c76caf3c29 Consistant headings (#36112) (#36113)
(cherry picked from commit 480a9c10c9)
2018-02-13 14:48:59 +00:00
82685806b2 provide detailed description of module (#36107) (#36111)
Fix vague description of module.

Resolves:
Related:
Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
(cherry picked from commit 6cfd198b13)
2018-02-13 14:14:26 +00:00
533f4157d1 Fix YAML issue (#36103) (#36105)
(cherry picked from commit e4c04aa0f3)
2018-02-13 12:48:48 +00:00
be92a5f876 fix nxos_interface_ospf issues (#35988) (#36090)
* fix nxos_interface_ospf issues

* review comment

(cherry picked from commit eab1b62cd2)
2018-02-13 10:11:12 +05:30
96b682b157 cherry-pick disable of unstable azure tests 2018-02-12 10:31:10 -08:00
c232d6cb85 Fix more docs vs argspec (#36048) (#36052)
(cherry picked from commit 17c0d3eae0)
2018-02-12 18:05:39 +00:00
72ad157b07 Change wording of Going Further section (#35949) (#36032)
* Change wording of Going Further section

The original wording was confusing with its non-devel branch part.
Made it much clearer for people to understand what to do.

Also removed the git command for creating branches, I believe a
develop should be aware of how basic git commands work.

(cherry picked from commit d5ae63c0ea)
2018-02-12 10:54:06 +00:00
1b9dde7c29 Fix vrf parsing in eos_vrf and eos_eapi module (#35791) (#36023)
* Fix vrf parsing in eos_vrf and eos_eapi module

Fixes #30250

Fix logic to parse vrf when interface value in `show vrf`
command output spans on multiple lines

* Add idempotent test case

(cherry picked from commit 6a223d5576)
2018-02-12 12:59:45 +05:30
d2e5706467 Fix nxos_igmp_interface for diff nxos versions (#35959) (#36019)
(cherry picked from commit 7a711cf942)
2018-02-12 10:41:58 +05:30
50e79c5a14 initial cutover to API profiles (#35538)
* hardcoded API profiles in azure_rm_common
* changed azure_rm_securitygroup module to use api_profiles, dynamic models, kwargs on all SDK methods
* changed azure_rm_containerinstance module to use api_profiles, dynamic models, kwargs on all SDK methods
* fixed polling performance issue in azure_rm_securitygroup (default poll interval was 30s)
(cherry picked from commit 26f551d1c3)
2018-02-09 14:27:30 -08:00
a1d53b4e98 Tower callback fixes (#35927) (#35981)
* Fix tower_callback script return code

* Add ec2_key parameter to integration tests
2018-02-09 14:55:28 -05:00
67590e4e35 Test against a single transport (#35903) (#35970)
Network integration tests can use tags to run only a specific transport
(cherry picked from commit c3523cdd60)
2018-02-09 16:17:34 +00:00
8e7b25025d Accept interfaces without address family or method (#34200) (#35963)
(cherry picked from commit 79b0739ba2)
2018-02-09 15:42:36 +00:00
3f475054fa Add examples and language to better showcase the 'parents' parameter in multiple network modules (#34486) (#35955)
* Add additional language and examples for 'parents' parameter to clarify its usage.
(cherry picked from commit 15b0371eb2)
2018-02-09 13:40:25 +00:00
e2e6e14644 fix nxos_evpn_vni issues (#35930) (#35945)
(cherry picked from commit c7305393a3)
2018-02-09 17:51:53 +05:30
a48cf0cb0d New release 2.5.0b1 2018-02-08 18:44:30 -08:00
ff7b627b8e CHANGELOG module/plugin updates for 2.5 2018-02-08 17:51:45 -08:00
1f49fa2129 stub 2.6 in devel CHANGELOG, update 2.5 info 2018-02-08 17:06:52 -08:00
c1c5433733 Fix for #31477: return 'dest' from copy when file wasn't changed
(cherry picked from commit 89ad40b129)
2018-02-08 16:18:36 -08:00
e55e5cf23e Address memory ballooning caused by task caching changes (#35921)
* Exclude parent when copying included task to avoid memory issues. Fixes #35796

* Simplify implicit block squashing to pre-group, instead of post re-parenting

(cherry picked from commit 7d1eb88ecf)
2018-02-08 15:28:38 -08:00
71c053bd8c branch stable-2.5 2018-02-08 14:34:14 -08:00
12312 changed files with 1113242 additions and 331199 deletions

View File

@ -1,245 +0,0 @@
trigger:
batch: true
branches:
include:
- devel
- stable-*
pr:
autoCancel: true
branches:
include:
- devel
- stable-*
schedules:
- cron: 0 7 * * *
displayName: Nightly
always: true
branches:
include:
- devel
- stable-*
variables:
- name: checkoutPath
value: ansible
- name: coverageBranches
value: devel
- name: entryPoint
value: .azure-pipelines/commands/entry-point.sh
- name: fetchDepth
value: 500
- name: defaultContainer
value: quay.io/ansible/azure-pipelines-test-container:6.0.0
pool: Standard
stages:
- stage: Sanity
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Test {0}
testFormat: sanity/{0}
targets:
- test: 1
- test: 2
- stage: Units
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: units/{0}
targets:
- test: 3.8
- test: 3.9
- test: '3.10'
- test: 3.11
- test: 3.12
- test: 3.13
- stage: Windows
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Server {0}
testFormat: windows/{0}/1
targets:
- name: 2016 WinRM HTTP
test: 2016/winrm/http
- name: 2019 WinRM HTTPS
test: 2019/winrm/https
- name: 2022 WinRM HTTPS
test: 2022/winrm/https
- name: 2022 PSRP HTTP
test: 2022/psrp/http
- name: 2022 SSH Key
test: 2022/ssh/key
- name: 2025 PSRP HTTP
test: 2025/psrp/http
- name: 2025 SSH Key
test: 2025/ssh/key
- stage: Remote
dependsOn: []
jobs:
- template: templates/matrix.yml # context/target
parameters:
targets:
- name: macOS 15.3
test: macos/15.3
- name: RHEL 9.5 py39
test: rhel/9.5@3.9
- name: RHEL 9.5 py312
test: rhel/9.5@3.12
- name: RHEL 10.0
test: rhel/10.0
- name: FreeBSD 13.5
test: freebsd/13.5
- name: FreeBSD 14.2
test: freebsd/14.2
groups:
- 1
- 2
- template: templates/matrix.yml # context/controller
parameters:
targets:
- name: macOS 15.3
test: macos/15.3
- name: RHEL 9.5
test: rhel/9.5
- name: RHEL 10.0
test: rhel/10.0
- name: FreeBSD 13.5
test: freebsd/13.5
- name: FreeBSD 14.2
test: freebsd/14.2
groups:
- 3
- 4
- 5
- template: templates/matrix.yml # context/controller (ansible-test container management)
parameters:
targets:
- name: Alpine 3.21
test: alpine/3.21
- name: Fedora 41
test: fedora/41
- name: RHEL 9.5
test: rhel/9.5
- name: RHEL 10.0
test: rhel/10.0
- name: Ubuntu 24.04
test: ubuntu/24.04
groups:
- 6
- stage: Docker
dependsOn: []
jobs:
- template: templates/matrix.yml # context/target
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3.21
test: alpine321
- name: Fedora 41
test: fedora41
- name: Ubuntu 22.04
test: ubuntu2204
- name: Ubuntu 24.04
test: ubuntu2404
groups:
- 1
- 2
- template: templates/matrix.yml # context/controller
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3.21
test: alpine321
- name: Fedora 41
test: fedora41
- name: Ubuntu 24.04
test: ubuntu2404
groups:
- 3
- 4
- 5
- template: templates/matrix.yml # context/target (dnf-oldest, dnf-latest)
parameters:
testFormat: linux/{0}
targets:
- name: Fedora 41
test: fedora41
groups:
- 7
- stage: Galaxy
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: galaxy/{0}/1
targets:
- test: 3.11
- test: 3.12
- test: 3.13
- stage: Generic
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: generic/{0}/1
targets:
- test: 3.11
- test: 3.12
- test: 3.13
- stage: Incidental_Windows
displayName: Incidental Windows
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Server {0}
testFormat: i/windows/{0}
targets:
- name: 2016 WinRM HTTP
test: 2016/winrm/http
- name: 2019 WinRM HTTPS
test: 2019/winrm/https
- name: 2022 WinRM HTTPS
test: 2022/winrm/https
- name: 2022 PSRP HTTP
test: 2022/psrp/http
- name: 2022 SSH Key
test: 2022/ssh/key
- name: 2025 PSRP HTTP
test: 2025/psrp/http
- name: 2025 SSH Key
test: 2025/ssh/key
- stage: Incidental
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: i/{0}/1
targets:
- name: IOS Python
test: ios/csr1000v/
- stage: Summary
condition: succeededOrFailed()
dependsOn:
- Sanity
- Units
- Windows
- Remote
- Docker
- Galaxy
- Generic
- Incidental_Windows
- Incidental
jobs:
- template: templates/coverage.yml

View File

@ -1 +0,0 @@
remote.sh

View File

@ -1,34 +0,0 @@
#!/usr/bin/env bash
set -o pipefail -eux
declare -a args
IFS='/:' read -ra args <<< "$1"
cloud="${args[0]}"
python="${args[1]}"
group="${args[2]}"
target="shippable/${cloud}/group${group}/"
stage="${S:-prod}"
changed_all_target="shippable/${cloud}/smoketest/"
if ! ansible-test integration "${changed_all_target}" --list-targets > /dev/null 2>&1; then
# no smoketest tests are available for this cloud
changed_all_target="none"
fi
if [ "${group}" == "1" ]; then
# only run smoketest tests for group1
changed_all_mode="include"
else
# smoketest tests already covered by group1
changed_all_mode="exclude"
fi
# shellcheck disable=SC2086
ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
--remote-terminate always --remote-stage "${stage}" \
--docker --python "${python}" --changed-all-target "${changed_all_target}" --changed-all-mode "${changed_all_mode}"

View File

@ -1,62 +0,0 @@
#!/usr/bin/env bash
set -o pipefail -eux
declare -a args
IFS='/:' read -ra args <<< "$1"
script="${args[0]}"
test="$1"
docker images
docker ps
for container in $(docker ps --format '{{.Image}} {{.ID}}' | grep -v -e '^quay.io/ansible/azure-pipelines-test-container:' | sed 's/^.* //'); do
docker rm -f "${container}" || true # ignore errors
done
docker ps
export PATH="${PWD}/bin:${PATH}"
export PYTHONIOENCODING='utf-8'
if [ -n "${COVERAGE:-}" ]; then
# on-demand coverage reporting triggered by setting the COVERAGE environment variable to a non-empty value
export COVERAGE="--coverage"
elif [[ "${COMMIT_MESSAGE}" =~ ci_coverage ]]; then
# on-demand coverage reporting triggered by having 'ci_coverage' in the latest commit message
export COVERAGE="--coverage"
else
# on-demand coverage reporting disabled (default behavior, always-on coverage reporting remains enabled)
export COVERAGE="--coverage-check"
fi
if [ -n "${COMPLETE:-}" ]; then
# disable change detection triggered by setting the COMPLETE environment variable to a non-empty value
export CHANGED=""
elif [[ "${COMMIT_MESSAGE}" =~ ci_complete ]]; then
# disable change detection triggered by having 'ci_complete' in the latest commit message
export CHANGED=""
else
# enable change detection (default behavior)
export CHANGED="--changed"
fi
if [ "${IS_PULL_REQUEST:-}" == "true" ]; then
# run unstable tests which are targeted by focused changes on PRs
export UNSTABLE="--allow-unstable-changed"
else
# do not run unstable tests outside PRs
export UNSTABLE=""
fi
if [[ "${COVERAGE:-}" == "--coverage" ]]; then
timeout=60
else
timeout=50
fi
ansible-test env --dump --show --timeout "${timeout}" --color -v
".azure-pipelines/commands/${script}.sh" "${test}"

View File

@ -1 +0,0 @@
remote.sh

View File

@ -1 +0,0 @@
remote.sh

View File

@ -1 +0,0 @@
cloud.sh

View File

@ -1,18 +0,0 @@
#!/usr/bin/env bash
set -o pipefail -eux
declare -a args
IFS='/:' read -ra args <<< "$1"
python="${args[1]}"
if [ "${#args[@]}" -gt 2 ]; then
target="shippable/generic/group${args[2]}/"
else
target="shippable/generic/"
fi
# shellcheck disable=SC2086
ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
--docker default --python "${python}"

View File

@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Temporary script to support side-by-side testing for incidental code coverage.
# Once collection migration has been completed the incidental tests can be combined with the regular tests.
set -o pipefail -eux
declare -a args
IFS='/:' read -ra args <<< "$1"
script="${args[1]}"
IFS='/' test="${args[*]:1}"
".azure-pipelines/commands/incidental/${script}.sh" "${test}"

View File

@ -1 +0,0 @@
network.sh

View File

@ -1,40 +0,0 @@
#!/usr/bin/env bash
set -o pipefail -eux
declare -a args
IFS='/:' read -ra args <<< "$1"
platform="${args[0]}"
version="${args[1]}"
python_version="${args[2]}"
target="shippable/${platform}/incidental/"
stage="${S:-prod}"
provider="${P:-default}"
# python versions to test in order
# all versions run full tests
IFS=' ' read -r -a python_versions <<< \
"$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._internal import constants; print(" ".join(constants.CONTROLLER_PYTHON_VERSIONS))')"
if [ "${python_version}" ]; then
# limit tests to a single python version
python_versions=("${python_version}")
fi
for python_version in "${python_versions[@]}"; do
# terminate remote instances on the final python version tested
if [ "${python_version}" = "${python_versions[-1]}" ]; then
terminate="always"
else
terminate="never"
fi
# shellcheck disable=SC2086
ansible-test network-integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
--platform "${platform}/${version}" \
--docker default --python "${python_version}" \
--remote-terminate "${terminate}" --remote-stage "${stage}" --remote-provider "${provider}"
done

View File

@ -1,46 +0,0 @@
#!/usr/bin/env bash
set -o pipefail -eux
declare -a args
IFS='/:' read -ra args <<< "$1"
version="${args[1]}"
connection="${args[2]}"
connection_setting="${args[3]}"
target="shippable/windows/incidental/"
stage="${S:-prod}"
provider="${P:-default}"
# python version to run full tests on while other versions run minimal tests
python_default="$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._internal import constants; print(constants.CONTROLLER_MIN_PYTHON_VERSION)')"
# version to test when only testing a single version
single_version=2022
# shellcheck disable=SC2086
ansible-test windows-integration --list-targets -v ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} > /tmp/explain.txt 2>&1 || { cat /tmp/explain.txt && false; }
{ grep ' windows-integration: .* (targeted)$' /tmp/explain.txt || true; } > /tmp/windows.txt
if [ -s /tmp/windows.txt ] || [ "${CHANGED:+$CHANGED}" == "" ]; then
echo "Detected changes requiring integration tests specific to Windows:"
cat /tmp/windows.txt
echo "Running Windows integration tests for the version ${version}."
else
echo "No changes requiring integration tests specific to Windows were detected."
echo "Running Windows integration tests for a single version only: ${single_version}"
if [ "${version}" != "${single_version}" ]; then
echo "Skipping this job since it is for: ${version}"
exit 0
fi
fi
# shellcheck disable=SC2086
ansible-test windows-integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
--controller "docker:default,python=${python_default}" \
--target "remote:windows/${version},connection=${connection}+${connection_setting},provider=${provider}" \
--remote-terminate always --remote-stage "${stage}"

View File

@ -1,18 +0,0 @@
#!/usr/bin/env bash
set -o pipefail -eux
declare -a args
IFS='/:' read -ra args <<< "$1"
image="${args[1]}"
if [ "${#args[@]}" -gt 2 ]; then
target="shippable/posix/group${args[2]}/"
else
target="shippable/posix/"
fi
# shellcheck disable=SC2086
ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
--docker "${image}"

View File

@ -1 +0,0 @@
remote.sh

View File

@ -1,32 +0,0 @@
#!/usr/bin/env bash
set -o pipefail -eux
declare -a args
IFS='/:' read -ra args <<< "$1"
platform="${args[0]}"
version="${args[1]}"
pyver=default
# check for explicit python version like 8.3@3.8
declare -a splitversion
IFS='@' read -ra splitversion <<< "$version"
if [ "${#splitversion[@]}" -gt 1 ]; then
version="${splitversion[0]}"
pyver="${splitversion[1]}"
fi
if [ "${#args[@]}" -gt 2 ]; then
target="shippable/posix/group${args[2]}/"
else
target="shippable/posix/"
fi
stage="${S:-prod}"
provider="${P:-default}"
# shellcheck disable=SC2086
ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
--python "${pyver}" --remote "${platform}/${version}" --remote-terminate always --remote-stage "${stage}" --remote-provider "${provider}" \

View File

@ -1 +0,0 @@
remote.sh

View File

@ -1,41 +0,0 @@
#!/usr/bin/env bash
set -o pipefail -eux
declare -a args
IFS='/:' read -ra args <<< "$1"
group="${args[1]}"
group2_include=(
ansible-doc
changelog
package-data
pep8
pylint
validate-modules
)
group1_exclude=(
"${group2_include[@]}"
)
options=()
case "${group}" in
1)
for name in "${group1_exclude[@]}"; do
options+=(--skip-test "${name}")
done
;;
2)
for name in "${group2_include[@]}"; do
options+=(--test "${name}")
done
;;
esac
# shellcheck disable=SC2086
ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
--docker \
"${options[@]}" --allow-disabled

View File

@ -1 +0,0 @@
remote.sh

View File

@ -1,89 +0,0 @@
#!/usr/bin/env bash
set -o pipefail -eux
declare -a args
IFS='/:' read -ra args <<< "$1"
version="${args[1]}"
connection="${args[2]}"
connection_setting="${args[3]}"
group="${args[4]}"
target="shippable/windows/group${group}/"
stage="${S:-prod}"
provider="${P:-default}"
# python versions to test in order
IFS=' ' read -r -a python_versions <<< \
"$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._internal import constants; print(" ".join(constants.CONTROLLER_PYTHON_VERSIONS))')"
# python version to run full tests on while other versions run minimal tests
python_default="$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._internal import constants; print(constants.CONTROLLER_MIN_PYTHON_VERSION)')"
# version to test when only testing a single version
single_version=2022
# shellcheck disable=SC2086
ansible-test windows-integration --list-targets -v ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} > /tmp/explain.txt 2>&1 || { cat /tmp/explain.txt && false; }
{ grep ' windows-integration: .* (targeted)$' /tmp/explain.txt || true; } > /tmp/windows.txt
if [ -s /tmp/windows.txt ] || [ "${CHANGED:+$CHANGED}" == "" ]; then
echo "Detected changes requiring integration tests specific to Windows:"
cat /tmp/windows.txt
echo "Running Windows integration tests for the version ${version}."
else
echo "No changes requiring integration tests specific to Windows were detected."
echo "Running Windows integration tests for a single version only: ${single_version}"
if [ "${version}" != "${single_version}" ]; then
echo "Skipping this job since it is for: ${version}"
exit 0
fi
fi
for py_version in "${python_versions[@]}"; do
changed_all_target="all"
changed_all_mode="default"
if [ "${py_version}" == "${python_default}" ]; then
# smoketest tests
if [ "${CHANGED}" ]; then
# with change detection enabled run tests for anything changed
# use the smoketest tests for any change that triggers all tests
ci="${target}"
changed_all_target="shippable/windows/smoketest/"
if [ "${target}" == "shippable/windows/group1/" ]; then
# only run smoketest tests for group1
changed_all_mode="include"
else
# smoketest tests already covered by group1
changed_all_mode="exclude"
fi
else
# without change detection enabled run entire test group
ci="${target}"
fi
else
# only run minimal tests for group1
if [ "${target}" != "shippable/windows/group1/" ]; then continue; fi
# minimal tests for other python versions
ci="shippable/windows/minimal/"
fi
# terminate remote instances on the final python version tested
if [ "${py_version}" = "${python_versions[-1]}" ]; then
terminate="always"
else
terminate="never"
fi
# shellcheck disable=SC2086
ansible-test windows-integration --color -v --retry-on-error "${ci}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
--changed-all-target "${changed_all_target}" --changed-all-mode "${changed_all_mode}" \
--controller "docker:default,python=${py_version}" \
--target "remote:windows/${version},connection=${connection}+${connection_setting},provider=${provider}" \
--remote-terminate "${terminate}" --remote-stage "${stage}"
done

View File

@ -1,20 +0,0 @@
#!/usr/bin/env bash
# Aggregate code coverage results for later processing.
set -o pipefail -eu
agent_temp_directory="$1"
PATH="${PWD}/bin:${PATH}"
mkdir "${agent_temp_directory}/coverage/"
options=(--venv --color -v)
ansible-test coverage combine --group-by command --export "${agent_temp_directory}/coverage/" "${options[@]}"
if ansible-test coverage analyze targets generate --help >/dev/null 2>&1; then
# Only analyze coverage if the installed version of ansible-test supports it.
# Doing so allows this script to work unmodified for multiple Ansible versions.
ansible-test coverage analyze targets generate "${agent_temp_directory}/coverage/coverage-analyze-targets.json" "${options[@]}"
fi

View File

@ -1,59 +0,0 @@
#!/usr/bin/env python
"""
Combine coverage data from multiple jobs, keeping the data only from the most recent attempt from each job.
Coverage artifacts must be named using the format: "Coverage $(System.JobAttempt) {StableUniqueNameForEachJob}"
The recommended coverage artifact name format is: Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)
Keep in mind that Azure Pipelines does not enforce unique job display names (only names).
It is up to pipeline authors to avoid name collisions when deviating from the recommended format.
"""
from __future__ import annotations
import os
import re
import shutil
import sys
def main():
"""Main program entry point."""
source_directory = sys.argv[1]
if '/ansible_collections/' in os.getcwd():
output_path = "tests/output"
else:
output_path = "test/results"
destination_directory = os.path.join(output_path, 'coverage')
if not os.path.exists(destination_directory):
os.makedirs(destination_directory)
jobs = {}
count = 0
for name in os.listdir(source_directory):
match = re.search('^Coverage (?P<attempt>[0-9]+) (?P<label>.+)$', name)
label = match.group('label')
attempt = int(match.group('attempt'))
jobs[label] = max(attempt, jobs.get(label, 0))
for label, attempt in jobs.items():
name = 'Coverage {attempt} {label}'.format(label=label, attempt=attempt)
source = os.path.join(source_directory, name)
source_files = os.listdir(source)
for source_file in source_files:
source_path = os.path.join(source, source_file)
destination_path = os.path.join(destination_directory, source_file + '.' + label)
print('"%s" -> "%s"' % (source_path, destination_path))
shutil.copyfile(source_path, destination_path)
count += 1
print('Coverage file count: %d' % count)
print('##vso[task.setVariable variable=coverageFileCount]%d' % count)
print('##vso[task.setVariable variable=outputPath]%s' % output_path)
if __name__ == '__main__':
main()

View File

@ -1,24 +0,0 @@
#!/usr/bin/env bash
# Check the test results and set variables for use in later steps.
set -o pipefail -eu
if [[ "$PWD" =~ /ansible_collections/ ]]; then
output_path="tests/output"
else
output_path="test/results"
fi
echo "##vso[task.setVariable variable=outputPath]${output_path}"
if compgen -G "${output_path}"'/junit/*.xml' > /dev/null; then
echo "##vso[task.setVariable variable=haveTestResults]true"
fi
if compgen -G "${output_path}"'/bot/ansible-test-*' > /dev/null; then
echo "##vso[task.setVariable variable=haveBotResults]true"
fi
if compgen -G "${output_path}"'/coverage/*' > /dev/null; then
echo "##vso[task.setVariable variable=haveCoverageData]true"
fi

View File

@ -1,121 +0,0 @@
#!/usr/bin/env python
"""
Upload code coverage reports to codecov.io.
Multiple coverage files from multiple languages are accepted and aggregated after upload.
Python coverage, as well as PowerShell and Python stubs can all be uploaded.
"""
from __future__ import annotations
import argparse
import dataclasses
import pathlib
import shlex
import subprocess
import tempfile
import typing as t
import venv
@dataclasses.dataclass(frozen=True)
class CoverageFile:
name: str
path: pathlib.Path
flags: t.List[str]
@dataclasses.dataclass(frozen=True)
class Args:
dry_run: bool
path: pathlib.Path
def parse_args() -> Args:
parser = argparse.ArgumentParser()
parser.add_argument('-n', '--dry-run', action='store_true')
parser.add_argument('path', type=pathlib.Path)
args = parser.parse_args()
# Store arguments in a typed dataclass
fields = dataclasses.fields(Args)
kwargs = {field.name: getattr(args, field.name) for field in fields}
return Args(**kwargs)
def run(*args: str | pathlib.Path) -> None:
cmd = [str(arg) for arg in args]
print(f'==> {shlex.join(cmd)}', flush=True)
subprocess.run(cmd, check=True)
def install_codecov(dest: pathlib.Path) -> pathlib.Path:
package = 'codecov-cli'
version = '11.0.3'
venv_dir = dest / 'venv'
python_bin = venv_dir / 'bin' / 'python'
codecov_bin = venv_dir / 'bin' / 'codecovcli'
venv.create(venv_dir, with_pip=True)
run(python_bin, '-m', 'pip', 'install', f'{package}=={version}', '--disable-pip-version-check')
return codecov_bin
def process_files(directory: pathlib.Path) -> t.Tuple[CoverageFile, ...]:
processed = []
for file in directory.joinpath('reports').glob('coverage*.xml'):
name = file.stem.replace('coverage=', '')
# Get flags from name
flags = name.replace('-powershell', '').split('=') # Drop '-powershell' suffix
flags = [flag if not flag.startswith('stub') else flag.split('-')[0] for flag in flags] # Remove "-01" from stub files
processed.append(CoverageFile(name, file, flags))
return tuple(processed)
def upload_files(codecov_bin: pathlib.Path, config_file: pathlib.Path, files: t.Tuple[CoverageFile, ...], dry_run: bool = False) -> None:
for file in files:
cmd = [
codecov_bin,
'--disable-telem',
'--codecov-yml-path',
config_file,
'upload-process',
'--disable-search',
'--disable-file-fixes',
'--plugin',
'noop',
'--name',
file.name,
'--file',
file.path,
]
for flag in file.flags:
cmd.extend(['--flag', flag])
if dry_run:
cmd.append('--dry-run')
run(*cmd)
def main() -> None:
args = parse_args()
with tempfile.TemporaryDirectory(prefix='codecov-') as tmpdir:
config_file = pathlib.Path(tmpdir) / 'config.yml'
config_file.write_text('')
codecov_bin = install_codecov(pathlib.Path(tmpdir))
files = process_files(args.path)
upload_files(codecov_bin, config_file, files, args.dry_run)
if __name__ == '__main__':
main()

View File

@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Generate code coverage reports for uploading to Azure Pipelines and codecov.io.
set -o pipefail -eu
PATH="${PWD}/bin:${PATH}"
if ! ansible-test --help >/dev/null 2>&1; then
# Install the devel version of ansible-test for generating code coverage reports.
# This is only used by Ansible Collections, which are typically tested against multiple Ansible versions (in separate jobs).
# Since a version of ansible-test is required that can work the output from multiple older releases, the devel version is used.
pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
fi
# Generate stubs using docker.
# The use of docker is mandatory when Powershell code is present.
ansible-test coverage xml --group-by command --stub --docker --color -v

View File

@ -1,34 +0,0 @@
#!/usr/bin/env bash
# Configure the test environment and run the tests.
set -o pipefail -eu
entry_point="$1"
test="$2"
read -r -a coverage_branches <<< "$3" # space separated list of branches to run code coverage on for scheduled builds
export COMMIT_MESSAGE
export COMPLETE
export COVERAGE
export IS_PULL_REQUEST
if [ "${SYSTEM_PULLREQUEST_TARGETBRANCH:-}" ]; then
IS_PULL_REQUEST=true
COMMIT_MESSAGE=$(git log --format=%B -n 1 HEAD^2)
else
IS_PULL_REQUEST=
COMMIT_MESSAGE=$(git log --format=%B -n 1 HEAD)
fi
COMPLETE=
COVERAGE=
if [ "${BUILD_REASON}" = "Schedule" ]; then
COMPLETE=yes
if printf '%s\n' "${coverage_branches[@]}" | grep -q "^${BUILD_SOURCEBRANCHNAME}$"; then
COVERAGE=yes
fi
fi
"${entry_point}" "${test}" 2>&1 | "$(dirname "$0")/time-command.py"

View File

@ -1,24 +0,0 @@
#!/usr/bin/env python
"""Prepends a relative timestamp to each input line from stdin and writes it to stdout."""
from __future__ import annotations
import sys
import time
def main():
"""Main program entry point."""
start = time.time()
sys.stdin.reconfigure(errors='surrogateescape')
sys.stdout.reconfigure(errors='surrogateescape')
for line in sys.stdin:
seconds = time.time() - start
sys.stdout.write('%02d:%02d %s' % (seconds // 60, seconds % 60, line))
sys.stdout.flush()
if __name__ == '__main__':
main()

View File

@ -1,29 +0,0 @@
# This template adds a job for processing code coverage data.
# It will upload results to Azure Pipelines and codecov.io.
# Use it from a job stage that completes after all other jobs have completed.
# This can be done by placing it in a separate summary stage that runs after the test stage(s) have completed.
jobs:
- job: Coverage
displayName: Code Coverage
container: $[ variables.defaultContainer ]
workspace:
clean: all
steps:
- checkout: self
fetchDepth: $(fetchDepth)
path: $(checkoutPath)
- task: DownloadPipelineArtifact@2
displayName: Download Coverage Data
inputs:
path: coverage/
patterns: "Coverage */*=coverage.combined"
- bash: .azure-pipelines/scripts/combine-coverage.py coverage/
displayName: Combine Coverage Data
- bash: .azure-pipelines/scripts/report-coverage.sh
displayName: Generate Coverage Report
condition: gt(variables.coverageFileCount, 0)
- bash: .azure-pipelines/scripts/publish-codecov.py "$(outputPath)"
displayName: Publish to codecov.io
condition: gt(variables.coverageFileCount, 0)
continueOnError: true

View File

@ -1,55 +0,0 @@
# This template uses the provided targets and optional groups to generate a matrix which is then passed to the test template.
# If this matrix template does not provide the required functionality, consider using the test template directly instead.
parameters:
# A required list of dictionaries, one per test target.
# Each item in the list must contain a "test" or "name" key.
# Both may be provided. If one is omitted, the other will be used.
- name: targets
type: object
# An optional list of values which will be used to multiply the targets list into a matrix.
# Values can be strings or numbers.
- name: groups
type: object
default: []
# An optional format string used to generate the job name.
# - {0} is the name of an item in the targets list.
- name: nameFormat
type: string
default: "{0}"
# An optional format string used to generate the test name.
# - {0} is the name of an item in the targets list.
- name: testFormat
type: string
default: "{0}"
# An optional format string used to add the group to the job name.
# {0} is the formatted name of an item in the targets list.
# {{1}} is the group -- be sure to include the double "{{" and "}}".
- name: nameGroupFormat
type: string
default: "{0} - {{1}}"
# An optional format string used to add the group to the test name.
# {0} is the formatted test of an item in the targets list.
# {{1}} is the group -- be sure to include the double "{{" and "}}".
- name: testGroupFormat
type: string
default: "{0}/{{1}}"
jobs:
- template: test.yml
parameters:
jobs:
- ${{ if eq(length(parameters.groups), 0) }}:
- ${{ each target in parameters.targets }}:
- name: ${{ format(parameters.nameFormat, coalesce(target.name, target.test)) }}
test: ${{ format(parameters.testFormat, coalesce(target.test, target.name)) }}
- ${{ if not(eq(length(parameters.groups), 0)) }}:
- ${{ each group in parameters.groups }}:
- ${{ each target in parameters.targets }}:
- name: ${{ format(format(parameters.nameGroupFormat, parameters.nameFormat), coalesce(target.name, target.test), group) }}
test: ${{ format(format(parameters.testGroupFormat, parameters.testFormat), coalesce(target.test, target.name), group) }}

View File

@ -1,45 +0,0 @@
# This template uses the provided list of jobs to create test one or more test jobs.
# It can be used directly if needed, or through the matrix template.
parameters:
# A required list of dictionaries, one per test job.
# Each item in the list must contain a "job" and "name" key.
- name: jobs
type: object
jobs:
- ${{ each job in parameters.jobs }}:
- job: test_${{ replace(replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_'), '@', '_') }}
displayName: ${{ job.name }}
container: $[ variables.defaultContainer ]
workspace:
clean: all
steps:
- checkout: self
fetchDepth: $(fetchDepth)
path: $(checkoutPath)
- bash: .azure-pipelines/scripts/run-tests.sh "$(entryPoint)" "${{ job.test }}" "$(coverageBranches)"
displayName: Run Tests
- bash: .azure-pipelines/scripts/process-results.sh
condition: succeededOrFailed()
displayName: Process Results
- bash: .azure-pipelines/scripts/aggregate-coverage.sh "$(Agent.TempDirectory)"
condition: eq(variables.haveCoverageData, 'true')
displayName: Aggregate Coverage Data
- task: PublishTestResults@2
condition: eq(variables.haveTestResults, 'true')
inputs:
testResultsFiles: "$(outputPath)/junit/*.xml"
displayName: Publish Test Results
- task: PublishPipelineArtifact@1
condition: eq(variables.haveBotResults, 'true')
displayName: Publish Bot Results
inputs:
targetPath: "$(outputPath)/bot/"
artifactName: "Bot $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
- task: PublishPipelineArtifact@1
condition: eq(variables.haveCoverageData, 'true')
displayName: Publish Coverage Data
inputs:
targetPath: "$(Agent.TempDirectory)/coverage/"
artifactName: "Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"

View File

@ -1,5 +0,0 @@
team = "ansible"
repo = "ansible"
check_sha = "f31421576b00f0b167cdbe61217c31c21a41ac02" # the very first commit in repo
fix_commit_msg = false # Don't replace "#" with "GH-"
default_branch = "devel"

25
.coveragerc Normal file
View File

@ -0,0 +1,25 @@
# This configuration file is used for manual execution of coverage
# as well as for tests run through ansible-test.
[run]
branch = True
# Enable concurrency. This also enables parallel mode, which results in
# multiple coverage files being created. Concurrency allows us to collect
# results from multiple tests simultaneously, as well as supporting multiple
# test runs, such as from integration tests.
concurrency = multiprocessing
parallel = True
# When running tests through ansible-test, this option is overridden by
# the COVERAGE_FILE environment variable. This option is present for
# convenience when running coverage manually from this directory.
data_file = test/results/coverage/coverage
# Don't collect or report code coverage from files matching these patterns.
omit =
*/python*/dist-packages/*
*/python*/site-packages/*
*/python*/distutils/*
*/pyshared/*
*/pytest

View File

@ -1,6 +0,0 @@
# .git-blame-ignore-revs
# Bulk PowerShell sanity fixes
6def4a3180fe03981ba64c6d8db28fed3bb39c0c
716631189cb5a3f66b3add98f39e64e98bc17bf7
# Bulk update of strings from triple single quotes to triple double quotes
a0495fc31497798a7a833ba7406a9729e1528dd8

3
.gitattributes vendored
View File

@ -1 +1,4 @@
CHANGELOG.md merge=union
.github/ export-ignore
hacking/ export-ignore
ticket-stubs/ export-ignore

1275
.github/BOTMETA.yml vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
# Community Code of Conduct
Please see the official [Ansible Community Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
Please see the official [Ansible Community Code of Conduct](http://docs.ansible.com/ansible/latest/community.html#community-code-of-conduct).

View File

@ -1,78 +0,0 @@
# WELCOME TO ANSIBLE GITHUB
Hi! Nice to see you here!
## QUESTIONS ?
If you have questions about anything related to Ansible, get in touch with us!
See [Communicating with the Ansible community](https://docs.ansible.com/ansible/devel/community/communication.html) to find out how.
The [Community Guide](https://docs.ansible.com/ansible/devel/community/index.html) also explains how to contribute
and interact with the project, including how to submit bug reports and code to Ansible.
Please note that the GitHub issue tracker is not the best place to ask questions for several reasons.
You'll get more helpful, and quicker, responses in the forum.
## CONTRIBUTING ?
By contributing to this project you agree to the [Developer Certificate of Origin (DCO)](#developer-certificate-of-origin-dco).
The Ansible project is licensed under the [GPL-3.0](COPYING) or later. Some portions of the code fall under other licenses as noted in individual files.
The Ansible project accepts contributions through GitHub pull requests.
Please review the [Community Guide](https://docs.ansible.com/ansible/devel/community/index.html) for more information on contributing to Ansible.
## BUG TO REPORT ?
First and foremost, also check the [Community Guide](https://docs.ansible.com/ansible/devel/community/index.html).
You can report bugs or make enhancement requests at
the [Ansible GitHub issue page](http://github.com/ansible/ansible/issues/new/choose) by filling out the issue template that will be presented.
Also please make sure you are testing on the latest released version of Ansible or the development branch.
See the [Installation Guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) for details.
Thanks!
## DEVELOPER CERTIFICATE OF ORIGIN (DCO)
This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution.
```text
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```

View File

@ -1 +1,64 @@
Please raise issues via the [new interface](https://github.com/ansible/ansible/issues/new/choose)
<!---
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release, and devel branch are affected too.
-->
##### ISSUE TYPE
<!--- Pick one below and delete the rest -->
- Bug Report
- Feature Idea
- Documentation Report
##### COMPONENT NAME
<!---
Name of the module, plugin, task or feature
Do not include extra details here, e.g. "vyos_command" not "the network module vyos_command" or the full path
-->
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes below -->
```
```
##### CONFIGURATION
<!---
If using Ansible 2.4 or above, paste the results of "ansible-config dump --only-changed"
Otherwise, mention any settings you have changed/added/removed in ansible.cfg
(or using the ANSIBLE_* environment variables).
-->
##### OS / ENVIRONMENT
<!---
Mention the OS you are running Ansible from, and the OS you are
managing, or say "N/A" for anything that is not platform-specific.
Also mention the specific version of what you are trying to control,
e.g. if this is a network bug the version of firmware on the network device.
-->
##### SUMMARY
<!--- Explain the problem briefly -->
##### STEPS TO REPRODUCE
<!---
For bugs, show exactly how to reproduce the problem, using a minimal test-case.
For new features, show how the feature would be used.
-->
<!--- Paste example playbooks or commands between quotes below -->
```yaml
```
<!--- You can also paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- What did you expect to happen when running the steps above? -->
##### ACTUAL RESULTS
<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes below -->
```
```

View File

@ -1,250 +0,0 @@
---
name: 🐛 Bug report
description: Create a report to help us improve
body:
- type: markdown
attributes:
value: >
**Thank you for wanting to report a bug in ansible-core!**
⚠
Verify first that your issue is not [already reported on
GitHub][issue search] and keep in mind that we may have to keep
the current behavior because [every change breaks someone's
workflow][XKCD 1172].
We try to be mindful about this.
Also test if the latest release and devel branch are affected too.
**Tip:** If you are seeking community support, please see
[Communicating with the Ansible community][communication] to
get in touch and ask questions.
[communication]:
https://docs.ansible.com/ansible/devel/community/communication.html
[issue search]: ../search?q=is%3Aissue&type=issues
[XKCD 1172]: https://xkcd.com/1172/
- type: textarea
attributes:
label: Summary
description: Explain the problem briefly below.
placeholder: >-
When I try to do X with ansible-core from the devel branch on GitHub, Y
breaks in a way Z under the env E. Here are all the details I know
about this problem...
validations:
required: true
- type: dropdown
attributes:
label: Issue Type
description: This is a marker for our automatic bot. Do not change it.
options:
- Bug Report
validations:
required: true
- type: input
attributes:
label: Component Name
description: >
Write the short name of the rst file, module, plugin, task or
feature below, *use your best guess if unsure*.
**Tip:** Cannot find it in this repository? Please be advised that
the source for some parts of the documentation are hosted outside
of this repository. If the page you are reporting describes
modules/plugins/etc that are not officially supported by the
Ansible Core Engineering team, there is a good chance that it is
coming from one of the [Ansible Collections maintained by the
community][collections org]. If this is the case, please make sure
to file an issue under the appropriate project there instead.
[collections org]: /ansible-collections
placeholder: dnf, apt, pip, user etc.
validations:
required: true
- type: textarea
attributes:
label: Ansible Version
description: >-
Paste verbatim output from `ansible --version` below, under
the prompt line. Please don't wrap it with triple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
$ ansible --version
placeholder: |
$ ansible --version
ansible [core 2.11.0b4.post0] (detached HEAD ref: refs/) last updated 2021/04/02 00:33:35 (GMT +200)
config file = None
configured module search path = ['~/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = ~/src/github/ansible/ansible/lib/ansible
ansible collection location = ~/.ansible/collections:/usr/share/ansible/collections
executable location = bin/ansible
python version = 3.9.0 (default, Oct 26 2020, 13:08:59) [GCC 10.2.0]
jinja version = 2.11.3
libyaml = True
validations:
required: true
- type: textarea
attributes:
label: Configuration
description: >-
Paste verbatim output from `ansible-config dump --only-changed -t all` below, under the prompt line.
(if using a version older than ansible-core 2.12 you should omit the '-t all')
Please don't wrap it with triple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
placeholder: |
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
DEFAULT_GATHERING(~/src/github/ansible/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(~/src/github/ansible/ansible/ansible.cfg) = ['~/src/github/ansible/ansible/hosts']
DEFAULT_VAULT_PASSWORD_FILE(~/src/github/ansible/ansible/ansible.cfg) = ~/src/github/ansible/ansible/vault/print-password.sh
validations:
required: true
- type: textarea
attributes:
label: OS / Environment
description: >-
Provide all relevant information below, e.g. target OS versions,
network device firmware, etc.
placeholder: RHEL 8, CentOS Stream etc.
validations:
required: true
- type: textarea
attributes:
label: Steps to Reproduce
description: |
Describe exactly how to reproduce the problem, using a minimal test-case. It would *really* help us understand your problem if you could also provide any playbooks, configs and commands you used.
**HINT:** You can paste https://gist.github.com links for larger files.
value: |
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
```
placeholder: |
1. Implement the following playbook:
```yaml
---
# ping.yml
- hosts: all
gather_facts: false
tasks:
- ping:
...
```
2. Then run `ANSIBLE_DEBUG=1 ansible-playbook ping.yml -vvvvv`
3. An error occurs.
validations:
required: true
- type: textarea
attributes:
label: Expected Results
description: >-
Describe what you expected to happen when running the steps above.
placeholder: >-
I expected X to happen because I assumed Y and was shocked
that it did not.
validations:
required: true
- type: textarea
attributes:
label: Actual Results
description: |
Describe what actually happened. If possible run with extra verbosity (`-vvvv`).
Paste verbatim command output and don't wrap it with triple backticks — your
whole input will be turned into a code snippet automatically.
render: console
placeholder: >-
Certificate did not match expected hostname: files.pythonhosted.org. Certificate: {'notAfter': 'Apr 28 19:20:25 2021 GMT', 'subjectAltName': ((u'DNS', 'r.ssl.fastly.net'), (u'DNS', '*.catchpoint.com'), (u'DNS', '*.cnn.io'), (u'DNS', '*.dollarshaveclub.com'), (u'DNS', '*.eater.com'), (u'DNS', '*.fastly.picmonkey.com'), (u'DNS', '*.files.saymedia-content.com'), (u'DNS', '*.ft.com'), (u'DNS', '*.meetupstatic.com'), (u'DNS', '*.nfl.com'), (u'DNS', '*.pagar.me'), (u'DNS', '*.picmonkey.com'), (u'DNS', '*.realself.com'), (u'DNS', '*.sbnation.com'), (u'DNS', '*.shakr.com'), (u'DNS', '*.streamable.com'), (u'DNS', '*.surfly.com'), (u'DNS', '*.theverge.com'), (u'DNS', '*.thrillist.com'), (u'DNS', '*.vox-cdn.com'), (u'DNS', '*.vox.com'), (u'DNS', '*.voxmedia.com'), (u'DNS', 'eater.com'), (u'DNS', 'ft.com'), (u'DNS', 'i.gse.io'), (u'DNS', 'picmonkey.com'), (u'DNS', 'realself.com'), (u'DNS', 'static.wixstatic.com'), (u'DNS', 'streamable.com'), (u'DNS', 'surfly.com'), (u'DNS', 'theverge.com'), (u'DNS', 'vox-cdn.com'), (u'DNS', 'vox.com'), (u'DNS', 'www.joyent.com')), 'subject': ((('countryName', u'US'),), (('stateOrProvinceName', u'California'),), (('localityName', u'San Francisco'),), (('organizationName', u'Fastly, Inc'),), (('commonName', u'r.ssl.fastly.net'),))}
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.6/dist-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/usr/local/lib/python2.6/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/local/lib/python2.6/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/local/lib/python2.6/dist-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/usr/local/lib/python2.6/dist-packages/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/usr/local/lib/python2.6/dist-packages/pip/download.py", line 659, in unpack_http_url
hashes)
File "/usr/local/lib/python2.6/dist-packages/pip/download.py", line 853, in _download_http_url
stream=True,
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/requests/sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/pip/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/cachecontrol/adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
SSLError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/ef/ab/aa12712415809bf698e719b307419f953e25344e8f42d557533d7a02b276/netapp_lib-2020.7.16-py2-none-any.whl (Caused by SSLError(CertificateError("hostname 'files.pythonhosted.org' doesn't match either of 'r.ssl.fastly.net', '*.catchpoint.com', '*.cnn.io', '*.dollarshaveclub.com', '*.eater.com', '*.fastly.picmonkey.com', '*.files.saymedia-content.com', '*.ft.com', '*.meetupstatic.com', '*.nfl.com', '*.pagar.me', '*.picmonkey.com', '*.realself.com', '*.sbnation.com', '*.shakr.com', '*.streamable.com', '*.surfly.com', '*.theverge.com', '*.thrillist.com', '*.vox-cdn.com', '*.vox.com', '*.voxmedia.com', 'eater.com', 'ft.com', 'i.gse.io', 'picmonkey.com', 'realself.com', 'static.wixstatic.com', 'streamable.com', 'surfly.com', 'theverge.com', 'vox-cdn.com', 'vox.com', 'www.joyent.com'",),))
ERROR: Command "/usr/bin/python2.6 /root/ansible/test/lib/ansible_test/_data/quiet_pip.py install --disable-pip-version-check -r /root/ansible/test/lib/ansible_test/_data/requirements/units.txt -r tests/unit/requirements.txt -c /root/ansible/test/lib/ansible_test/_data/requirements/constraints.txt" returned exit status 2.
ERROR: Command "docker exec d47eb360db4ce779c1f690db964655b76e68895c4360ff252c46fe7fe6f5c75a /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_collections/netapp/ontap LC_ALL=en_US.UTF-8 /usr/bin/python3.6 /root/ansible/bin/ansible-test units --metadata tests/output/.tmp/metadata-9i2qfrcl.json --truncate 200 --redact --color yes --requirements --python default --requirements-mode only" returned exit status 1.
validations:
required: true
- type: markdown
attributes:
value: >
*One last thing...*
*Please, complete **all** sections as described, this form
is [processed automatically by a robot][ansibot help].*
Thank you for your collaboration!
[ansibot help]:
/ansible/ansibotmini#ansibotmini
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct][CoC] first.
[CoC]: https://docs.ansible.com/ansible/devel/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--bug_report.yml
options:
- label: I agree to follow the Ansible Code of Conduct
required: true
...

View File

@ -1,26 +0,0 @@
# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
blank_issues_enabled: false # default: true
contact_links:
- name: 🔐 Security bug report 🔥
url: https://docs.ansible.com/ansible/devel/community/reporting_bugs_and_features.html?utm_medium=github&utm_source=issue_template_chooser
about: |
Please learn how to report security vulnerabilities here.
For all security related bugs, email security@ansible.com
instead of using this issue tracker and you will receive
a prompt response.
For more information, see
https://docs.ansible.com/ansible/devel/community/reporting_bugs_and_features.html
- name: 📝 Ansible Code of Conduct
url: https://docs.ansible.com/ansible/devel/community/code_of_conduct.html?utm_medium=github&utm_source=issue_template_chooser
about: ❤ Be nice to other members of the community. ☮ Behave.
- name: 💬 Talk to the community
url: https://docs.ansible.com/ansible/devel/community/communication.html?utm_medium=github&utm_source=issue_template_chooser#forum
about: Please ask and answer usage questions here
- name: ⚡ Working groups
url: https://forum.ansible.com/g?utm_medium=github&utm_source=issue_template_chooser
about: Interested in improving a specific area? Become a part of a working group!
- name: 💼 For Enterprise
url: https://www.ansible.com/products/engine?utm_medium=github&utm_source=issue_template_chooser
about: Red Hat offers support for the Ansible Automation Platform

View File

@ -1,201 +0,0 @@
---
name: 📝 Documentation Report
description: Ask us about docs
body:
- type: markdown
attributes:
value: >
**Thank you for wanting to report a problem with ansible-core
documentation!**
Please fill out your suggestions below. If the problem seems
straightforward, feel free to go ahead and
[submit a pull request] instead!
⚠
Verify first that your issue is not [already reported on
GitHub][issue search].
Also test if the latest release and devel branch are affected too.
**Tip:** If you are seeking community support, please see
[Communicating with the Ansible community][communication] to
get in touch and ask questions.
[communication]:
https://docs.ansible.com/ansible/devel/community/communication.html
[issue search]: ../search?q=is%3Aissue&type=issues
[submit a pull request]:
https://docs.ansible.com/ansible-core/devel/community/documentation_contributions.html
- type: markdown
attributes:
value: >
**Check the repository for your issue.**
Source files for Ansible community documentation are
hosted in different repositories. Please make sure to file an
issue in the correct project.
Documentation for modules/plugins/etc that are officially
supported by the Ansible Core Engineering team is available
in this (`ansible/ansible`) repository.
The Installation Guide, Playbook Guide, Developer Guide,
and other documentation is available in the
[ansible/ansible-documentation] repository.
Documentation for other modules/plugins/etc is likely to be
available in one of the [Ansible Collections][collections index].
If available in the collection documentation, select the
**Issue Tracker** button to go directly to the GitHub issues.
[ansible/ansible-documentation]: /ansible/ansible-documentation
[collections index]:
https://docs.ansible.com/ansible/latest/collections/index.html
- type: textarea
attributes:
label: Summary
description: >
Explain the problem briefly below, add suggestions to wording
or structure.
**HINT:** Did you know the documentation has a `View on GitHub`
link on some pages? Feel free to use it to start a pull request
right from the GitHub UI!
placeholder: >-
I was reading the ansible-core documentation of version X and I'm having
problems understanding Y. It would be very helpful if that got
rephrased as Z.
validations:
required: true
- type: dropdown
attributes:
label: Issue Type
description: This is a marker for our automatic bot. Do not change it.
options:
- Documentation Report
validations:
required: true
- type: input
attributes:
label: Component Name
description: >
Write the short name of the rst file, module, plugin, task or
feature below, *use your best guess if unsure*.
placeholder: lib/ansible/modules/copy.py
validations:
required: true
- type: textarea
attributes:
label: Ansible Version
description: >-
Paste verbatim output from `ansible --version` below, under
the prompt line. Please don't wrap it with triple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
$ ansible --version
placeholder: |
$ ansible --version
ansible [core 2.11.0b4.post0] (detached HEAD ref: refs/) last updated 2021/04/02 00:33:35 (GMT +200)
config file = None
configured module search path = ['~/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = ~/src/github/ansible/ansible/lib/ansible
ansible collection location = ~/.ansible/collections:/usr/share/ansible/collections
executable location = bin/ansible
python version = 3.9.0 (default, Oct 26 2020, 13:08:59) [GCC 10.2.0]
jinja version = 2.11.3
libyaml = True
validations:
required: true
- type: textarea
attributes:
label: Configuration
description: >-
Paste verbatim output from `ansible-config dump --only-changed -t all` below, under the prompt line.
(if using a version older than ansible-core 2.12 you should omit the '-t all')
Please don't wrap it with triple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
placeholder: |
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
DEFAULT_GATHERING(~/src/github/ansible/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(~/src/github/ansible/ansible/ansible.cfg) = ['~/src/github/ansible/ansible/hosts']
DEFAULT_VAULT_PASSWORD_FILE(~/src/github/ansible/ansible/ansible.cfg) = ~/src/github/ansible/ansible/vault/print-password.sh
validations:
required: true
- type: textarea
attributes:
label: OS / Environment
description: >-
Provide all relevant information below, e.g. OS version,
browser, etc.
placeholder: Fedora 33, Firefox etc.
validations:
required: true
- type: textarea
attributes:
label: Additional Information
description: |
Describe how this improves the documentation, e.g. before/after situation or screenshots.
**HINT:** You can paste https://gist.github.com links for larger files.
placeholder: >-
When the improvement is applied, it makes it more straightforward
to understand X.
validations:
required: true
- type: markdown
attributes:
value: >
*One last thing...*
*Please, complete **all** sections as described, this form
is [processed automatically by a robot][ansibot help].*
Thank you for your collaboration!
[ansibot help]:
/ansible/ansibotmini#ansibotmini
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct][CoC] first.
[CoC]: https://docs.ansible.com/ansible/devel/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--documentation_report.yml
options:
- label: I agree to follow the Ansible Code of Conduct
required: true
...

View File

@ -1,176 +0,0 @@
---
name: ✨ Feature request
description: Suggest an idea for this project
body:
- type: markdown
attributes:
value: >
**Thank you for wanting to suggest a feature for ansible-core!**
💡
Before you go ahead with your request, please first consider if it
would be useful for majority of the ansible-core users. As a
general rule of thumb, any feature that is only of interest to a
small sub group should be [implemented in a third-party Ansible
Collection][contribute to collections] or maybe even just your
project alone. Be mindful of the fact that the essential
ansible-core features have a broad impact.
If unsure, consider filing a [new proposal] instead outlining your
use-cases, the research and implementation considerations. Then,
start a discussion in the [Ansible forum][forum].
<details>
<summary>
❗ Every change breaks someone's workflow.
</summary>
[![❗ Every change breaks someone's workflow.
](https://imgs.xkcd.com/comics/workflow.png)
](https://xkcd.com/1172/)
</details>
⚠
Verify first that your idea is not [already requested on
GitHub][issue search].
Also test if the devel branch does not already implement this.
**Tip:** If you are seeking community support, please see
[Communicating with the Ansible community][communication] to
get in touch and ask questions.
[contribute to collections]:
https://docs.ansible.com/ansible-core/devel/community/contributing_maintained_collections.html?utm_medium=github&utm_source=issue_form--feature_request.yml
[communication]:
https://docs.ansible.com/ansible/devel/community/communication.html
[issue search]: ../search?q=is%3Aissue&type=issues
[forum help]:
https://forum.ansible.com/c/help/6
[new proposal]: ../../proposals/issues/new
- type: textarea
attributes:
label: Summary
description: >
Describe the new feature/improvement you would like briefly below.
What's the problem this feature will solve?
What are you trying to do, that you are unable to achieve
with ansible-core as it currently stands?
* Provide examples of real-world use cases that this would enable
and how it solves the problem you described.
* How do you solve this now?
* Have you tried to work around the problem using other tools?
* Could there be a different approach to solving this issue?
*Know **exactly** what you want?* Consider filing a [new proposal]
instead outlining your research and implementation considerations.
[new proposal]: ../../proposals/issues/new
placeholder: >-
I am trying to do X with ansible-core from the devel branch on GitHub and
I think that implementing a feature Y would be very helpful for me and
every other user of ansible-core because of Z.
validations:
required: true
- type: dropdown
attributes:
label: Issue Type
description: This is a marker for our automatic bot. Do not change it.
options:
- Feature Idea
validations:
required: true
- type: input
attributes:
label: Component Name
description: >
Write the short name of the module, plugin, task or feature below,
*use your best guess if unsure*.
Be aware that a lot of content that used to reside in this repository
previously, is now hosted under [individual collection
projects][collections org].
If this is the case, please make sure to file an issue under the
appropriate project there instead.
[collections org]: /ansible-collections
placeholder: dnf, apt, pip, user etc.
validations:
required: true
- type: textarea
attributes:
label: Additional Information
description: |
Describe how the feature would be used, why it is needed and what it would solve.
**HINT:** You can paste https://gist.github.com links for larger files.
value: |
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
```
placeholder: >-
I asked on https://stackoverflow.com/.... and the community
advised me to do X, Y and Z.
validations:
required: true
- type: markdown
attributes:
value: >
*One last thing...*
*Please, complete **all** sections as described, this form
is [processed automatically by a robot][ansibot help].*
Thank you for your collaboration!
[ansibot help]:
/ansible/ansibotmini#ansibotmini
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct][CoC] first.
[CoC]: https://docs.ansible.com/ansible/devel/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--feature_request.yml
options:
- label: I agree to follow the Ansible Code of Conduct
required: true
...

View File

@ -1,10 +0,0 @@
---
name: Internal Issue
about: Free-form issue creation for core maintainer use only.
title: ''
labels: [core-internal]
assignees: ''
---
@ansibot bot_skip

View File

@ -1,42 +0,0 @@
name: Pre-Release Bug Report
description: File a bug report against a pre-release version
labels:
- bug
- pre_release
assignees:
- nitzmahone
- mattclay
body:
- type: markdown
attributes:
value: |
## Bug Report
- type: textarea
attributes:
label: Ansible Version
description: Paste the full output from `ansible --version` below.
render: console
placeholder: $ ansible --version
validations:
required: true
- type: textarea
attributes:
label: Summary
description: Describe the issue with any relevant steps to reproduce.
validations:
required: true
- type: dropdown
attributes:
label: <!-- Bot instructions (ignore this) -->
options:
- |
<!--
### Component Name
bin/ansible
### Issue Type
Bug Report
### Configuration
### OS / Environment
-->
validations:
required: true

View File

@ -1 +0,0 @@
PULL_REQUEST_TEMPLATE/Unclear purpose or motivation.md

37
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,37 @@
##### SUMMARY
<!--- Describe the change, including rationale and design decisions -->
<!---
If you are fixing an existing issue, please include "Fixes #nnn" in your
commit message and your description; but you should still explain what
the change does.
-->
##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
- Feature Pull Request
- New Module Pull Request
- Bugfix Pull Request
- Docs Pull Request
##### COMPONENT NAME
<!--- Name of the module, plugin, module or task -->
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes below -->
```
```
##### ADDITIONAL INFORMATION
<!---
Include additional information to help people understand the change here.
For bugs that don't have a linked bug report, a step-by-step reproduction
of the problem is helpful.
-->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```
```

View File

@ -1,9 +0,0 @@
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
<!--- Add "Fixes #1234" or steps to reproduce the problem if there is no corresponding issue -->
##### ISSUE TYPE
- Bugfix Pull Request

View File

@ -1,9 +0,0 @@
##### SUMMARY
<!--- Describe the change below, including rationale -->
<!--- Add "Fixes #1234" if there is a corresponding issue -->
##### ISSUE TYPE
- Docs Pull Request

View File

@ -1,9 +0,0 @@
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
<!--- Add "Fixes #1234" if there is a corresponding issue -->
##### ISSUE TYPE
- Feature Pull Request

View File

@ -1 +0,0 @@
Unclear purpose or motivation.md

View File

@ -1,9 +0,0 @@
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
<!--- Add "Fixes #1234" if there is a corresponding issue -->
##### ISSUE TYPE
- Test Pull Request

View File

@ -1,14 +0,0 @@
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
<!--- Add "Fixes #1234" or steps to reproduce the problem if there is no corresponding issue -->
##### ISSUE TYPE
<!--- Pick one below and delete the rest -->
- Bugfix Pull Request
- Docs Pull Request
- Feature Pull Request
- Test Pull Request

View File

@ -1,21 +0,0 @@
2.20.0 TBD
2.19.0 What Is and What Should Never Be
2.18.0 Fool in the Rain
2.17.0 Gallows Pole
2.16.0 All My Love
2.15.0 Ten Years Gone
2.14.0 C'mon Everybody
2.13.0 Nobody's Fault but Mine
2.12.0 Dazed and Confused
2.11.0 Hey Hey, What Can I Do
2.10.0 When the Levee Breaks
2.9.0 Immigrant Song
2.8.0 How Many More Times
2.7.0 In the Light
2.6.0 Heartbreaker
2.5.0 Kashmir
2.4.0 Dancing Days
2.3.0 Ramble On
2.2.0 The Battle of Evermore
2.1.0 The Song Remains the Same
2.0.0 Over the Hills and Far Away

15
.github/SECURITY.md vendored
View File

@ -1,15 +0,0 @@
# Security Policy
## Supported Versions
Ansible applies security fixes according to the 3-versions-back support
policy. Please find more information in [our docs](
https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#release-status
).
## Reporting a Vulnerability
We encourage responsible disclosure practices for security
vulnerabilities. Please read our [policies for reporting bugs](
https://docs.ansible.com/ansible/devel/community/reporting_bugs_and_features.html#reporting-a-bug
) if you want to report a security issue that might affect Ansible.

59
.gitignore vendored
View File

@ -29,20 +29,14 @@ docs/man/man3/*
*.sublime-project
*.sublime-workspace
# docsite stuff...
docs/api/_build/
docs/api/rst/
docs/docsite/_build
docs/docsite/*.html
docs/docsite/htmlout
docs/docsite/rst/conf.py
docs/docsite/rst/index.rst
docs/docsite/rst/cli/ansible-*.rst
docs/docsite/rst/cli/ansible.rst
docs/docsite/rst/dev_guide/collections_galaxy_meta.rst
docs/docsite/rst/dev_guide/testing/sanity/index.rst.new
docs/docsite/rst/dev_guide/index.rst
docs/docsite/rst/modules/*.rst
docs/docsite/rst/collections/*.rst
!docs/docsite/rst/collections/all_plugins.rst
docs/docsite/rst/collections/*/*.rst
docs/docsite/rst/playbooks_directives.rst
docs/docsite/rst/plugins_by_category.rst
docs/docsite/rst/plugins/*/*.rst
@ -53,62 +47,44 @@ docs/docsite/searchindex.js
docs/docsite/_static/*.gif
docs/docsite/_static/*.png
docs/docsite/_static/websupport.js
# deb building stuff...
/debian/
deb-build
# Vim swap files
*.swp
*.swo
[._]*.un~
credentials.yml
# test output
*.retry
*.out
.pytest_cache/
.tox
.cache
.pytest_cache
results.xml
coverage.xml
/test/units/cover-html
/test/integration/inventory
/test/integration/targets/*/backup/
/test/cache/*
# Development
/test/develop
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
venv
env
Vagrantfile
.vagrant
# Backwards compatibility with `stable-2.9` and earlier branches.
# Also used in the `devel` branch during early Ansible 2.10 development.
/lib/ansible.egg-info/
# First used in the `devel` branch during Ansible 2.10 development.
/lib/ansible_base.egg-info/
# First used in the `devel` branch during Ansible 2.11 development.
/lib/ansible_core.egg-info/
# First used in the `devel` branch during Ansible 2.18 development.
/ansible_core.egg-info/
# vendored lib dir
lib/ansible/_vendor/*
!lib/ansible/_vendor/__init__.py
# PowerShell signed hashlist
lib/ansible/config/powershell_signatures.psd1
*.authenticode
# test stuff
ansible.egg-info/
/shippable/
/test/integration/cloud-config-*.*
!/test/integration/cloud-config-*.*.template
.python-version
# Release directory
packaging/release/ansible_release
/.cache/
/test/results/
/test/integration/cloud-config-aws.yml
/test/results/coverage/*=coverage.*
/test/results/coverage/coverage*
/test/results/reports/coverage*.xml
/test/results/reports/coverage*/
/test/results/bot/*.json
/test/results/junit/*.xml
/test/results/logs/*.log
/test/results/data/*.json
/test/integration/inventory.remote
/test/integration/inventory.networking
/test/integration/inventory.winrm
/test/integration/cloud-config-aws.yml
@ -124,6 +100,3 @@ htmlcov/
# ansible-test coverage results
test/units/.coverage.*
/test/integration/cloud-config-azure.yml
/SYMLINK_CACHE.json
changelogs/.plugin-cache.yaml
.ansible-test-timeout.json

1
.yamllint Symbolic link
View File

@ -0,0 +1 @@
test/sanity/yamllint/config/default.yml

1
CHANGELOG.rst Normal file
View File

@ -0,0 +1 @@
Per-version CHANGELOGS can be found `here <changelogs/>`_.

316
CODING_GUIDELINES.md Normal file
View File

@ -0,0 +1,316 @@
Coding Guidelines
=================
Hi! Thanks for your interest in contributing to Ansible.
Here are some guidelines for contributing code. The purpose of this document is to establish what we're looking for in code contributions, and to make sure
new contributors know some of the conventions that we've been using.
We don't think much of this should be too strange to readers familiar with contributing to Python projects, though it helps if we all get on the same page.
Language
========
* While not all components of Ansible must be in Python, core contributions to the Ansible repo must be written in Python. This is to maximize the ability of everyone to contribute.
* If you want to write non-Python ansible modules or inventory scripts, that's fine, but they are not going to get merged in most likely. Sorry!!
PEP 8 and basic style checks
============================
* [PEP 8](https://www.python.org/dev/peps/pep-0008/) is a great Python style guide, which you should read.
* PEP 8 must not be strictly followed in all aspects, but most of it is good advice.
* The line is limited to 160 characters.
* To run checks for things we care about, use [ansible-test](http://docs.ansible.com/ansible/dev_guide/testing_pep8.html#running-locally).
* Similarly, additional checks can be made with "make pyflakes".
* There is no need to submit code changes for PEP 8 and pyflakes fixes, as these break attribution history. Project leadership will make these periodically.
* Do not submit pull requests that simply adjust whitespace in the code.
Testing
=======
* Much of ansible's testing needs are in integration, not unit tests. Add module tests there.
* That being said, there are unit tests too!
* Code written must absolutely pass tests (i.e. "make tests")
* You should anticipate any error paths in your code and test down those error paths.
* Additions to tests for core code are welcome, but not always possible. Be sure things are at least well tested manually in that case.
Whitespace
==========
* Four space indent is strictly required
* Include meaningful whitespace between lines of code
Shebang Lines
=============
* /usr/bin/scripts should start with '/usr/bin/env python'
* module code should still use '/usr/bin/python' as this is replaced automatically by 'ansible_python_interpreter', see the FAQ in the docs for more info.
Comments
========
* Readability is one of the most important goals for this project
* Comment any non-trivial code where someone might not know why you are doing something in a particular way
* Though if something should be commented, that's often a sign someone should write a function
* All new functions must have a basic docstring comment
* Commenting above a line is preferable to commenting at the end of a line
Classes
=======
* With the exception of module code (where inline is better), it is desirable to see classes in their own files.
* Classes should generally not cause side effects as soon as they are instantiated, move meaningful behavior to methods rather than constructors.
Functions and Methods
=====================
* In general, functions should not be 'too long' and should describe a meaningful amount of work
* When code gets too nested, that's usually the sign the loop body could benefit from being a function
* Parts of our existing code are not the best examples of this at times.
* Functions should have names that describe what they do, along with docstrings
* Functions should be named with_underscores
* "Don't repeat yourself" is generally a good philosophy
Variables
=========
* Use descriptive variable names instead of variables like 'x', unless x is an obvious loop index
* Ansible python code uses identifiers like 'ClassesLikeThis and variables_like_this
* Module parameters should also use_underscores and not runtogether
Module Security
===============
* Modules must take steps to avoid passing user input from the shell and always check return codes
* always use module.run_command instead of subprocess or Popen or os.system -- this is mandatory
* if you need to use the shell you must pass use_unsafe_shell=True to module.run_command
* if you do not need the shell, avoid using the shell
* any variables that can come from the user input with use_unsafe_shell=True must be wrapped by pipes.quote(x)
* downloads of https:// resource urls must import module_utils.urls and use the fetch_url method
Misc Preferences
================
Use the dict constructor where possible when allocating dictionaries:
# not this:
foo = {
'a' : 12,
'b' : 34
}
# this:
foo = dict(
a=12,
b=34,
)
Do not line up variables
# not this
a = 12
foosball = 34
xyz = 'dog'
# this
a = 12
foosball = 34
xyz = 'dog'
Don't use line continuations:
# no
if (this_is_a_very_long_line and foo and \
i_am_going_to_continue_it):
bar()
# better:
if (this_is_a_very_long_line and foo and i_am_going_to_continue_it):
bar()
Spacing:
# no
x = [1,2,3]
# no
x = [ 1, 2, 3 ]
# yes
x = [1, 2, 3]
Spacing continued:
# no
x=foo(12)
# no
x = foo( 12 )
# yes
x = foo(12)
Licenses
========
Every file should have a license header, including the copyright of the original author. Major additions to the module are allowed
to add an additional copyright line, and this is especially true of rewrites, but original authorship copyright messages should be preserved.
All contributions to the core repo should preserve original licenses and new contributions must include the GPLv3 header.
Module Documentation
====================
All module pull requests must include a DOCUMENTATION docstring (YAML format,
see other modules for examples) as well as an EXAMPLES docstring, which is free form.
When adding new modules, any new parameter must have a "version_added" attribute.
When submitting a new module, the module should have a "version_added" attribute in the
pull request as well, set to the current development version.
Be sure to check grammar and spelling.
It's frequently the case that modules get submitted with YAML that isn't valid,
so you can run "make webdocs" from the checkout to preview your module's documentation.
If it fails to build, take a look at your DOCUMENTATION string
or you might have a Python syntax error in there too.
Python Imports
==============
To make it clear what a module is importing, imports should not be sprinkled throughout the code.
Python Imports should happen at the top of the file, exempting code from module_utils.
When a conditional runtime import is required, do so something like this instead:
HAS_FOO = False
try:
import foo
HAS_FOO = True
except ImportError:
pass
...
if not HAS_FOO:
raise Exception("the foo library is required")
This makes it clear what optional dependencies are but allows this to be deferred until runtime. In the case of module code, the raising of the Exception will be replaced
with a "module.exit_json" call.
Exceptions
==========
In the main body of the code, use typed exceptions where possible:
# not this
raise Exception("panic!")
# this
from ansible import errors
...
raise errors.AnsibleError("panic!")
Similarly, exception checking should be fine grained:
# not this
try:
foo()
except:
bar()
# but this
try:
foo()
except SomeTypedException:
bar()
List Comprehensions
===================
In general list comprehensions are always preferred to map() and filter() calls.
However, they can be abused. Optimize for readability, and avoid nesting them too deeply.
Regexes
=======
There is a time and place for them, but here's an illustrative joke.
"A developer had a problem, and used a regular expression to solve it. Now the developer had two problems".
Often regexes are difficult to maintain, and a trusty call to other string operations can be a great solution, faster,
and more readable.
File Conventions
================
If a piece of code looks for a named YAML file in a directory, it should assume it can take no extension, or an extension of '.yml' or '.yaml'.
This should be true against all code that loads files.
Any code that uses directories should consider the possibility that the directory may be symlink.
New Ansible language parameters
===============================
If adding a new parameter, like 'can_fizzbuzz: True/False' be sure the value of the parameter is templated somewhere in the Runner code, as if anything can be parameterized in Ansible,
there is a user that will try to parameterize it.
String Find
===========
Use 'in':
# not this:
if x.find('foo') != -1:
# this:
if 'foo' in x:
String checks
=============
To test if something is a string, consider that it may be unicode.
# no
if type(x) == str:
# yes
from ansible.module_utils.six import string_types
if isinstance(x, string_types):
Cleverness
==========
Ansible's code is intended to be read by as many people as possible, so we don't particularly encourage clever or heavily idiomatic code.
In particular, metaclasses are probably not appropriate, however entertaining they may be to add.
Git Practices
=============
Pull requests cannot be accepted that contain merge commits.
Always do "git pull --rebase" and "git rebase" vs "git pull" or "git merge".
Always create a new branch for each pull request to avoid intermingling different features or fixes on the same branch.
Python Version Compliance
=========================
All code in Ansible core must support a minimum version of Python 2.6.
Module code must support a minimum of Python 2.4, with occasional exceptions for modules that require code that themselves require 2.6 and later.
A quick reminder is that list comprehensions in Python 2.4 are not as fully fleshed out, there are no 'dict' comprehensions, and there is no 'with' statement.
But otherwise it's pretty much all the same.
The End
=======
This was not meant to be a scary document, so we hope it wasn't, but we also hope this helps you write code that is easier to maintain by others in the future.
If you have questions about this document, please ask on the ansible-devel mailing list.
Thank you!

29
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,29 @@
# WELCOME TO ANSIBLE GITHUB
Hi! Nice to see you here!
## QUESTIONS ?
Please see the [community guide](http://docs.ansible.com/ansible/latest/community/index.html) for information on how to ask questions on the [mailing lists](http://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information) and IRC.
The GitHub issue tracker is not the best place for questions for various reasons, but both IRC and the mailing list are very helpful places for those things, as the community page explains best.
## CONTRIBUTING ?
Please see the [community guide](http://docs.ansible.com/ansible/latest/community/index.html) for information regarding the contribution process. Important license agreement information is also included on that page.
## BUG TO REPORT ?
First and foremost, also check the [community guide](http://docs.ansible.com/ansible/latest/community/index.html).
You can report bugs or make enhancement requests at the [Ansible GitHub issue page](http://github.com/ansible/ansible/issues/new) by filling out the issue template that will be presented.
Also please make sure you are testing on the latest released version of Ansible or the development branch. You can find the latest releases and development branch at:
- https://github.com/ansible/ansible/releases
- https://github.com/ansible/ansible/archive/devel.tar.gz
Thanks!

View File

@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
@ -664,11 +664,12 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -1,10 +1,21 @@
include COPYING
include changelogs/CHANGELOG*.rst
include changelogs/changelog.yaml
include licenses/*.txt
prune ticket_stubs
prune hacking
include README.rst COPYING
include SYMLINK_CACHE.json
include requirements.txt
recursive-include packaging *.py *.j2
recursive-include test/integration *
recursive-include test/sanity *.in *.json *.py *.txt *.ini
recursive-include test/support *.py *.ps1 *.psm1 *.cs *.md
recursive-include test/units *
include .coveragerc
include .yamllint
include examples/hosts
include examples/ansible.cfg
recursive-include lib/ansible/module_utils/powershell *
recursive-include lib/ansible/modules *
recursive-include lib/ansible/galaxy/data *
recursive-include docs *
recursive-include licenses *
recursive-include packaging *
recursive-include test *
include Makefile
include MANIFEST.in
include changelogs/*.rst
include contrib/README.md
recursive-include contrib/inventory *

3
MODULE_GUIDELINES.md Normal file
View File

@ -0,0 +1,3 @@
# Module Maintainer Guidelines
The Ansible Module Maintainer Guidelines can now be found in the [official Ansible community guide](http://docs.ansible.com/ansible/latest/community/maintainers.html).

400
Makefile Normal file
View File

@ -0,0 +1,400 @@
# WARN: gmake syntax
########################################################
# Makefile for Ansible
#
# useful targets:
# make sdist ---------------- produce a tarball
# make srpm ----------------- produce a SRPM
# make rpm ----------------- produce RPMs
# 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 pyflakes, make pep8 -- source code checks
########################################################
# variable section
NAME = ansible
OS = $(shell uname -s)
PREFIX ?= '/usr/local'
# This doesn't evaluate until it's called. The -D argument is the
# directory of the target file ($@), kinda like `dirname`.
MANPAGES ?= $(patsubst %.asciidoc.in,%,$(wildcard ./docs/man/man1/ansible*.1.asciidoc.in))
ifneq ($(shell which a2x 2>/dev/null),)
ASCII2MAN = a2x -L -D $(dir $@) -d manpage -f manpage $<
ASCII2HTMLMAN = a2x -L -D docs/html/man/ -d manpage -f xhtml
else
ASCII2MAN = @echo "ERROR: AsciiDoc 'a2x' command is not installed but is required to build $(MANPAGES)" && exit 1
endif
GENERATE_CLI = docs/bin/generate_man.py
PYTHON=python
SITELIB = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
# fetch version from project release.py as single source-of-truth
VERSION := $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --raw || echo error)
ifeq ($(findstring error,$(VERSION)), error)
$(error "version_helper failed")
endif
# if a specific release was not requested, set to 0 (RPMs have "fancier" logic for this further down)
RELEASE ?= 1
# Get the branch information from git
ifneq ($(shell which git),)
GIT_DATE := $(shell git log -n 1 --format="%ai")
GIT_HASH := $(shell git log -n 1 --format="%h")
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD | sed 's/[-_.\/]//g')
GITINFO = .$(GIT_HASH).$(GIT_BRANCH)
else
GITINFO = ""
endif
ifeq ($(shell echo $(OS) | egrep -c 'Darwin|FreeBSD|OpenBSD|DragonFly'),1)
DATE := $(shell date -j -r $(shell git log -n 1 --format="%at") +%Y%m%d%H%M)
CPUS ?= $(shell sysctl hw.ncpu|awk '{print $$2}')
else
DATE := $(shell date --utc --date="$(GIT_DATE)" +%Y%m%d%H%M)
CPUS ?= $(shell nproc)
endif
# DEB build parameters
DEBUILD_BIN ?= debuild
DEBUILD_OPTS = --source-option="-I"
DPUT_BIN ?= dput
DPUT_OPTS ?=
DEB_DATE := $(shell LC_TIME=C date +"%a, %d %b %Y %T %z")
DEB_VERSION := $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --debversion)
ifeq ($(OFFICIAL),yes)
DEB_RELEASE := $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --debrelease)ppa
# Sign OFFICIAL builds using 'DEBSIGN_KEYID'
# DEBSIGN_KEYID is required when signing
ifneq ($(DEBSIGN_KEYID),)
DEBUILD_OPTS += -k$(DEBSIGN_KEYID)
endif
else
DEB_RELEASE = 100.git$(DATE)$(GITINFO)
# Do not sign unofficial builds
DEBUILD_OPTS += -uc -us
DPUT_OPTS += -u
endif
DEBUILD = $(DEBUILD_BIN) $(DEBUILD_OPTS)
DEB_PPA ?= ppa
# Choose the desired Ubuntu release: lucid precise saucy trusty
DEB_DIST ?= unstable
# pbuilder parameters
PBUILDER_ARCH ?= amd64
PBUILDER_CACHE_DIR = /var/cache/pbuilder
PBUILDER_BIN ?= pbuilder
PBUILDER_OPTS ?= --debootstrapopts --variant=buildd --architecture $(PBUILDER_ARCH) --debbuildopts -b
# RPM build parameters
RPMSPECDIR= packaging/rpm
RPMSPEC = $(RPMSPECDIR)/ansible.spec
RPMDIST = $(shell rpm --eval '%{?dist}')
ifneq ($(OFFICIAL),yes)
RPMRELEASE = 100.git$(DATE)$(GITINFO)
endif
ifeq ($(PUBLISH),nightly)
# https://fedoraproject.org/wiki/Packaging:Versioning#Snapshots
RPMRELEASE = $(RELEASE).$(DATE)git.$(GIT_HASH)
endif
RPMVERSION ?= $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --baseversion)
RPMRELEASE ?= $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --rpmrelease)
RPMNVR = "$(NAME)-$(RPMVERSION)-$(RPMRELEASE)$(RPMDIST)$(REPOTAG)"
# MOCK build parameters
MOCK_BIN ?= mock
MOCK_CFG ?=
# dynamically add repotag define only if specified
ifneq ($(REPOTAG),)
EXTRA_RPM_DEFINES += --define "repotag $(REPOTAG)"
endif
# ansible-test parameters
ANSIBLE_TEST ?= test/runner/ansible-test
TEST_FLAGS ?=
# ansible-test units parameters (make test / make test-py3)
PYTHON_VERSION ?= $(shell python2 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
PYTHON3_VERSION ?= $(shell python3 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
# ansible-test integration parameters (make integration)
IMAGE ?= centos7
TARGET ?=
########################################################
.PHONY: all
all: clean python
.PHONY: tests
tests:
$(ANSIBLE_TEST) units -v --python $(PYTHON_VERSION) $(TEST_FLAGS)
.PHONY: tests-py3
tests-py3:
$(ANSIBLE_TEST) units -v --python $(PYTHON3_VERSION) $(TEST_FLAGS)
.PHONY: tests-nonet
tests-nonet:
$(ANSIBLE_TEST) units -v --python $(PYTHON_VERSION) $(TEST_FLAGS) --exclude test/units/modules/network/
.PHONY: integration
integration:
$(ANSIBLE_TEST) integration -v --docker $(IMAGE) $(TARGET) $(TEST_FLAGS)
.PHONY: authors
authors:
sh hacking/authors.sh
# Regenerate %.1.asciidoc if %.1.asciidoc.in has been modified more
# recently than %.1.asciidoc.
%.1.asciidoc: %.1.asciidoc.in
sed "s/%VERSION%/$(VERSION)/" $< > $@
# Regenerate %.1 if %.1.asciidoc or release.py has been modified more
# recently than %.1. (Implicitly runs the %.1.asciidoc recipe)
%.1: %.1.asciidoc lib/ansible/release.py
$(ASCII2MAN)
.PHONY: loc
loc:
sloccount lib library bin
.PHONY: pep8
pep8:
$(ANSIBLE_TEST) sanity --test pep8 --python $(PYTHON_VERSION) $(TEST_FLAGS)
.PHONY: pyflakes
pyflakes:
pyflakes lib/ansible/*.py lib/ansible/*/*.py bin/*
.PHONY: clean
clean:
@echo "Cleaning up distutils stuff"
rm -rf build
rm -rf dist
rm -rf lib/ansible.egg-info/
@echo "Cleaning up byte compiled python stuff"
find . -type f -regex ".*\.py[co]$$" -delete
find . -type d -name "__pycache__" -delete
@echo "Cleaning up editor backup files"
find . -type f -not -path ./test/units/inventory_test_data/group_vars/noparse/all.yml~ \( -name "*~" -or -name "#*" \) -delete
find . -type f \( -name "*.swp" \) -delete
@echo "Cleaning up manpage stuff"
find ./docs/man -type f -name "*.xml" -delete
find ./docs/man -type f -name "*.asciidoc" -delete
find ./docs/man/man3 -type f -name "*.3" -delete
rm -f ./docs/man/man1/*
@echo "Cleaning up output from test runs"
rm -rf test/test_data
rm -rf shippable/
rm -rf logs/
rm -rf .cache/
rm -f test/units/.coverage*
rm -rf test/results/*/*
find test/ -type f -name '*.retry' -delete
@echo "Cleaning up RPM building stuff"
rm -rf MANIFEST rpm-build
@echo "Cleaning up Debian building stuff"
rm -rf debian
rm -rf deb-build
rm -rf docs/json
rm -rf docs/js
@echo "Cleaning up authors file"
rm -f AUTHORS.TXT
@echo "Cleaning up docsite"
$(MAKE) -C docs/docsite clean
$(MAKE) -C docs/api clean
.PHONY: python
python:
$(PYTHON) setup.py build
.PHONY: install
install:
$(PYTHON) setup.py install
install_manpages:
gzip -9 $(wildcard ./docs/man/man1/ansible*.1)
cp $(wildcard ./docs/man/man1/ansible*.1.gz) $(PREFIX)/man/man1/
.PHONY: sdist
sdist: clean docs changelog_aggregate
$(PYTHON) setup.py sdist
.PHONY: sdist_upload
sdist_upload: clean docs
$(PYTHON) setup.py sdist upload 2>&1 |tee upload.log
# TODO: variable-ize major version number usages here
.PHONY: changelog_reno
changelog_reno:
reno -d changelogs/ report --title 'Ansible 2.5 "Kashmir" Release Notes' --collapse-pre-release --no-show-source --earliest-version v2.5.0b1 --output changelogs/CHANGELOG-v2.5.rst
.PHONY: changelog_aggregate
changelog_aggregate:
echo "TODO: unified changelog" > changelogs/CHANGELOG.rst
.PHONY: rpmcommon
rpmcommon: sdist
@mkdir -p rpm-build
@cp dist/*.gz rpm-build/
@cp $(RPMSPEC) rpm-build/$(NAME).spec
.PHONY: mock-srpm
mock-srpm: /etc/mock/$(MOCK_CFG).cfg rpmcommon
$(MOCK_BIN) -r $(MOCK_CFG) $(MOCK_ARGS) --resultdir rpm-build/ --bootstrap-chroot --old-chroot --buildsrpm --spec rpm-build/$(NAME).spec --sources rpm-build/ \
--define "rpmversion $(RPMVERSION)" \
--define "upstream_version $(VERSION)" \
--define "rpmrelease $(RPMRELEASE)" \
$(EXTRA_RPM_DEFINES)
@echo "#############################################"
@echo "Ansible SRPM is built:"
@echo rpm-build/*.src.rpm
@echo "#############################################"
.PHONY: mock-rpm
mock-rpm: /etc/mock/$(MOCK_CFG).cfg mock-srpm
$(MOCK_BIN) -r $(MOCK_CFG) $(MOCK_ARGS) --resultdir rpm-build/ --bootstrap-chroot --old-chroot --rebuild rpm-build/$(NAME)-*.src.rpm \
--define "rpmversion $(RPMVERSION)" \
--define "upstream_version $(VERSION)" \
--define "rpmrelease $(RPMRELEASE)" \
$(EXTRA_RPM_DEFINES)
@echo "#############################################"
@echo "Ansible RPM is built:"
@echo rpm-build/*.noarch.rpm
@echo "#############################################"
.PHONY: srpm
srpm: rpmcommon
@rpmbuild --define "_topdir %(pwd)/rpm-build" \
--define "_builddir %{_topdir}" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
--define "_specdir $(RPMSPECDIR)" \
--define "_sourcedir %{_topdir}" \
--define "upstream_version $(VERSION)" \
--define "rpmversion $(RPMVERSION)" \
--define "rpmrelease $(RPMRELEASE)" \
$(EXTRA_RPM_DEFINES) \
-bs rpm-build/$(NAME).spec
@rm -f rpm-build/$(NAME).spec
@echo "#############################################"
@echo "Ansible SRPM is built:"
@echo " rpm-build/$(RPMNVR).src.rpm"
@echo "#############################################"
.PHONY: rpm
rpm: rpmcommon
@rpmbuild --define "_topdir %(pwd)/rpm-build" \
--define "_builddir %{_topdir}" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
--define "_specdir $(RPMSPECDIR)" \
--define "_sourcedir %{_topdir}" \
--define "_rpmfilename $(RPMNVR).%%{ARCH}.rpm" \
--define "__python `which $(PYTHON)`" \
--define "upstream_version $(VERSION)" \
--define "rpmversion $(RPMVERSION)" \
--define "rpmrelease $(RPMRELEASE)" \
$(EXTRA_RPM_DEFINES) \
-ba rpm-build/$(NAME).spec
@rm -f rpm-build/$(NAME).spec
@echo "#############################################"
@echo "Ansible RPM is built:"
@echo " rpm-build/$(RPMNVR).noarch.rpm"
@echo "#############################################"
.PHONY: debian
debian: sdist
@for DIST in $(DEB_DIST) ; do \
mkdir -p deb-build/$${DIST} ; \
tar -C deb-build/$${DIST} -xvf dist/$(NAME)-$(VERSION).tar.gz ; \
cp -a packaging/debian deb-build/$${DIST}/$(NAME)-$(VERSION)/ ; \
sed -ie "s|%VERSION%|$(DEB_VERSION)|g;s|%RELEASE%|$(DEB_RELEASE)|;s|%DIST%|$${DIST}|g;s|%DATE%|$(DEB_DATE)|g" deb-build/$${DIST}/$(NAME)-$(VERSION)/debian/changelog ; \
done
.PHONY: deb
deb: deb-src
@for DIST in $(DEB_DIST) ; do \
PBUILDER_OPTS="$(PBUILDER_OPTS) --distribution $${DIST} --basetgz $(PBUILDER_CACHE_DIR)/$${DIST}-$(PBUILDER_ARCH)-base.tgz --buildresult $(CURDIR)/deb-build/$${DIST}" ; \
$(PBUILDER_BIN) create $${PBUILDER_OPTS} --othermirror "deb http://archive.ubuntu.com/ubuntu $${DIST} universe" ; \
$(PBUILDER_BIN) update $${PBUILDER_OPTS} ; \
$(PBUILDER_BIN) build $${PBUILDER_OPTS} deb-build/$${DIST}/$(NAME)_$(DEB_VERSION)-$(DEB_RELEASE)~$${DIST}.dsc ; \
done
@echo "#############################################"
@echo "Ansible DEB artifacts:"
@for DIST in $(DEB_DIST) ; do \
echo deb-build/$${DIST}/$(NAME)_$(DEB_VERSION)-$(DEB_RELEASE)~$${DIST}_amd64.changes ; \
done
@echo "#############################################"
# Build package outside of pbuilder, with locally installed dependencies.
# Install BuildRequires as noted in packaging/debian/control.
.PHONY: local_deb
local_deb: debian
@for DIST in $(DEB_DIST) ; do \
(cd deb-build/$${DIST}/$(NAME)-$(VERSION)/ && $(DEBUILD) -b) ; \
done
@echo "#############################################"
@echo "Ansible DEB artifacts:"
@for DIST in $(DEB_DIST) ; do \
echo deb-build/$${DIST}/$(NAME)_$(DEB_VERSION)-$(DEB_RELEASE)~$${DIST}_amd64.changes ; \
done
@echo "#############################################"
.PHONY: deb-src
deb-src: debian
@for DIST in $(DEB_DIST) ; do \
(cd deb-build/$${DIST}/$(NAME)-$(VERSION)/ && $(DEBUILD) -S) ; \
done
@echo "#############################################"
@echo "Ansible DEB artifacts:"
@for DIST in $(DEB_DIST) ; do \
echo deb-build/$${DIST}/$(NAME)_$(VERSION)-$(DEB_RELEASE)~$${DIST}_source.changes ; \
done
@echo "#############################################"
.PHONY: deb-upload
deb-upload: deb
@for DIST in $(DEB_DIST) ; do \
$(DPUT_BIN) $(DPUT_OPTS) $(DEB_PPA) deb-build/$${DIST}/$(NAME)_$(VERSION)-$(DEB_RELEASE)~$${DIST}_amd64.changes ; \
done
.PHONY: deb-src-upload
deb-src-upload: deb-src
@for DIST in $(DEB_DIST) ; do \
$(DPUT_BIN) $(DPUT_OPTS) $(DEB_PPA) deb-build/$${DIST}/$(NAME)_$(VERSION)-$(DEB_RELEASE)~$${DIST}_source.changes ; \
done
.PHONY: epub
epub:
(cd docs/docsite/; CPUS=$(CPUS) make epub)
# for arch or gentoo, read instructions in the appropriate 'packaging' subdirectory directory
.PHONY: webdocs
webdocs:
(cd docs/docsite/; CPUS=$(CPUS) make docs)
.PHONY: generate_asciidoc
generate_asciidoc: lib/ansible/cli/*.py
mkdir -p ./docs/man/man1/ ; \
PYTHONPATH=./lib $(GENERATE_CLI) --template-file=docs/templates/man.j2 --output-dir=docs/man/man1/ --output-format man lib/ansible/cli/*.py
docs: generate_asciidoc
make $(MANPAGES)
.PHONY: alldocs
alldocs: docs webdocs
version:
@echo $(VERSION)

101
README.md
View File

@ -1,101 +0,0 @@
[![PyPI version](https://img.shields.io/pypi/v/ansible-core.svg)](https://pypi.org/project/ansible-core)
[![Docs badge](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://docs.ansible.com/ansible/latest/)
[![Chat badge](https://img.shields.io/badge/chat-IRC-brightgreen.svg)](https://docs.ansible.com/ansible/devel/community/communication.html)
[![Build Status](https://dev.azure.com/ansible/ansible/_apis/build/status/CI?branchName=devel)](https://dev.azure.com/ansible/ansible/_build/latest?definitionId=20&branchName=devel)
[![Ansible Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-Ansible-silver.svg)](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html)
[![Ansible mailing lists](https://img.shields.io/badge/mailing%20lists-Ansible-orange.svg)](https://docs.ansible.com/ansible/devel/community/communication.html#mailing-list-information)
[![Repository License](https://img.shields.io/badge/license-GPL%20v3.0-brightgreen.svg)](COPYING)
[![Ansible CII Best Practices certification](https://bestpractices.coreinfrastructure.org/projects/2372/badge)](https://bestpractices.coreinfrastructure.org/projects/2372)
# Ansible
Ansible is a radically simple IT automation system. It handles
configuration management, application deployment, cloud provisioning,
ad-hoc task execution, network automation, and multi-node orchestration. Ansible makes complex
changes like zero-downtime rolling updates with load balancers easy. More information on the Ansible [website](https://ansible.com/).
## Design Principles
* Have an extremely simple setup process with a minimal learning curve.
* Manage machines quickly and in parallel.
* Avoid custom-agents and additional open ports, be agentless by
leveraging the existing SSH daemon.
* Describe infrastructure in a language that is both machine and human
friendly.
* Focus on security and easy auditability/review/rewriting of content.
* Manage new remote machines instantly, without bootstrapping any
software.
* Allow module development in any dynamic language, not just Python.
* Be usable as non-root.
* Be the easiest IT automation system to use, ever.
## Use Ansible
You can install a released version of Ansible with `pip` or a package manager. See our
[installation guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) for details on installing Ansible
on a variety of platforms.
Power users and developers can run the `devel` branch, which has the latest
features and fixes, directly. Although it is reasonably stable, you are more likely to encounter
breaking changes when running the `devel` branch. We recommend getting involved
in the Ansible community if you want to run the `devel` branch.
## Communication
Join the Ansible forum to ask questions, get help, and interact with the
community.
* [Get Help](https://forum.ansible.com/c/help/6): Find help or share your Ansible knowledge to help others.
Use tags to filter and subscribe to posts, such as the following:
* Posts tagged with [ansible](https://forum.ansible.com/tag/ansible)
* Posts tagged with [ansible-core](https://forum.ansible.com/tag/ansible-core)
* Posts tagged with [playbook](https://forum.ansible.com/tag/playbook)
* [Social Spaces](https://forum.ansible.com/c/chat/4): Meet and interact with fellow enthusiasts.
* [News & Announcements](https://forum.ansible.com/c/news/5): Track project-wide announcements including social events.
* [Bullhorn newsletter](https://docs.ansible.com/ansible/devel/community/communication.html#the-bullhorn): Get release announcements and important changes.
For more ways to get in touch, see [Communicating with the Ansible community](https://docs.ansible.com/ansible/devel/community/communication.html).
## Contribute to Ansible
* Check out the [Contributor's Guide](./.github/CONTRIBUTING.md).
* Read [Community Information](https://docs.ansible.com/ansible/devel/community) for all
kinds of ways to contribute to and interact with the project,
including how to submit bug reports and code to Ansible.
* Submit a proposed code update through a pull request to the `devel` branch.
* Talk to us before making larger changes
to avoid duplicate efforts. This not only helps everyone
know what is going on, but it also helps save time and effort if we decide
some changes are needed.
## Coding Guidelines
We document our Coding Guidelines in the [Developer Guide](https://docs.ansible.com/ansible/devel/dev_guide/). We particularly suggest you review:
* [Contributing your module to Ansible](https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_checklist.html)
* [Conventions, tips, and pitfalls](https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_best_practices.html)
## Branch Info
* The `devel` branch corresponds to the release actively under development.
* The `stable-2.X` branches correspond to stable releases.
* Create a branch based on `devel` and set up a [dev environment](https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_general.html#common-environment-setup) if you want to open a PR.
* See the [Ansible release and maintenance](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html) page for information about active branches.
## Roadmap
Based on team and community feedback, an initial roadmap will be published for a major or minor version (ex: 2.7, 2.8).
The [Ansible Roadmap page](https://docs.ansible.com/ansible/devel/roadmap/) details what is planned and how to influence the roadmap.
## Authors
Ansible was created by [Michael DeHaan](https://github.com/mpdehaan)
and has contributions from over 5000 users (and growing). Thanks everyone!
[Ansible](https://www.ansible.com) is sponsored by [Red Hat, Inc.](https://www.redhat.com)
## License
GNU General Public License v3.0 or later
See [COPYING](COPYING) to see the full text.

100
README.rst Normal file
View File

@ -0,0 +1,100 @@
|PyPI version| |Docs badge| |Build Status|
*******
Ansible
*******
Ansible is a radically simple IT automation system. It handles
configuration-management, application deployment, cloud provisioning,
ad-hoc task-execution, and multinode orchestration -- including
trivializing things like zero-downtime rolling updates with load
balancers.
Read the documentation and more at https://ansible.com/
You can find installation instructions
`here <https://docs.ansible.com/intro_getting_started.html>`_ for a
variety of platforms.
Most users should probably install a released version of Ansible from ``pip``, a package manager or
our `release repository <https://releases.ansible.com/ansible/>`_. `Officially supported
<https://www.ansible.com/ansible-engine>`_ builds of Ansible are also available. Some power users
run directly from the development branch - while significant efforts are made to ensure that
``devel`` is reasonably stable, you're more likely to encounter breaking changes when running
Ansible this way.
Design Principles
=================
* Have a dead simple setup process and a minimal learning curve
* Manage machines very quickly and in parallel
* Avoid custom-agents and additional open ports, be agentless by
leveraging the existing SSH daemon
* Describe infrastructure in a language that is both machine and human
friendly
* Focus on security and easy auditability/review/rewriting of content
* Manage new remote machines instantly, without bootstrapping any
software
* Allow module development in any dynamic language, not just Python
* Be usable as non-root
* Be the easiest IT automation system to use, ever.
Get Involved
============
* Read `Community
Information <https://docs.ansible.com/community.html>`_ for all
kinds of ways to contribute to and interact with the project,
including mailing list information and how to submit bug reports and
code to Ansible.
* All code submissions are done through pull requests. Take care to
make sure no merge commits are in the submission, and use
``git rebase`` vs ``git merge`` for this reason. If submitting a
large code change (other than modules), it's probably a good idea to
join ansible-devel and talk about what you would like to do or add
first to avoid duplicate efforts. This not only helps everyone
know what's going on, it also helps save time and effort if we decide
some changes are needed.
* Users list:
`ansible-project <https://groups.google.com/group/ansible-project>`_
* Development list:
`ansible-devel <https://groups.google.com/group/ansible-devel>`_
* Announcement list:
`ansible-announce <https://groups.google.com/group/ansible-announce>`_
-- read only
* irc.freenode.net: #ansible
Branch Info
===========
* Releases are named after Led Zeppelin songs. (Releases prior to 2.0
were named after Van Halen songs.)
* The devel branch corresponds to the release actively under
development.
* Various release-X.Y branches exist for previous releases.
* We'd love to have your contributions, read `Community
Information <https://docs.ansible.com/community.html>`_ for notes on
how to get started.
Authors
=======
Ansible was created by `Michael DeHaan <https://github.com/mpdehaan>`_
(michael.dehaan/gmail/com) and has contributions from over 1000 users
(and growing). Thanks everyone!
Ansible is sponsored by `Ansible, Inc <https://ansible.com>`_
License
=======
GNU General Public License v3.0
See `COPYING <COPYING>`_ to see the full text.
.. |PyPI version| image:: https://img.shields.io/pypi/v/ansible.svg
:target: https://pypi.org/project/ansible
.. |Docs badge| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
:target: http://docs.ansible.com/ansible
.. |Build Status| image:: https://api.shippable.com/projects/573f79d02a8192902e20e34b/badge?branch=devel
:target: https://app.shippable.com/projects/573f79d02a8192902e20e34b

92
RELEASES.txt Normal file
View File

@ -0,0 +1,92 @@
Ansible Releases at a Glance
============================
VERSION RELEASE CODE NAME
++++++++++++++++++++++++++++++
2.5.2 2018-04-26 "Kashmir"
2.5.1 2018-04-18 "Kashmir"
2.5.0 2018-03-22 "Kashmir"
2.4.4 2018-04-04 "Dancing Days"
2.4.3 01-31.2018 "Dancing Days"
2.4.2 11-29-2017 "Dancing Days"
2.4.1 10-25-2017 "Dancing Days"
2.4.0 09-19-2017 "Dancing Days"
2.3.3 12-20-2017 "Ramble On"
2.3.2 2017-08-04 "Ramble On"
2.3.1 2017-06-01 "Ramble On"
2.3.0 2017-04-12 "Ramble On"
2.2.3 2017-05-09 "The Battle of Evermore"
2.2.2 2017-03-27 "The Battle of Evermore"
2.2.1 2017-01-16 "The Battle of Evermore"
2.2.0 2016-11-01 "The Battle of Evermore"
2.1.6 2017-06-01 "The Song Remains the Same"
2.1.5 2017-03-27 "The Song Remains the Same"
2.1.4 2017-01-16 "The Song Remains the Same"
2.1.3 2016-11-04 "The Song Remains the Same"
2.1.2 2016-09-29 "The Song Remains the Same"
2.1.1 2016-07-28 "The Song Remains the Same"
2.1.0 2016-05-25 "The Song Remains the Same"
2.0.2 2016-04-19 "Over the Hills and Far Away"
2.0.1 2016-02-24 "Over the Hills and Far Away"
2.0.0 2016-01-12 "Over the Hills and Far Away"
1.9.6 2016-04-15 "Dancing In the Streets"
1.9.5 2016-03-21 "Dancing In the Streets"
1.9.4 2015-10-09 "Dancing In the Streets"
1.9.3 2015-09-03 "Dancing In the Streets"
1.9.2 2015-06-24 "Dancing In the Streets"
1.9.1 2015-04-27 "Dancing In the Streets"
1.9.0 2015-03-25 "Dancing In the Streets"
1.8.4 2015-02-19 "You Really Got Me"
1.8.3 2015-02-17 "You Really Got Me"
1.8.2 2014-12-04 "You Really Got Me"
1.8.1 2014-11-26 "You Really Got Me"
1.8.0 2014-11-25 "You Really Got Me"
1.7.2 2014-09-24 "Summer Nights"
1.7.1 2014-08-14 "Summer Nights"
1.7.0 2014-08-06 "Summer Nights"
1.6.10 2014-07-25 "The Cradle Will Rock"
1.6.9 2014-07-24 "The Cradle Will Rock"
1.6.8 2014-07-22 "The Cradle Will Rock"
1.6.7 2014-07-21 "The Cradle Will Rock"
1.6.6 2014-07-01 "The Cradle Will Rock"
1.6.5 2014-06-25 "The Cradle Will Rock"
1.6.4 2014-06-25 "The Cradle Will Rock"
1.6.3 2014-06-09 "The Cradle Will Rock"
1.6.2 2014-05-23 "The Cradle Will Rock"
1.6.1 2014-05-07 "The Cradle Will Rock"
1.6.0 2014-05-05 "The Cradle Will Rock"
1.5.5 2014-04-18 "Love Walks In"
1.5.4 2014-04-01 "Love Walks In"
1.5.3 2014-03-13 "Love Walks In"
1.5.2 2014-03-11 "Love Walks In"
1.5.1 2014-03-10 "Love Walks In"
1.5.0 2014-02-28 "Love Walks In"
1.4.5 2014-02-12 "Could This Be Magic?"
1.4.4 2014-01-06 "Could This Be Magic?"
1.4.3 2013-12-20 "Could This Be Magic?"
1.4.2 2013-12-18 "Could This Be Magic?"
1.4.1 2013-11-27 "Could This Be Magic?"
1.4.0 2013-11-21 "Could This Be Magic?"
1.3.4 2013-10-29 "Top of the World"
1.3.3 2013-10-09 "Top of the World"
1.3.2 2013-09-19 "Top of the World"
1.3.1 2013-09-16 "Top of the World"
1.3.0 2013-09-13 "Top of the World"
1.2.3 2013-08-21 "Right Now"
1.2.2 2013-07-05 "Right Now"
1.2.1 2013-07-04 "Right Now"
1.2.0 2013-06-10 "Right Now"
1.1.0 2013-04-02 "Mean Street"
1.0.0 2013-02-01 "Eruption"
0.9.0 2012-11-30 "Dreams"
0.8.0 2012-10-19 "Cathedral"
0.7.0 2012-09-06 "Panama"
0.6.0 2012-08-06 "Cabo"
0.5.0 2012-07-04 "Amsterdam"
0.4.0 2012-05-23 "Unchained"
0.3.0 2012-04-23 "Baluchitherium"
0.2.0 ? "Untitled"
0.1.0 ? "Untitled"
0.0.2 ? "Untitled"
0.0.1 ? "Untitled"

17
ROADMAP.rst Normal file
View File

@ -0,0 +1,17 @@
*******************************
Roadmap For Ansible by Red Hat
*******************************
This document is now the location for published Ansible Core roadmaps.
The roadmap will be updated by version. Based on team and community feedback, an initial roadmap will be published for a major or minor version (2.0, 2.1). Subminor versions will generally not have roadmaps published.
2.1 was the first time Ansible has published this and asked for feedback in this manner. So feedback on the roadmap and the new process is quite welcome. The team is aiming for further transparency and better inclusion of both community desires and submissions.
These roadmaps are the team's *best guess* roadmaps based on the Ansible team's experience and are also based on requests and feedback from the community. There are things that may not make it on due to time constraints, lack of community maintainers, etc. And there may be things that got missed, so each roadmap is published both as an idea of what is upcoming in Ansible, and as a medium for seeking further feedback from the community. Here are the good places for you to submit feedback:
- Add to the agenda of a `Core IRC Meetings <https://github.com/ansible/community/blob/master/meetings/README.md>`_ (preferred)
- Ansible's google-group: ansible-devel
- AnsibleFest conferences.
- IRC Freenode channel: #ansible-devel (this one may have things lost in lots of conversation, so a caution).
Ansible Roadmaps can be found `here <http://docs.ansible.com/ansible/devel/roadmap/>`_.

2716
ansible-core-sitemap.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
../lib/ansible/cli/adhoc.py

163
bin/ansible Executable file
View File

@ -0,0 +1,163 @@
#!/usr/bin/env python
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# 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 <http://www.gnu.org/licenses/>.
########################################################
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
__requires__ = ['ansible']
try:
import pkg_resources
except Exception:
# Use pkg_resources to find the correct versions of libraries and set
# sys.path appropriately when there are multiversion installs. But we
# have code that better expresses the errors in the places where the code
# is actually used (the deps are optional for many code paths) so we don't
# want to fail here.
pass
import os
import shutil
import sys
import traceback
from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError
from ansible.module_utils._text import to_text
# Used for determining if the system is running a new enough python version
# and should only restrict on our documented minimum versions
_PY3_MIN = sys.version_info[:2] >= (3, 5)
_PY2_MIN = (2, 6) <= sys.version_info[:2] < (3,)
_PY_MIN = _PY3_MIN or _PY2_MIN
if not _PY_MIN:
raise SystemExit('ERROR: Ansible requires a minimum of Python2 version 2.6 or Python3 version 3.5. Current version: %s' % ''.join(sys.version.splitlines()))
class LastResort(object):
# OUTPUT OF LAST RESORT
def display(self, msg, log_only=None):
print(msg, file=sys.stderr)
def error(self, msg, wrap_text=None):
print(msg, file=sys.stderr)
if __name__ == '__main__':
display = LastResort()
try: # bad ANSIBLE_CONFIG or config options can force ugly stacktrace
import ansible.constants as C
from ansible.utils.display import Display
except AnsibleOptionsError as e:
display.error(to_text(e), wrap_text=False)
sys.exit(5)
cli = None
me = os.path.basename(sys.argv[0])
try:
display = Display()
display.debug("starting run")
sub = None
target = me.split('-')
if target[-1][0].isdigit():
# Remove any version or python version info as downstreams
# sometimes add that
target = target[:-1]
if len(target) > 1:
sub = target[1]
myclass = "%sCLI" % sub.capitalize()
elif target[0] == 'ansible':
sub = 'adhoc'
myclass = 'AdHocCLI'
else:
raise AnsibleError("Unknown Ansible alias: %s" % me)
try:
mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
except ImportError as e:
# ImportError members have changed in py3
if 'msg' in dir(e):
msg = e.msg
else:
msg = e.message
if msg.endswith(' %s' % sub):
raise AnsibleError("Ansible sub-program not implemented: %s" % me)
else:
raise
try:
args = [to_text(a, errors='surrogate_or_strict') for a in sys.argv]
except UnicodeError:
display.error('Command line args are not in utf-8, unable to continue. Ansible currently only understands utf-8')
display.display(u"The full traceback was:\n\n%s" % to_text(traceback.format_exc()))
exit_code = 6
else:
cli = mycli(args)
cli.parse()
exit_code = cli.run()
except AnsibleOptionsError as e:
cli.parser.print_help()
display.error(to_text(e), wrap_text=False)
exit_code = 5
except AnsibleParserError as e:
display.error(to_text(e), wrap_text=False)
exit_code = 4
# TQM takes care of these, but leaving comment to reserve the exit codes
# except AnsibleHostUnreachable as e:
# display.error(str(e))
# exit_code = 3
# except AnsibleHostFailed as e:
# display.error(str(e))
# exit_code = 2
except AnsibleError as e:
display.error(to_text(e), wrap_text=False)
exit_code = 1
except KeyboardInterrupt:
display.error("User interrupted execution")
exit_code = 99
except Exception as e:
if C.DEFAULT_DEBUG:
# Show raw stacktraces in debug mode, It also allow pdb to
# enter post mortem mode.
raise
have_cli_options = cli is not None and cli.options is not None
display.error("Unexpected Exception, this is probably a bug: %s" % to_text(e), wrap_text=False)
if not have_cli_options or have_cli_options and cli.options.verbosity > 2:
log_only = False
if hasattr(e, 'orig_exc'):
display.vvv('\nexception type: %s' % to_text(type(e.orig_exc)))
why = to_text(e.orig_exc)
if to_text(e) != why:
display.vvv('\noriginal msg: %s' % why)
else:
display.display("to see the full traceback, use -vvv")
log_only = True
display.display(u"the full traceback was:\n\n%s" % to_text(traceback.format_exc()), log_only=log_only)
exit_code = 250
finally:
# Remove ansible tmpdir
shutil.rmtree(C.DEFAULT_LOCAL_TMP, True)
sys.exit(exit_code)

View File

@ -1 +1 @@
../lib/ansible/cli/config.py
ansible

286
bin/ansible-connection Executable file
View File

@ -0,0 +1,286 @@
#!/usr/bin/env python
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
__requires__ = ['ansible']
try:
import pkg_resources
except Exception:
pass
import fcntl
import os
import signal
import socket
import sys
import traceback
import errno
import json
from ansible import constants as C
from ansible.module_utils._text import to_bytes, to_native, to_text
from ansible.module_utils.six import PY3
from ansible.module_utils.six.moves import cPickle, StringIO
from ansible.module_utils.connection import Connection, ConnectionError, send_data, recv_data
from ansible.module_utils.service import fork_process
from ansible.playbook.play_context import PlayContext
from ansible.plugins.loader import connection_loader
from ansible.utils.path import unfrackpath, makedirs_safe
from ansible.utils.display import Display
from ansible.utils.jsonrpc import JsonRpcServer
class ConnectionProcess(object):
'''
The connection process wraps around a Connection object that manages
the connection to a remote device that persists over the playbook
'''
def __init__(self, fd, play_context, socket_path, original_path, ansible_playbook_pid=None):
self.play_context = play_context
self.socket_path = socket_path
self.original_path = original_path
self.fd = fd
self.exception = None
self.srv = JsonRpcServer()
self.sock = None
self.connection = None
self._ansible_playbook_pid = ansible_playbook_pid
def start(self):
try:
messages = list()
result = {}
messages.append('control socket path is %s' % self.socket_path)
# If this is a relative path (~ gets expanded later) then plug the
# key's path on to the directory we originally came from, so we can
# find it now that our cwd is /
if self.play_context.private_key_file and self.play_context.private_key_file[0] not in '~/':
self.play_context.private_key_file = os.path.join(self.original_path, self.play_context.private_key_file)
self.connection = connection_loader.get(self.play_context.connection, self.play_context, '/dev/null',
ansible_playbook_pid=self._ansible_playbook_pid)
self.connection.set_options()
self.connection._connect()
self.connection._socket_path = self.socket_path
self.srv.register(self.connection)
messages.extend(sys.stdout.getvalue().splitlines())
messages.append('connection to remote device started successfully')
self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
self.sock.bind(self.socket_path)
self.sock.listen(1)
messages.append('local domain socket listeners started successfully')
except Exception as exc:
result['error'] = to_text(exc)
result['exception'] = traceback.format_exc()
finally:
result['messages'] = messages
self.fd.write(json.dumps(result))
self.fd.close()
def run(self):
try:
while self.connection.connected:
signal.signal(signal.SIGALRM, self.connect_timeout)
signal.signal(signal.SIGTERM, self.handler)
signal.alarm(C.PERSISTENT_CONNECT_TIMEOUT)
self.exception = None
(s, addr) = self.sock.accept()
signal.alarm(0)
signal.signal(signal.SIGALRM, self.command_timeout)
while True:
data = recv_data(s)
if not data:
break
signal.alarm(self.connection._play_context.timeout)
resp = self.srv.handle_request(data)
signal.alarm(0)
send_data(s, to_bytes(resp))
s.close()
except Exception as e:
# socket.accept() will raise EINTR if the socket.close() is called
if hasattr(e, 'errno'):
if e.errno != errno.EINTR:
self.exception = traceback.format_exc()
else:
self.exception = traceback.format_exc()
finally:
# when done, close the connection properly and cleanup
# the socket file so it can be recreated
self.shutdown()
def connect_timeout(self, signum, frame):
display.display('persistent connection idle timeout triggered, timeout value is %s secs' % C.PERSISTENT_CONNECT_TIMEOUT, log_only=True)
self.shutdown()
def command_timeout(self, signum, frame):
display.display('command timeout triggered, timeout value is %s secs' % self.play_context.timeout, log_only=True)
self.shutdown()
def handler(self, signum, frame):
display.display('signal handler called with signal %s' % signum, log_only=True)
self.shutdown()
def shutdown(self):
""" Shuts down the local domain socket
"""
if os.path.exists(self.socket_path):
try:
if self.sock:
self.sock.close()
if self.connection:
self.connection.close()
except:
pass
finally:
if os.path.exists(self.socket_path):
os.remove(self.socket_path)
setattr(self.connection, '_socket_path', None)
setattr(self.connection, '_connected', False)
display.display('shutdown complete', log_only=True)
def main():
""" Called to initiate the connect to the remote device
"""
rc = 0
result = {}
messages = list()
socket_path = None
# Need stdin as a byte stream
if PY3:
stdin = sys.stdin.buffer
else:
stdin = sys.stdin
# Note: update the below log capture code after Display.display() is refactored.
saved_stdout = sys.stdout
sys.stdout = StringIO()
try:
# read the play context data via stdin, which means depickling it
cur_line = stdin.readline()
init_data = b''
while cur_line.strip() != b'#END_INIT#':
if cur_line == b'':
raise Exception("EOF found before init data was complete")
init_data += cur_line
cur_line = stdin.readline()
if PY3:
pc_data = cPickle.loads(init_data, encoding='bytes')
else:
pc_data = cPickle.loads(init_data)
play_context = PlayContext()
play_context.deserialize(pc_data)
display.verbosity = play_context.verbosity
except Exception as e:
rc = 1
result.update({
'error': to_text(e),
'exception': traceback.format_exc()
})
if rc == 0:
ssh = connection_loader.get('ssh', class_only=True)
ansible_playbook_pid = sys.argv[1]
cp = ssh._create_control_path(play_context.remote_addr, play_context.port, play_context.remote_user, play_context.connection, ansible_playbook_pid)
# create the persistent connection dir if need be and create the paths
# which we will be using later
tmp_path = unfrackpath(C.PERSISTENT_CONTROL_PATH_DIR)
makedirs_safe(tmp_path)
lock_path = unfrackpath("%s/.ansible_pc_lock" % tmp_path)
socket_path = unfrackpath(cp % dict(directory=tmp_path))
# if the socket file doesn't exist, spin up the daemon process
lock_fd = os.open(lock_path, os.O_RDWR | os.O_CREAT, 0o600)
fcntl.lockf(lock_fd, fcntl.LOCK_EX)
if not os.path.exists(socket_path):
messages.append('local domain socket does not exist, starting it')
original_path = os.getcwd()
r, w = os.pipe()
pid = fork_process()
if pid == 0:
try:
os.close(r)
wfd = os.fdopen(w, 'w')
process = ConnectionProcess(wfd, play_context, socket_path, original_path, ansible_playbook_pid)
process.start()
except Exception:
messages.append(traceback.format_exc())
rc = 1
fcntl.lockf(lock_fd, fcntl.LOCK_UN)
os.close(lock_fd)
if rc == 0:
process.run()
sys.exit(rc)
else:
os.close(w)
rfd = os.fdopen(r, 'r')
data = json.loads(rfd.read())
messages.extend(data.pop('messages'))
result.update(data)
else:
messages.append('found existing local domain socket, using it!')
conn = Connection(socket_path)
pc_data = to_text(init_data)
try:
messages.extend(conn.update_play_context(pc_data))
except Exception as exc:
# Only network_cli has update_play context, so missing this is
# not fatal e.g. netconf
if isinstance(exc, ConnectionError) and getattr(exc, 'code', None) == -32601:
pass
else:
result.update({
'error': to_text(exc),
'exception': traceback.format_exc()
})
messages.append(sys.stdout.getvalue())
result.update({
'messages': messages,
'socket_path': socket_path
})
sys.stdout = saved_stdout
if 'exception' in result:
rc = 1
sys.stderr.write(json.dumps(result))
else:
rc = 0
sys.stdout.write(json.dumps(result))
sys.exit(rc)
if __name__ == '__main__':
display = Display()
main()

View File

@ -1 +1 @@
../lib/ansible/cli/console.py
ansible

View File

@ -1 +1 @@
../lib/ansible/cli/doc.py
ansible

View File

@ -1 +1 @@
../lib/ansible/cli/galaxy.py
ansible

View File

@ -1 +1 @@
../lib/ansible/cli/inventory.py
ansible

View File

@ -1 +1 @@
../lib/ansible/cli/playbook.py
ansible

View File

@ -1 +1 @@
../lib/ansible/cli/pull.py
ansible

View File

@ -1 +0,0 @@
../test/lib/ansible_test/_util/target/cli/ansible_test_cli_stub.py

View File

@ -1 +1 @@
../lib/ansible/cli/vault.py
ansible

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,588 @@
=======================================================
Ansible 2.0 "Over the Hills and Far Away" Release Notes
=======================================================
2.0.3 "Over the Hills and Far Away"
-----------------------------------
- Backport fix to uri module to return the body of an error response
- Backport fix to uri module to handle file:/// uris.
- Backport fix to uri module to fix traceback when handling certain
server error types.
2.0.2 "Over the Hills and Far Away"
-----------------------------------
- Backport of the 2.1 feature to ensure per-item callbacks are sent as
they occur, rather than all at once at the end of the task.
- Fixed bugs related to the iteration of tasks when certain
combinations of roles, blocks, and includes were used, especially
when handling errors in rescue/always portions of blocks.
- Fixed handling of redirects in our helper code, and ported the uri
module to use this helper code. This removes the httplib dependency
for this module while fixing some bugs related to redirects and SSL
certs.
- Fixed some bugs related to the incorrect creation of extra temp
directories for uploading files, which were not cleaned up properly.
- Improved error reporting in certain situations, to provide more
information such as the playbook file/line.
- Fixed a bug related to the variable precedence of role parameters,
especially when a role may be used both as a dependency of a role and
directly by itself within the same play.
- Fixed some bugs in the 2.0 implementation of do/until.
- Fixed some bugs related to run\_once:
- Ensure that all hosts are marked as failed if a task marked as
run\_once fails.
- Show a warning when using the free strategy when a run\_once task is
encountered, as there is no way for the free strategy to guarantee
the task is not run more than once.
- Fixed a bug where the assemble module was not honoring check mode in
some situations.
- Fixed a bug related to delegate\_to, where we were incorrectly using
variables from the inventory host rather than the delegated-to host.
- The 'package' meta-module now properly squashes items down to a
single execution (as the apt/yum/other package modules do).
- Fixed a bug related to the ansible-galaxy CLI command dealing with
paged results from the Galaxy server.
- Pipelining support is now available for the local and jail connection
plugins, which is useful for users who do not wish to have temp
files/directories created when running tasks with these connection
types.
- Improvements in support for additional shell types.
- Improvements in the code which is used to calculate checksums for
remote files.
- Some speed ups and bug fixes related to the variable merging code.
- Workaround bug in python subprocess on El Capitan that was making
vault fail when attempting to encrypt a file
- Fix lxc\_container module having predictable temp file names and
setting file permissions on the temporary file too leniently on a
temporary file that was executed as a script. Addresses CVE-2016-3096
- Fix a bug in the uri module where setting headers via module params
that start with ``HEADER_`` were causing a traceback.
- Fix bug in the free strategy that was causing it to synchronize its
workers after every task (making it a lot more like linear than it
should have been).
2.0.1 "Over the Hills and Far Away"
-----------------------------------
- Fixes a major compatibility break in the synchronize module shipped
with 2.0.0.x. That version of synchronize ran sudo on the controller
prior to running rsync. In 1.9.x and previous, sudo was run on the
host that rsync connected to. 2.0.1 restores the 1.9.x behaviour.
- Additionally, several other problems with where synchronize chose to
run when combined with delegate\_to were fixed. In particular, if a
playbook targetted localhost and then delegated\_to a remote host the
prior behavior (in 1.9.x and 2.0.0.x) was to copy files between the
src and destination directories on the delegated host. This has now
been fixed to copy between localhost and the delegated host.
- Fix a regression where synchronize was unable to deal with unicode
paths.
- Fix a regression where synchronize deals with inventory hosts that
use localhost but with an alternate port.
- Fixes a regression where the retry files feature was not implemented.
- Fixes a regression where the any\_errors\_fatal option was
implemented in 2.0 incorrectly, and also adds a feature where
any\_errors\_fatal can be set at the block level.
- Fix tracebacks when playbooks or ansible itself were located in
directories with unicode characters.
- Fix bug when sending unicode characters to an external pager for
display.
- Fix a bug with squashing loops for special modules (mostly package
managers). The optimization was squashing when the loop did not apply
to the selection of packages. This has now been fixed.
- Temp files created when using vault are now "shredded" using the unix
shred program which overwrites the file with random data.
- Some fixes to cloudstack modules for case sensitivity
- Fix non-newstyle modules (non-python modules and old-style modules)
to disabled pipelining.
- Fix fetch module failing even if fail\_on\_missing is set to False
- Fix for cornercase when local connections, sudo, and raw were used
together.
- Fix dnf module to remove dependent packages when state=absent is
specified. This was a feature of the 1.9.x version that was left out
by mistake when the module was rewritten for 2.0.
- Fix bugs with non-english locales in yum, git, and apt modules
- Fix a bug with the dnf module where state=latest could only upgrade,
not install.
- Fix to make implicit fact gathering task correctly inherit settings
from play, this might cause an error if settings environment on play
depending on 'ansible\_env' which was previously ignored
2.0 "Over the Hills and Far Away" - Jan 12, 2016
------------------------------------------------
Major Changes:
~~~~~~~~~~~~~~
- Releases are now named after Led Zeppelin songs, 1.9 will be the last
Van Halen named release.
- The new block/rescue/always directives allow for making task blocks
and exception-like semantics
- New strategy plugins (e.g. ``free``) allow control over the flow of
task execution per play. The default (``linear``) will be the same as
before.
- Improved error handling, with more detailed parser messages. General
exception handling and display has been revamped.
- Task includes are now evaluated during execution, allowing more
dynamic includes and options. Play includes are unchanged both still
use the ``include`` directive.
- "with\_" loops can now be used with task includes since they are
dynamic.
- Callback, connection, cache and lookup plugin APIs have changed.
Existing plugins might require modification to work with the new
versions.
- Callbacks are now shipped in the active directory and don't need to
be copied, just whitelisted in ansible.cfg.
- Many API changes. Those integrating directly with Ansible's API will
encounter breaking changes, but the new API is much easier to use and
test.
- Settings are now more inheritable; what you set at play, block or
role will be automatically inherited by the contained tasks. This
allows for new features to automatically be settable at all levels,
previously we had to manually code this.
- Vars are now settable at play, block, role and task level with the
``vars`` directive and scoped to the tasks contained.
- Template code now retains types for bools and numbers instead of
turning them into strings. If you need the old behaviour, quote the
value and it will get passed around as a string
- Empty variables and variables set to null in yaml will no longer be
converted to empty strings. They will retain the value of ``None``.
To go back to the old behaviour, you can override the
``null_representation`` setting to an empty string in your config
file or by setting the ``ANSIBLE_NULL_REPRESENTATION`` environment
variable.
- Added ``meta: refresh_inventory`` to force rereading the inventory in
a play. This re-executes inventory scripts, but does not force them
to ignore any cache they might use.
- New delegate\_facts directive, a boolean that allows you to apply
facts to the delegated host (true/yes) instead of the
inventory\_hostname (no/false) which is the default and previous
behaviour.
- local connections now work with 'su' as a privilege escalation method
- Ansible 2.0 has deprecated the "ssh" from ansible\_ssh\_user,
ansible\_ssh\_host, and ansible\_ssh\_port to become ansible\_user,
ansible\_host, and ansible\_port.
- New ssh configuration variables (``ansible_ssh_common_args``,
``ansible_ssh_extra_args``) can be used to configure a per-group or
per-host ssh ProxyCommand or set any other ssh options.
``ansible_ssh_extra_args`` is used to set options that are accepted
only by ssh (not sftp or scp, which have their own analogous
settings).
- ansible-pull can now verify the code it runs when using git as a
source repository, using git's code signing and verification
features.
- Backslashes used when specifying parameters in jinja2 expressions in
YAML dicts sometimes needed to be escaped twice. This has been fixed
so that escaping once works. Here's an example of how playbooks need
to be modified:
.. code:: yaml
# Syntax in 1.9.x
- debug:
msg: "{{ 'test1_junk 1\\\\3' | regex_replace('(.*)_junk (.*)', '\\\\1 \\\\2') }}"
# Syntax in 2.0.x
- debug:
msg: "{{ 'test1_junk 1\\3' | regex_replace('(.*)_junk (.*)', '\\1 \\2') }}"
# Output:
"msg": "test1 1\\3"
- When a string with a trailing newline was specified in the playbook
via yaml dict format, the trailing newline was stripped. When
specified in key=value format the trailing newlines were kept. In v2,
both methods of specifying the string will keep the trailing
newlines. If you relied on the trailing newline being stripped you
can change your playbook like this:
.. code:: yaml
# Syntax in 1.9.2
vars:
message: >
Testing
some things
tasks:
- debug:
msg: "{{ message }}"
# Syntax in 2.0.x
vars:
old_message: >
Testing
some things
message: "{{ old_messsage[:-1] }}"
- debug:
msg: "{{ message }}"
# Output
"msg": "Testing some things"
- In 1.9.x, newlines in templates were converted to Unix EOL
conventions. If someone wanted a templated file to end up with
Windows or Mac EOL conventions, this could cause problems for them.
In 2.x newlines now remain as specified in the template file.
- When specifying complex args as a variable, the variable must use the
full jinja2 variable syntax ('{{var\_name}}') - bare variable names
there are no longer accepted. In fact, even specifying args with
variables has been deprecated, and will not be allowed in future
versions:
.. code:: yaml
---
- hosts: localhost
connection: local
gather_facts: false
vars:
my_dirs:
- { path: /tmp/3a, state: directory, mode: 0755 }
- { path: /tmp/3b, state: directory, mode: 0700 }
tasks:
- file:
args: "{{item}}"
with_items: my_dirs
- The bigip\* networking modules have a new parameter, validate\_certs.
When True (the default) the module will validate any hosts it
connects to against the TLS certificates it presents when run on new
enough python versions. If the python version is too old to validate
certificates or you used certificates that cannot be validated
against available CAs you will need to add validate\_certs=no to your
playbook for those tasks.
Plugins
~~~~~~~
- Rewritten dnf module that should be faster and less prone to
encountering bugs in cornercases
- WinRM connection plugin passes all vars named ``ansible_winrm_*`` to
the underlying pywinrm client. This allows, for instance,
``ansible_winrm_server_cert_validation=ignore`` to be used with newer
versions of pywinrm to disable certificate validation on Python
2.7.9+.
- WinRM connection plugin put\_file is significantly faster and no
longer has file size limitations.
Deprecated Modules (new ones in parens):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ec2\_ami\_search (ec2\_ami\_find)
- quantum\_network (os\_network)
- glance\_image
- nova\_compute (os\_server)
- quantum\_floating\_ip (os\_floating\_ip)
- quantum\_router (os\_router)
- quantum\_router\_gateway (os\_router)
- quantum\_router\_interface (os\_router)
New Modules:
^^^^^^^^^^^^
- amazon: ec2\_ami\_copy
- amazon: ec2\_ami\_find
- amazon: ec2\_elb\_facts
- amazon: ec2\_eni
- amazon: ec2\_eni\_facts
- amazon: ec2\_remote\_facts
- amazon: ec2\_vpc\_igw
- amazon: ec2\_vpc\_net
- amazon: ec2\_vpc\_net\_facts
- amazon: ec2\_vpc\_route\_table
- amazon: ec2\_vpc\_route\_table\_facts
- amazon: ec2\_vpc\_subnet
- amazon: ec2\_vpc\_subnet\_facts
- amazon: ec2\_win\_password
- amazon: ecs\_cluster
- amazon: ecs\_task
- amazon: ecs\_taskdefinition
- amazon: elasticache\_subnet\_group\_facts
- amazon: iam
- amazon: iam\_cert
- amazon: iam\_policy
- amazon: route53\_facts
- amazon: route53\_health\_check
- amazon: route53\_zone
- amazon: sts\_assume\_role
- amazon: s3\_bucket
- amazon: s3\_lifecycle
- amazon: s3\_logging
- amazon: sqs\_queue
- amazon: sns\_topic
- amazon: sts\_assume\_role
- apk
- bigip\_gtm\_wide\_ip
- bundler
- centurylink: clc\_aa\_policy
- centurylink: clc\_alert\_policy
- centurylink: clc\_blueprint\_package
- centurylink: clc\_firewall\_policy
- centurylink: clc\_group
- centurylink: clc\_loadbalancer
- centurylink: clc\_modify\_server
- centurylink: clc\_publicip
- centurylink: clc\_server
- centurylink: clc\_server\_snapshot
- circonus\_annotation
- consul
- consul\_acl
- consul\_kv
- consul\_session
- cloudtrail
- cloudstack: cs\_account
- cloudstack: cs\_affinitygroup
- cloudstack: cs\_domain
- cloudstack: cs\_facts
- cloudstack: cs\_firewall
- cloudstack: cs\_iso
- cloudstack: cs\_instance
- cloudstack: cs\_instancegroup
- cloudstack: cs\_ip\_address
- cloudstack: cs\_loadbalancer\_rule
- cloudstack: cs\_loadbalancer\_rule\_member
- cloudstack: cs\_network
- cloudstack: cs\_portforward
- cloudstack: cs\_project
- cloudstack: cs\_sshkeypair
- cloudstack: cs\_securitygroup
- cloudstack: cs\_securitygroup\_rule
- cloudstack: cs\_staticnat
- cloudstack: cs\_template
- cloudstack: cs\_user
- cloudstack: cs\_vmsnapshot
- cronvar
- datadog\_monitor
- deploy\_helper
- docker: docker\_login
- dpkg\_selections
- elasticsearch\_plugin
- expect
- find
- google: gce\_tag
- hall
- ipify\_facts
- iptables
- libvirt: virt\_net
- libvirt: virt\_pool
- maven\_artifact
- openstack: os\_auth
- openstack: os\_client\_config
- openstack: os\_image
- openstack: os\_image\_facts
- openstack: os\_floating\_ip
- openstack: os\_ironic
- openstack: os\_ironic\_node
- openstack: os\_keypair
- openstack: os\_network
- openstack: os\_network\_facts
- openstack: os\_nova\_flavor
- openstack: os\_object
- openstack: os\_port
- openstack: os\_project
- openstack: os\_router
- openstack: os\_security\_group
- openstack: os\_security\_group\_rule
- openstack: os\_server
- openstack: os\_server\_actions
- openstack: os\_server\_facts
- openstack: os\_server\_volume
- openstack: os\_subnet
- openstack: os\_subnet\_facts
- openstack: os\_user
- openstack: os\_user\_group
- openstack: os\_volume
- openvswitch\_db.
- osx\_defaults
- pagerduty\_alert
- pam\_limits
- pear
- profitbricks: profitbricks
- profitbricks: profitbricks\_datacenter
- profitbricks: profitbricks\_nic
- profitbricks: profitbricks\_volume
- profitbricks: profitbricks\_volume\_attachments
- profitbricks: profitbricks\_snapshot
- proxmox: proxmox
- proxmox: proxmox\_template
- puppet
- pushover
- pushbullet
- rax: rax\_clb\_ssl
- rax: rax\_mon\_alarm
- rax: rax\_mon\_check
- rax: rax\_mon\_entity
- rax: rax\_mon\_notification
- rax: rax\_mon\_notification\_plan
- rabbitmq\_binding
- rabbitmq\_exchange
- rabbitmq\_queue
- selinux\_permissive
- sendgrid
- sensu\_check
- sensu\_subscription
- seport
- slackpkg
- solaris\_zone
- taiga\_issue
- vertica\_configuration
- vertica\_facts
- vertica\_role
- vertica\_schema
- vertica\_user
- vmware: vca\_fw
- vmware: vca\_nat
- vmware: vmware\_cluster
- vmware: vmware\_datacenter
- vmware: vmware\_dns\_config
- vmware: vmware\_dvs\_host
- vmware: vmware\_dvs\_portgroup
- vmware: vmware\_dvswitch
- vmware: vmware\_host
- vmware: vmware\_migrate\_vmk
- vmware: vmware\_portgroup
- vmware: vmware\_target\_canonical\_facts
- vmware: vmware\_vm\_facts
- vmware: vmware\_vm\_vss\_dvs\_migrate
- vmware: vmware\_vmkernel
- vmware: vmware\_vmkernel\_ip\_config
- vmware: vmware\_vsan\_cluster
- vmware: vmware\_vswitch
- vmware: vsphere\_copy
- webfaction\_app
- webfaction\_db
- webfaction\_domain
- webfaction\_mailbox
- webfaction\_site
- win\_acl
- win\_dotnet\_ngen
- win\_environment
- win\_firewall\_rule
- win\_iis\_virtualdirectory
- win\_iis\_webapplication
- win\_iis\_webapppool
- win\_iis\_webbinding
- win\_iis\_website
- win\_lineinfile
- win\_nssm
- win\_package
- win\_regedit
- win\_scheduled\_task
- win\_unzip
- win\_updates
- win\_webpicmd
- xenserver\_facts
- zabbix\_host
- zabbix\_hostmacro
- zabbix\_screen
- znode
New Inventory scripts:
^^^^^^^^^^^^^^^^^^^^^^
- cloudstack
- fleetctl
- openvz
- nagios\_ndo
- nsot
- proxmox
- rudder
- serf
New Lookups:
^^^^^^^^^^^^
- credstash
- hashi\_vault
- ini
- shelvefile
New Filters:
^^^^^^^^^^^^
- combine
New Connection:
^^^^^^^^^^^^^^^
- docker: for talking to docker containers on the ansible controller
machine without using ssh.
New Callbacks:
^^^^^^^^^^^^^^
- logentries: plugin to send play data to logentries service
- skippy: same as default but does not display skip messages
Minor changes:
~~~~~~~~~~~~~~
- Many more tests. The new API makes things more testable and we took
advantage of it.
- big\_ip modules now support turning off ssl certificate validation
(use only for self-signed certificates).
- Consolidated code from modules using urllib2 to normalize features,
TLS and SNI support.
- synchronize module's dest\_port parameter now takes precedence over
the ansible\_ssh\_port inventory setting.
- Play output is now dynamically sized to terminal with a minimum of 80
coluumns (old default).
- vars\_prompt and pause are now skipped with a warning if the play is
called noninteractively (i.e. pull from cron).
- Support for OpenBSD's 'doas' privilege escalation method.
- Most vault operations can now be done over multilple files.
- ansible-vault encrypt/decrypt read from stdin if no other input file
is given, and can write to a given ``--output file`` (including
stdout, '-'). This lets you avoid ever writing sensitive plaintext to
disk.
- ansible-vault rekey accepts the --new-vault-password-file option.
- ansible-vault now preserves file permissions on edit and rekey and
defaults to restrictive permissions for other options.
- Configuration items defined as paths (local only) now all support
shell style interpolations.
- Many fixes and new options added to modules, too many to list here.
- Now you can see task file and line number when using verbosity of 3
or above.
- The ``[x-y]`` host range syntax is no longer supported. Note that
``[0:1]`` matches two hosts, i.e. the range is inclusive of its
endpoints.
- We now recommend the use of ``pattern1,pattern2`` to combine host
matching patterns.
- The use of ':' as a separator conflicts with IPv6 addresses and host
ranges. It will be deprecated in the future.
- The undocumented use of ';' as a separator is now deprecated.
- modules and callbacks have been extended to support no\_log to avoid
data disclosure.
- new managed\_syslog option has been added to control output to syslog
on managed machines, no\_log supersedes this settings.
- Lookup, vars and action plugin pathing has been normalized, all now
follow the same sequence to find relative files.
- We do not ignore the explicitly set login user for ssh when it
matches the 'current user' anymore, this allows overriding
.ssh/config when it is set explicitly. Leaving it unset will still
use the same user and respect .ssh/config. This also means
ansible\_ssh\_user can now return a None value.
- environment variables passed to remote shells now default to
'controller' settings, with fallback to en\_US.UTF8 which was the
previous default.
- add\_hosts is much stricter about host name and will prevent invalid
names from being added.
- ansible-pull now defaults to doing shallow checkouts with git, use
``--full`` to return to previous behaviour.
- random cows are more random
- when: now gets the registered var after the first iteration, making
it possible to break out of item loops
- Handling of undefined variables has changed. In most places they will
now raise an error instead of silently injecting an empty string. Use
the default filter if you want to approximate the old behaviour:
::
- debug: msg="The error message was: {{error_code |default('') }}"
- The yum module's detection of installed packages has been made more
robust by using /usr/bin/rpm in cases where it woud have used
repoquery before.
- The pip module now properly reports changes when packages are coming
from a VCS.
- Fixes for retrieving files over https when a CONNECT-only proxy is in
the middle.

View File

@ -0,0 +1,394 @@
=====================================================
Ansible 2.1 "The Song Remains the Same" Release Notes
=====================================================
2.1.6 "The Song Remains the Same" - 06-01-2017
----------------------------------------------
- Security fix for CVE-2017-7481 - data for lookup plugins used as
variables was not being correctly marked as "unsafe".
2.1.5 "The Song Remains the Same" - 03-27-2017
----------------------------------------------
- Security continued fix for CVE-2016-9587 - Handle some additional
corner cases in the way conditionals are parsed and evaluated.
2.1.4 "The Song Remains the Same" - 2017-01-16
----------------------------------------------
- Security fix for CVE-2016-9587 - An attacker with control over a
client system being managed by Ansible and the ability to send facts
back to the Ansible server could use this flaw to execute arbitrary
code on the Ansible server as the user and group Ansible is running
as.
- Fixed a bug with conditionals in loops, where undefined variables and
other errors will defer raising the error until the conditional has
been evaluated.
- Added a version check for jinja2-2.9, which does not fully work with
Ansible currently.
2.1.3 "The Song Remains the Same" - 2016-11-04
----------------------------------------------
- Security fix for CVE-2016-8628 - Command injection by compromised
server via fact variables. In some situations, facts returned by
modules could overwrite connection-based facts or some other special
variables, leading to injected commands running on the Ansible
controller as the user running Ansible (or via escalated
permissions).
- Security fix for CVE-2016-8614 - apt\_key module not properly
validating keys in some situations.
Minor Changes:
~~~~~~~~~~~~~~
- The subversion module from core now marks its password parameter as
no\_log so the password is obscured when logging.
- The postgresql\_lang and postgresql\_ext modules from extras now mark
login\_password as no\_log so the password is obscured when logging.
- Fixed several bugs related to locating files relative to
role/playbook directories.
- Fixed a bug in the way hosts were tested for failed states, resulting
in incorrectly skipped block sessions.
- Fixed a bug in the way our custom JSON encoder is used for the
``to_json*`` filters.
- Fixed some bugs related to the use of non-ascii characters in become
passwords.
- Fixed a bug with Azure modules which may be using the latest rc6
library.
- Backported some docker\_common fixes.
2.1.2 "The Song Remains the Same" - 2016-09-29
----------------------------------------------
Minor Changes
~~~~~~~~~~~~~
- Fixed a bug related to creation of retry files (#17456)
- Fixed a bug in the way include params are used when an include task
is dynamic (#17064)
- Fixed a bug related to including blocks in an include task (#15963)
- Fixed a bug related to the use of hostvars internally when creating
the connection plugin. This prevents things like variables using
lookups from being evaluated unnecessarily (#17024)
- Fixed a bug where using a variable containing a list for the
``hosts`` of a play resulted in an list of lists (#16583)
- Fixed a bug where integer values would cause an error if a module
param was of type ``float`` (no issue)
- Fixed a bug with net\_template failing if src was not specified
(#17726)
- Fixed a bug in "ansible-galaxy import" (#17417)
- Fixed a bug in which INI files incorrectly treated a hosts range as a
section header (#15331)
- Fixed a bug in which the max\_fail\_percentage calculation
erroneously caused a series of plays to stop executing (#15954)
- Fixed a bug in which the task names were not properly templated
(#16295)
- Fixed a bug causing "squashed" loops (ie. yum, apt) to incorrectly
report results (ansible-modules-core#4214)
- Fixed several bugs related to includes:
- when including statically, make sure that all parents were also
included statically (issue #16990)
- properly resolve nested static include paths
- print a message when a file is statically included
- Fixed a bug in which module params expected to be float types were
not converted from integers (only strings) (#17325)
- Fixed a bug introduced by static includes in 2.1, which prevented
notifications from going to the "top level" handler name.
- Fixed a bug where a group\_vars or host\_vars directory in the
current working directory would be used (and would take precedence)
over those in the inventory and/or playbook directory.
- Fixed a bug which could occur when the result of an async task did
not parse as valid JSON.
- (re)-allowed the use of ansible\_python\_interpreter lines with more
than one argument.
- Fixed several bugs related to the creation of the implicit localhost
in inventory.
- Fixed a bug related to an unspecified number of retries when using
until.
- Fixed a race-condition bug when creating temp directories before the
worker process is forked.
- Fix a bug with async's poll keyword not making use of
ansible\_python\_interpreter to run (and thus breaking when
/usr/bin/python is not present on the remote machine.)
- Fix a bug where hosts that started with a range in inventory were
being treated as an invalid section header.
Module fixes: \* Fixed a bug where the temporary CA files created by the
module helper code were not being deleted properly in some situations
(#17073) \* Fixed many bugs in the unarchive module \* Fixes for module
ec2: - Fixed a bug related to source\_dest\_check when used with non-vpc
instances (core#3243) - Fixed a bug in ec2 where instances were not
powering of when referenced via tags only (core#4765) - Fixed a bug
where instances with multiple interfaces were not powering up/down
correctly (core#3234) \* Fixes for module get\_url: - Fixed a bug in
get\_url module to force a download if there is a checksum mismatch
regardless of the last modified time (core#4262) - Fixed a bug in
get\_url module to properly process FTP results (core#3661 and
core#4601) \* Fixed a bug in win\_user related to users with disabled
accounts/expired passwords (core#4369) \* ini\_file: - Fixed a bug where
option lines are now inserted before blank lines. - Fixed a bug where
leading whitespace prevented matches on options. \* Fixed a bug in
iam\_cert when dup\_ok is used as a string. \* Fixed a bug in
postgresql\_db related to the changed logic when state=absent. \* Fixed
a bug where single\_transaction and quick were not passed into db\_dump
for the mysql\_db module. \* Fixed a bug where the fetch module was not
idempotent when retrieving the target of a symlink. \* Many minor fixes
for bugs in extras modules.
Deprecations
~~~~~~~~~~~~
- Deprecated the use of ``_fixup_perms``. Use ``_fixup_perms2``
instead. This change only impacts custom action plugins using
``_fixup_perms``.
Incompatible Changes
~~~~~~~~~~~~~~~~~~~~
- Use of ``_fixup_perms`` with ``recursive=True`` (the default) is no
longer supported. Custom action plugins using ``_fixup_perms`` will
require changes unless they already use ``recursive=False``. Use
``_fixup_perms2`` if support for previous releases is not required.
Otherwise use ``_fixup_perms`` with ``recursive=False``.
2.1 "The Song Remains the Same"
-------------------------------
Major Changes:
~~~~~~~~~~~~~~
- Official support for the networking modules, originally available in
2.0 as a tech preview.
- Refactored and expanded support for Docker with new modules and many
improvements to existing modules, as well as a new Kubernetes module.
- Added new modules for Azure (see below for the full list)
- Added the ability to specify includes as "static" (either through a
configuration option or on a per-include basis). When includes are
static, they are loaded at compile time and cannot contain dynamic
features like loops.
- Added a new strategy ``debug``, which allows per-task debugging of
playbooks, for more details see
https://docs.ansible.com/ansible/playbooks\_debugger.html
- Added a new option for tasks: ``loop_control``. This currently only
supports one option - ``loop_var``, which allows a different loop
variable from ``item`` to be used.
- Added the ability to filter facts returned by the fact gathering
setup step using the ``gather_subset`` option on the play or in the
ansible.cfg configuration file. See
http://docs.ansible.com/ansible/intro\_configuration.html#gathering
for details on the format of the option.
- Added the ability to send per-item callbacks, rather than a batch
update (this more closely resembles the behavior of Ansible 1.x).
- Added facility for modules to send back 'diff' for display when
ansible is called with --diff, updated several modules to return this
info
- Added ansible-console tool, a REPL shell that allows running adhoc
tasks against a chosen inventory (based on
https://github.com/dominis/ansible-shell)
- Added two new variables, which are set when the ``rescue`` portion of
a ``block`` is started:
- ``ansible_failed_task``, which contains the serialized version of the
failed task.
- ``ansible_failed_result``, which contains the result of the failed
task.
- New meta action, ``meta: clear_host_errors`` which will clear any
hosts which were marked as failed (but not unreachable hosts).
- New meta action, ``meta: clear_facts`` which will remove existing
facts for the current host from current memory and facts cache.
- copy module can now transparently use a vaulted file as source, if
vault passwords were provided it will decrypt and copy on the fly.
- The way new-style python modules (which include all of the
non-windows modules shipped with Ansible) are assembled before
execution on the remote machine has been changed. The new way stays
closer to how python imports modules which will make it easier to
write modules which rely heavily on shared code.
- Reduce the situations in which a module can end up as world readable.
For details, see:
https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user
- Re-implemented the retry file feature, which had been left out of 2.0
(fix was backported to 2.0.1 originally).
- Improved winrm argument validation and feature sniffing (for upcoming
pywinrm NTLM support).
- Improved winrm error handling: basic parsing of stderr from CLIXML
stream.
New Modules
^^^^^^^^^^^
- aws
- ec2\_vol\_facts
- ec2\_vpc\_dhcp\_options
- ec2\_vpc\_net\_facts
- ec2\_snapshot\_facts
- azure:
- azure\_rm\_deployment
- azure\_rm\_networkinterface
- azure\_rm\_networkinterface\_facts (TECH PREVIEW)
- azure\_rm\_publicipaddress
- azure\_rm\_publicipaddress\_facts (TECH PREVIEW)
- azure\_rm\_resourcegroup
- azure\_rm\_resourcegroup\_facts (TECH PREVIEW)
- azure\_rm\_securitygroup
- azure\_rm\_securitygroup\_facts (TECH PREVIEW)
- azure\_rm\_storageaccount
- azure\_rm\_storageaccount\_facts (TECH PREVIEW)
- azure\_rm\_storageblob
- azure\_rm\_subnet
- azure\_rm\_virtualmachine
- azure\_rm\_virtualmachineimage\_facts (TECH PREVIEW)
- azure\_rm\_virtualnetwork
- azure\_rm\_virtualnetwork\_facts (TECH PREVIEW)
- cloudflare\_dns
- cloudstack
- cs\_cluster
- cs\_configuration
- cs\_instance\_facts
- cs\_pod
- cs\_resourcelimit
- cs\_volume
- cs\_zone
- cs\_zone\_facts
- clustering
- kubernetes
- cumulus
- cl\_bond
- cl\_bridge
- cl\_img\_install
- cl\_interface
- cl\_interface\_policy
- cl\_license
- cl\_ports
- eos
- eos\_command
- eos\_config
- eos\_eapi
- eos\_template
- gitlab
- gitlab\_group
- gitlab\_project
- gitlab\_user
- ios
- ios\_command
- ios\_config
- ios\_template
- iosxr
- iosxr\_command
- iosxr\_config
- iosxr\_template
- junos
- junos\_command
- junos\_config
- junos\_facts
- junos\_netconf
- junos\_package
- junos\_template
- make
- mongodb\_parameter
- nxos
- nxos\_command
- nxos\_config
- nxos\_facts
- nxos\_feature
- nxos\_interface
- nxos\_ip\_interface
- nxos\_nxapi
- nxos\_ping
- nxos\_switchport
- nxos\_template
- nxos\_vlan
- nxos\_vrf
- nxos\_vrf\_interface
- nxos\_vrrp
- openstack
- os\_flavor\_facts
- os\_group
- os\_ironic\_inspect
- os\_keystone\_domain\_facts
- os\_keystone\_role
- os\_port\_facts
- os\_project\_facts
- os\_user\_facts
- os\_user\_role
- openswitch
- ops\_command
- ops\_config
- ops\_facts
- ops\_template
- softlayer
- sl\_vm
- vmware
- vmware\_maintenancemode
- vmware\_vm\_shell
- windows
- win\_acl\_inheritance
- win\_owner
- win\_reboot
- win\_regmerge
- win\_timezone
- yum\_repository
New Strategies
^^^^^^^^^^^^^^
- debug
New Filters
^^^^^^^^^^^
- extract
- ip4\_hex
- regex\_search
- regex\_findall
New Callbacks
^^^^^^^^^^^^^
- actionable (only shows changed and failed)
- slack
- json
New Tests
^^^^^^^^^
- issubset
- issuperset
New Inventory scripts:
^^^^^^^^^^^^^^^^^^^^^^
- brook
- rackhd
- azure\_rm
Minor Changes:
~~~~~~~~~~~~~~
- Added support for pipelining mode to more connection plugins, which
helps prevent module data from being written to disk.
- Added a new '!unsafe' YAML decorator, which can be used in playbooks
to ensure a string is not templated. For example:
``foo: !unsafe "Don't template {{me}}"``.
- Callbacks now have access to the options with which the CLI was
called
- Debug now has verbosity option to control when to display by matching
number of -v in command line
- Modules now get verbosity, diff and other flags as passed to ansible
- Mount facts now also show 'network mounts' that use the pattern
``<host>:/<mount>``
- Plugins are now sorted before loading. This means, for instance, if
you want two custom callback plugins to run in a certain order you
can name them 10-first-callback.py and 20-second-callback.py.
- Added (alpha) Centirfy's dzdo as another become meethod (privilege
escalation)
Deprecations:
~~~~~~~~~~~~~
- Deprecated the use of "bare" variables in loops (ie.
``with_items: foo``, where ``foo`` is a variable). The full jinja2
variable syntax of ``{{foo}}`` should always be used instead. This
warning will be removed completely in 2.3, after which time it will
be an error.
- play\_hosts magic variable, use ansible\_play\_batch or
ansible\_play\_hosts instead.

View File

@ -0,0 +1,515 @@
==================================================
Ansible 2.2 "The Battle of Evermore" Release Notes
==================================================
2.2.4 "The Battle of Evermore" - TBD
------------------------------------
- avoid vault view writing to logs
- moved htpasswd module to use LooseVersion vs StrictVersion to make
usable on Debian
- fix for adhoc not obeying callback options
2.2.3 "The Battle of Evermore" - 05-09-2017
-------------------------------------------
Major Changes:
~~~~~~~~~~~~~~
- [SECURITY] (HIGH): fix for CVE-2017-7466, which was caused by an
incomplete cherry-picking of commits related to CVE-2016-9587. This
can lead to some jinja2 syntax not being stripped out of templated
results.
- [SECURITY] (MODERATE): fix for CVE-2017-7481, in which data for
lookup plugins used as variables was not being correctly marked as
"unsafe".
Minor Changes:
~~~~~~~~~~~~~~
- Fixes a bug when using YAML inventory where hosts were not put in the
'all' group, and some other 'ungrouped' issues in inventory.
- Fixes a bug when using ansible commands without a tty for stdin.
- Split on newlines when searching for become prompt.
- Fix crash upon pass prompt in py3 when using the paramiko connection
type.
2.2.2 "The Battle of Evermore" - 03-27-2017
-------------------------------------------
Major Changes:
~~~~~~~~~~~~~~
- [SECURITY] (HIGH): (continued fix for CVE-2016-9587) Handle some
additional corner cases in the way conditionals are parsed and
evaluated.
- [SECURITY] (LOW): properly filter passwords out of URLs when
displaying output from some modules.
Minor Changes:
~~~~~~~~~~~~~~
- Fix azure\_rm version checks (#22270).
- Fix for traceback when we encounter non-utf8 characters when using
--diff.
- Ensure ssh hostkey checks respect server port.
- Use proper PyYAML classes for safe loading YAML files.
- Fix for bug related to when statements for older jinja2 versions.
- Fix a bug/traceback when using to\_yaml/to\_nice\_yaml.
- Properly clean data of jinja2-like syntax, even if that data came
from an unsafe source.
- Fix bug regarding undefined entries in HostVars.
- Skip fact gathering if the entire play was included via conditional
which evaluates to False.
- Fixed a performance regression when using a large number of items in
a with loop.
- Fixed a bug in the way the end of role was detected, which in some
cases could cause a role to be run more than once.
- Add jinja2 groupby filter override to cast namedtuple to tuple to
handle a non-compatible change in jinja2 2.9.4-2.9.5.
- Fixed several bugs related to temp directory creation on remote
systems when using shell expansions and become privilege escalation.
- Fixed a bug related to spliting/parsing the output of a become
privilege escalation when looking for a password prompt.
- Several unicode/bytes fixes.
2.2.1 "The Battle of Evermore" - 01-16-2017
-------------------------------------------
Major Changes:
~~~~~~~~~~~~~~
- Security fix for CVE-2016-9587 - An attacker with control over a
client system being managed by Ansible and the ability to send facts
back to the Ansible server could use this flaw to execute arbitrary
code on the Ansible server as the user and group Ansible is running
as.
Minor Changes
~~~~~~~~~~~~~
- Fixes a bug where undefined variables in with\_\* loops would cause a
task failure even if the when condition would cause the task to be
skipped.
- Fixed a bug related to roles where in certain situations a role may
be run more than once despite not allowing duplicates.
- Fixed some additional bugs related to atomic\_move for modules.
- Fixes multiple bugs related to field/attribute inheritance in nested
blocks and includes, as well as task iteration logic during failures.
- Fixed pip installing packages into virtualenvs using the system pip
instead of the virtualenv pip.
- Fixed dnf on systems with dnf-2.0.x (some changes in the API).
- Fixed traceback with dnf install of groups.
- Fixes a bug in which include\_vars was not working with failed\_when.
- Fix for include\_vars only loading files with .yml, .yaml, and .json
extensions. This was only supposed to apply to loading a directory of
vars files.
- Fixes several bugs related to properly incrementing the failed count
in the host statistics.
- Fixes a bug with listening handlers which did not specify a ``name``
field.
- Fixes a bug with the ``play_hosts`` internal variable, so that it
properly reflects the current list of hosts.
- Fixes a bug related to the v2\_playbook\_on\_start callback method
and legacy (v1) plugins.
- Fixes an openssh related process exit race condition, related to the
fact that connections using ControlPersist do not close stderr.
- Improvements and fixes to OpenBSD fact gathering.
- Updated ``make deb`` to use pbuilder. Use ``make local_deb`` for the
previous non-pbuilder build.
- Fixed Windows async to avoid blocking due to handle inheritance.
- Fixed bugs in the mount module on older Linux kernels and \*BSDs
- Fix regression in jinja2 include search path.
- Various minor fixes for Python 3
- Inserted some checks for jinja2-2.9, which can cause some issues with
Ansible currently.
2.2 "The Battle of Evermore" - 11-01-2016
-----------------------------------------
Major Changes:
~~~~~~~~~~~~~~
- Security fix for CVE-2016-8628 - Command injection by compromised
server via fact variables. In some situations, facts returned by
modules could overwrite connection-based facts or some other special
variables, leading to injected commands running on the Ansible
controller as the user running Ansible (or via escalated
permissions).
- Security fix for CVE-2016-8614 - apt\_key module not properly
validating keys in some situations.
- Added the ``listen`` feature for modules. This feature allows tasks
to more easily notify multiple handlers, as well as making it easier
for handlers from decoupled roles to be notified.
- Major performance improvements.
- Added support for binary modules
- Added the ability to specify serial batches as a list
(``serial: [1, 5, 10]``), which allows for so-called "canary" actions
in one play.
- Fixed 'local type' plugins and actions to have a more predictable
relative path. Fixes a regression of 1.9 (PR #16805). Existing users
of 2.x will need to adjust related tasks.
- ``meta`` tasks can now use conditionals.
- ``raw`` now returns ``changed: true`` to be consistent with
shell/command/script modules. Add ``changed_when: false`` to ``raw``
tasks to restore the pre-2.2 behavior if necessary.
- New privilege escalation become method ``ksu``
- Windows ``async:`` support for long-running or background tasks.
- Windows ``environment:`` support for setting module environment vars
in play/task.
- Added a new ``meta`` option: ``end_play``, which can be used to skip
to the end of a play.
- roles can now be included in the middle of a task list via the new
``include_role`` module, this also allows for making the role import
'loopable' and/or conditional.
- The service module has been changed to use system specific modules if
they exist and fall back to the old service module if they cannot be
found or detected.
- Add ability to specify what ssh client binary to use on the
controller. This can be configured via ssh\_executable in the ansible
config file or by setting ansible\_ssh\_executable as an inventory
variable if different ones are needed for different hosts.
- Windows:
- several facts were modified or renamed for consistency with their
Unix counterparts, and many new facts were added. If your playbooks
rely on any of the following keys, please ensure they are using the
correct key names and/or values:
- ansible\_date\_time.date (changed to use yyyy-mm-dd format instead
of default system-locale format)
- ansible\_date\_time.iso8601 (changed to UTC instead of local time)
- ansible\_distribution (now uses OS caption string, e.g.:
"Microsoft Windows Server 2012 R2 Standard", version is still
available on ansible\_distribution\_version)
- ansible\_totalmem (renamed to ansible\_memtotal\_mb, units changed
to MB instead of bytes)
- ``async:`` support for long-running or background tasks.
- ``environment:`` support for setting module environment vars in
play/task.
- Tech Preview: Work has been done to get Ansible running under
Python3. This work is not complete enough to depend upon in
production environments but it is enough to begin testing it.
- Most of the controller side should now work. Users should be able to
run python3 /usr/bin/ansible and python3 /usr/bin/ansible-playbook
and have core features of ansible work.
- A few of the most essential modules have been audited and are known
to work. Others work out of the box.
- We are using unit and integration tests to help us port code and not
regress later. Even if you are not familiar with python you can still
help by contributing integration tests (just ansible roles) that
exercise more of the code to make sure it continues to run on both
Python2 and Python3.
- scp\_if\_ssh now supports True, False and "smart". "smart" is the
default and will retry failed sftp transfers with scp.
- Network:
- Refactored all network modules to remove duplicate code and take
advantage of Ansiballz implementation
- All functionality from \*\_template network modules have been
combined into \*\_config module
- Network \*\_command modules not longer allow configuration mode
statements
New Modules
^^^^^^^^^^^
- apache2\_mod\_proxy
- asa
- asa\_acl
- asa\_command
- asa\_config
- atomic
- atomic\_host
- atomic\_image
- aws
- cloudformation\_facts
- ec2\_asg\_facts
- ec2\_customer\_gateway
- ec2\_lc\_find
- ec2\_vpc\_dhcp\_options\_facts
- ec2\_vpc\_nacl
- ec2\_vpc\_nacl\_facts
- ec2\_vpc\_nat\_gateway
- ec2\_vpc\_peer
- ec2\_vpc\_vgw
- efs
- efs\_facts
- execute\_lambda
- iam\_mfa\_device\_facts
- iam\_server\_certificate\_facts
- kinesis\_stream
- lambda
- lambda\_alias
- lambda\_event
- lambda\_facts
- redshift
- redshift\_subnet\_group
- s3\_website
- sts\_session\_token
- cloudstack
- cs\_router
- cs\_snapshot\_policy
- dellos6
- dellos6\_command
- dellos6\_config
- dellos6\_facts
- dellos9
- dellos9\_command
- dellos9\_config
- dellos9\_facts
- dellos10
- dellos10\_command
- dellos10\_config
- dellos10\_facts
- digital\_ocean\_block\_storage
- docker
- docker\_network
- eos
- eos\_facts
- exoscale:
- exo\_dns\_domain
- exo\_dns\_record
- f5:
- bigip\_device\_dns
- bigip\_device\_ntp
- bigip\_device\_sshd
- bigip\_gtm\_datacenter
- bigip\_gtm\_virtual\_server
- bigip\_irule
- bigip\_routedomain
- bigip\_selfip
- bigip\_ssl\_certificate
- bigip\_sys\_db
- bigip\_vlan
- github
- github\_key
- github\_release
- google
- gcdns\_record
- gcdns\_zone
- gce\_mig
- honeybadger\_deployment
- illumos
- dladm\_etherstub
- dladm\_vnic
- flowadm
- ipadm\_if
- ipadm\_prop
- ipmi
- ipmi\_boot
- ipmi\_power
- ios
- ios\_facts
- iosxr
- iosxr\_facts
- include\_role
- jenkins
- jenkins\_job
- jenkins\_plugin
- kibana\_plugin
- letsencrypt
- logicmonitor
- logicmonitor\_facts
- lxd
- lxd\_profile
- lxd\_container
- netapp
- netapp\_e\_amg
- netapp\_e\_amg\_role
- netapp\_e\_amg\_sync
- netapp\_e\_auth
- netapp\_e\_facts
- netapp\_e\_flashcache
- netapp\_e\_hostgroup
- netapp\_e\_host
- netapp\_e\_lun\_mapping
- netapp\_e\_snapshot\_group
- netapp\_e\_snapshot\_images
- netapp\_e\_snapshot\_volume
- netapp\_e\_storage\_system
- netapp\_e\_storagepool
- netapp\_e\_volume
- netapp\_e\_volume\_copy
- netconf\_config
- netvisor
- pn\_cluster
- pn\_ospfarea
- pn\_ospf
- pn\_show
- pn\_trunk
- pn\_vlag
- pn\_vlan
- pn\_vrouterbgp
- pn\_vrouterif
- pn\_vrouterlbif
- pn\_vrouter
- nxos
- nxos\_aaa\_server\_host
- nxos\_aaa\_server
- nxos\_acl\_interface
- nxos\_acl
- nxos\_bgp\_af
- nxos\_bgp\_neighbor\_af
- nxos\_bgp\_neighbor
- nxos\_bgp
- nxos\_evpn\_global
- nxos\_evpn\_vni
- nxos\_file\_copy
- nxos\_gir\_profile\_management
- nxos\_gir
- nxos\_hsrp
- nxos\_igmp\_interface
- nxos\_igmp
- nxos\_igmp\_snooping
- nxos\_install\_os
- nxos\_interface\_ospf
- nxos\_mtu
- nxos\_ntp\_auth
- nxos\_ntp\_options
- nxos\_ntp
- nxos\_ospf
- nxos\_ospf\_vrf
- nxos\_overlay\_global
- nxos\_pim\_interface
- nxos\_pim
- nxos\_pim\_rp\_address
- nxos\_portchannel
- nxos\_rollback
- nxos\_smu
- nxos\_snapshot
- nxos\_snmp\_community
- nxos\_snmp\_contact
- nxos\_snmp\_host
- nxos\_snmp\_location
- nxos\_snmp\_traps
- nxos\_snmp\_user
- nxos\_static\_route
- nxos\_udld\_interface
- nxos\_udld
- nxos\_vpc\_interface
- nxos\_vpc
- nxos\_vrf\_af
- nxos\_vtp\_domain
- nxos\_vtp\_password
- nxos\_vtp\_version
- nxos\_vxlan\_vtep
- nxos\_vxlan\_vtep\_vni
- mssql\_db
- ovh\_ip\_loadbalancing\_backend
- opendj\_backendprop
- openstack
- os\_keystone\_service
- os\_recordset
- os\_server\_group
- os\_stack
- os\_zone
- ovirt
- ovirt\_auth
- ovirt\_disks
- ovirt\_vms
- rhevm
- rocketchat
- sefcontext
- sensu\_subscription
- smartos
- smartos\_image\_facts
- sros
- sros\_command
- sros\_config
- sros\_rollback
- statusio\_maintenance
- systemd
- telegram
- univention
- udm\_dns\_record
- udm\_dns\_zone
- udm\_group
- udm\_share
- udm\_user
- vmware
- vmware\_guest
- vmware\_local\_user\_manager
- vmware\_vmotion
- vyos
- vyos\_command
- vyos\_config
- vyos\_facts
- wakeonlan
- windows
- win\_command
- win\_robocopy
- win\_shell
New Callbacks
^^^^^^^^^^^^^
- foreman
Minor Changes
~~~~~~~~~~~~~
- now -vvv shows exact path from which 'currently executing module' was
picked up from.
- loop\_control now has a label option to allow fine grained control
what gets displayed per item
- loop\_control now has a pause option to allow pausing for N seconds
between loop iterations of a task.
- New privilege escalation become method ``ksu``
- ``raw`` now returns ``changed: true`` to be consistent with
shell/command/script modules. Add ``changed_when: false`` to ``raw``
tasks to restore the pre-2.2 behavior if necessary.
- removed previously deprecated ';' as host list separator.
- Only check if the default ssh client supports ControlPersist once
instead of once for each host + task combination.
- Fix a problem with the pip module updating the python pip package
itself.
- ansible\_play\_hosts is a new magic variable to provide a list of
hosts in scope for the current play. Unlike play\_hosts it is not
subject to the 'serial' keyword.
- ansible\_play\_batch is a new magic variable meant to substitute the
current play\_hosts.
- The subversion module from core now marks its password parameter as
no\_log so the password is obscured when logging.
- The postgresql\_lang and postgresql\_ext modules from extras now mark
login\_password as no\_log so the password is obscured when logging.
- Fix for yum module incorrectly thinking it succeeded in installing
packages
- Make the default ansible\_managed template string into a static
string since all of the replacable values lead to non-idempotent
behaviour.
For custom front ends using the API:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ansible.parsing.vault:
- VaultLib.is\_encrypted() has been deprecated. It will be removed in
2.4. Use ansible.parsing.vault.is\_encrypted() instead
- VaultFile has been removed. This unfinished code was never used
inside of Ansible. The feature it was intended to support has now
been implemented without using this.
- VaultAES, the older, insecure encrypted format that debuted in
Ansible-1.5 and was replaced by VaultAES256 less than a week later,
now has a deprecation warning. **It will be removed in 2.3**. In the
unlikely event that you wrote a vault file in that 1 week window and
have never modified the file since (ansible-vault automatically
re-encrypts the file using VaultAES256 whenever it is written to but
not read), run ``ansible-vault rekey [filename]`` to move to
VaultAES256.
Removed Deprecated
~~~~~~~~~~~~~~~~~~
- ';' as host list separator.
- with\_ 'bare variable' handling, now loop items must always be
templated ``{{ }}`` or they will be considered as plain strings.
- skipping task on 'missing attribute' in loop variable, now in a loop
an undefined attribute will return an error instead of skipping the
task.
- skipping on undefined variables in loop, now loops will have to
define a variable or use ``|default`` to avoid errors.
Deprecations
~~~~~~~~~~~~
Notice given that the following will be removed in Ansible 2.4: \*
Modules \* eos\_template \* ios\_template \* iosxr\_template \*
junos\_template \* nxos\_template \* ops\_template

View File

@ -0,0 +1,581 @@
=====================================
Ansible 2.3 "Ramble On" Release Notes
=====================================
2.3.4 "Ramble On" - TBD
-----------------------
- Flush stdin when passing the become password. Fixes some cases of
timeout on Python3 with the ssh connection plugin:
https://github.com/ansible/ansible/pull/35049
Bugfixes
~~~~~~~~
- Fix setting of environment in a task that uses a loop:
https://github.com/ansible/ansible/issues/32685
- Fix https retrieval with TLSv1.2:
https://github.com/ansible/ansible/pull/32053
2.3.3 "Ramble On" - TBD
-----------------------
Bugfixes
~~~~~~~~
- Security fix for CVE-2017-7550 the jenkins\_plugin module was logging
the jenkins server password if the url\_password was passed via the
params field: https://github.com/ansible/ansible/pull/30875
- Fix alternatives module handlling of non existing options
- Fix synchronize traceback with the docker connection plugin
- Do not escape backslashes in the template lookup plugin to mirror
what the template module does
- Fix the expires option of the postgresq\_user module
- Fix for win\_acl when settings permissions on registry objects that
use ``ALL APPLICATION PACKAGES`` and
``ALL RESTRICTED APPLICATION PACKAGES``
- Python3 fixes
- asorted azure modules
- pause module
- hacking/env-setup script
- Fix traceback when checking for passwords in logged strings when
logging executed commands.
- docker\_login module
- Workaround python-libselinux API change in the seboolean module
- digital\_ocean\_tag module
- Fix the zip filter
- Fix user module combining bytes and text
- Fix for security groups in the amazon efs module
- Fix for the jail connection plugin not finding the named jail
- Fix for blockinfile's parameters insertbefore and insertafter
- ios\_config: Fix traceback when the efaults parameter is not set
- iosxr\_config: Fixed unicode error when UTF-8 characters are in
configs
- Fix check mode in archive module
- Fix UnboundLocalError in check mode in cs\_role module
- Fix to always use lowercase hostnames for host keys in known\_hosts
module
- Added missing return results for win\_stat
- Fix rabbitmq modules to give a helpful error if requests is not
installed
- Fix yum module not deleting rpms that it downloaded
- Fix yum module failing with a URL to an rpm
- Fix file module inappropriately expanding literal dollar signs in a
path read from the filesystem as an environment variable.
- Fix the ssh "smart" transport setting which automatically selects the
best means of transferring files over ssh (sftp, ssh, piped).
- Fix authentication by api\_key parameter in exoscale modules.
- vmware module\_utils shared code ssl/validate\_certs fixes in
connection logic
- allow 'bridge' facts to work for certain containers that create
conflicting ones with connection plugins
- Fix for win\_get\_url to use TLS 1.2/1.1 if it is available on the
host
- Fix for the filetree lookup with non-ascii group names
- Better message for invalid keywords/options in task due to undefined
expressions
- Fixed check mode for enable on Solaris for service module
- Fix cloudtrail module to allow AWS profiles other than the default
- Fix an encoding issue with secret (password) vars\_prompts
- Fix for Windows become to show the stdout and stderr strings on a
failure
- Fix the issue SSL verification can not be disabled for Tower modules
- Use safe\_load instead on load to read a yaml document
- Fix for win\_file to respect check mode when deleting directories
- Include\_role now complains about invalid arguments
- Added socket conditions to ignore for wait\_for, no need to error for
closing already closed connection
- Updated hostname module to work on newer RHEL7 releases
- Security fix to avoid provider password leaking in logs for network
modules
\* Python3 fixes for azure modules
2.3.2 "Ramble On" - 2017-08-04
------------------------------
Bugfixes
~~~~~~~~
- Fix partend i18n issues
- fixed handling of extra vars for tower\_job\_template (#25272)
- Python3 bugfixes
- Fix sorting of ec2 policies
- Fix digital\_ocean dynamic inventory script
- Fix for the docker connection plugin
- Fix pip module when using python3's pyvenv and python3 -m venv to
create virtualenvs
- Fix for the AnsiBallZ wrapper so that it gives a better error message
when there's not enough disk space to create its tempdir.
- Fix so ansilbe-galaxy install --force with unversioned roles will
once again overwrite old versions.
- Fix for RabbitMQ 3.6.7 endpoint return code changing.
- Fix for Foreman organization creation
- fixed incorrect fail\_json ref in rpm\_key
- Corrected requried on hash\_name for dynamodb\_table
- Fix for fetch action plugin not validating correctly
- Avoid vault view writing display to logs
- htpasswd: fix passlib module version comparison
- Fix for flowdock error message when external\_user\_name is missing
- fixed corner case for delegate\_to, loops and delegate\_facts
- fixed wait\_for python2.4/2.5 compatibility (this is last version
this is needed)
- fix for adhoc not obeying callback options
- fix for win\_find where it fails to recursively scan empty nested
directories
- fix non-pipelined code paths for Windows (eg,
ANSIBLE\_KEEP\_REMOTE\_FILES, non-pipelined connection plugins)
- fix for win\_updates where args and check mode were ignored due to
common code change
- fix for unprivileged users to Windows runas become method
- fix starttls code path for mail module
- fix missing LC\_TYPE in parted module
- fix CN parsing with OpenSSL 1.1 in letsencrypt module
- fix params assignment in jabber module
- fix TXT record type handling in exo\_dns\_record module
- fix message queue message ttl can't be 0 in rabbitmq\_queue module
- CloudStack bugfixes:
- fix template upload for users in cs\_template module, change default
to is\_routing=None
- several fixes in cs\_host module fixes hypervisor handling
- fix network param ignored due typo in cs\_nic module
- fix missing type bool in module cs\_zone
- fix KeyError: 'sshkeypair' in cs\_instance module for CloudStack v4.5
and before
- fix for win\_chocolatey where trying to upgrade all the packages as
per the example docs fails
- fix for win\_chocolatey where it did not fail if the version set did
not exist
- fix for win\_regedit always changing a reg key if the dword values
set is a hex
- fix for wait\_for on non-Linux systems with newer versions of psutil
- fix eos\_banner code and test issues
- run tearup and teardown of EAPI service only on EAPI tests
- fix eos\_config tests so only Eth1 and Eth2 are used
- Fix for potential bug when using legacy inventory vars for
configuring the su password.
- Fix crash in file module when directories contain non-utf8 filenames
- Fix for dnf groupinstall with dnf-2.x
- Fix seboolean module for incompatibility in newer Python3 selinux
bindings
- Optimization for inventory, no need to dedup at every stage, its
redundant and slow
- Fix fact gathering for package and service action plugins
- make random\_choice more error resilient (#27380)
- ensure prefix in plugin loading to avoid conflicts
- fix for a small number of modules (tempfile, possibly copy) which
could fail if the tempdir on the remote box was a symlink
- fix non-pipelined code paths for Windows (eg,
ANSIBLE\_KEEP\_REMOTE\_FILES, non-pipelined connection plugins)
- fix for win\_updates where args and check mode were ignored due to
common code change
2.3.1 "Ramble On" - 2017-06-01
------------------------------
Bugfixes
~~~~~~~~
- Security fix for CVE-2017-7481 - data for lookup plugins used as
variables was not being correctly marked as "unsafe".
- Fix default value of fetch module's validate\_checksum to be True
- Added fix for "meta: refresh\_connection" not working with default
'smart' connection.
- Fix template so that the --diff command line option works when the
destination is a directory
- Fix python3 bugs in pam\_limits
- Fix unbound error when using module deprecation as a single string
- Several places in which error handling was broken due to bad
conversions or just typos
- Fix to user module for appending/setting groups on OpenBSD (flags
were reversed)
- assemble fix to use safer os.join.path, avoids charset issues
- fixed issue with solaris facts and i18n
- added python2.4 compatiblity fix to sysctl module
- Fix comparison of exisiting container security opts in the
docker\_container module
- fixed service module invocation of insserv on certain platforms
- Fix traceback in os\_user in an error case.
- Fix docker container to restart a container when changing to fewer
exposed ports
- Fix tracebacks in docker\_network
- Fixes to detection of updated docker images
- Handle detection of docker image changes when published ports is
changed
- Fix for docker\_container restarting images when links list is empty.
2.3 "Ramble On" - 2017-04-12
----------------------------
Moving to Ansible 2.3 guide
http://docs.ansible.com/ansible/porting\_guide\_2.3.html
Major Changes
~~~~~~~~~~~~~
- Documented and renamed the previously released 'single var vaulting'
feature, allowing user to use vault encryption for single variables
in a normal YAML vars file.
- Allow module\_utils for custom modules to be placed in site-specific
directories and shipped in roles
- On platforms that support it, use more modern system polling API
instead of select in the ssh connection plugin. This removes one
limitation on how many parallel forks are feasible on these systems.
- Windows/WinRM supports (experimental) become method "runas" to run
modules and scripts as a different user, and to transparently access
network resources.
- The WinRM connection plugin now uses pipelining when executing
modules, resulting in significantly faster execution for small tasks.
- The WinRM connection plugin can now manage Kerberos tickets
automatically when ``ansible_winrm_transport=kerberos`` and
``ansible_user``/``ansible_password`` are specified.
- Refactored/standardized most Windows modules, adding check-mode and
diff support where possible.
- Extended Windows module API with parameter-type support, helper
functions. (i.e. Expand-Environment, Add-Warning,
Add-DeprecatationWarning)
- restructured how async works to allow it to apply to action plugins
that choose to support it.
Minor Changes
~~~~~~~~~~~~~
- The version and release facts for OpenBSD hosts were reversed. This
has been changed so that version has the numeric portion and release
has the name of the release.
- removed 'package' from default squash actions as not all package
managers support it and it creates errors when using loops, any user
can add back via config options if they don't use those package
managers or otherwise avoid the errors.
- Blocks can now have a ``name`` field, to aid in playbook readability.
- default strategy is now configurable via ansible.cfg or environment
variable.
- Added 'ansible\_playbook\_python' which contains 'current python
executable', it can be blank in some cases in which Ansible is not
invoked via the standard CLI (sys.executable limitation).
- Added 'metadata' to modules to enable classification
- ansible-doc now displays path to module and existing 'metadata'
- added optional 'piped' transfer method to ssh plugin for when scp and
sftp are missing, ssh plugin is also now 'smarter' when using these
options
- default controlpersist path is now a custom hash of host-port-user to
avoid the socket path length errors for long hostnames
- Various fixes for Python3 compatibility
- Fixed issues with inventory formats not handling 'all' and
'ungrouped' in an uniform way.
- 'service' tasks can now use async again, we had lost this capability
when changed into an action plugin.
- made any\_errors\_fatal inheritable from play to task and all other
objects in between.
- many small performance improvements in inventory and variable
handling and in task execution.
- Added a retry class to the ec2\_asg module since customers were
running into throttling errors (AWSRetry is a solution for modules
using boto3 which isn't applicable here).
Deprecations
~~~~~~~~~~~~
- Specifying --tags (or --skip-tags) multiple times on the command line
currently leads to the last one overriding all the previous ones.
This behaviour is deprecated. In the future, if you specify --tags
multiple times the tags will be merged together. From now on, using
--tags multiple times on one command line will emit a deprecation
warning. Setting the merge\_multiple\_cli\_tags option to True in the
ansible.cfg file will enable the new behaviour. In 2.4, the default
will be to merge and you can enable the old overwriting behaviour via
the config option. In 2.5, multiple --tags options will be merged
with no way to go back to the old behaviour.
- Modules (scheduled for removal in 2.5)
- ec2\_vpc
- cl\_bond
- cl\_bridge
- cl\_img\_install
- cl\_interface
- cl\_interface\_policy
- cl\_license
- cl\_ports
- nxos\_mtu, use nxos\_system instead
New: Callbacks
^^^^^^^^^^^^^^
- dense: minimal stdout output with fallback to default when verbose
New: lookups
^^^^^^^^^^^^
- keyring: allows getting password from the 'controller' system's
keyrings
New: cache
^^^^^^^^^^
- pickle (uses python's own serializer)
- yaml
New: inventory scripts
^^^^^^^^^^^^^^^^^^^^^^
- oVirt/RHV
New: filters
^^^^^^^^^^^^
- combinations
- permutations
- zip
- zip\_longest
Module Notes
~~~~~~~~~~~~
- AWS lambda: previously ignored changes that only affected one
parameter. Existing deployments may have outstanding changes that
this bugfix will apply.
- oVirt/RHV: Added support for 4.1 features and the following:
- data centers, clusters, hosts, storage domains and networks
management.
- hosts and virtual machines affinity groups and labels.
- users, groups and permissions management.
- Improved virtual machines and disks management.
- Mount: Some fixes so bind mounts are not mounted each time the
playbook runs.
New Modules
~~~~~~~~~~~
- a10\_server\_axapi3
- amazon:
- aws\_kms
- cloudfront\_facts
- ec2\_group\_facts
- ec2\_lc\_facts
- ec2\_vpc\_igw\_facts
- ec2\_vpc\_nat\_gateway\_facts
- ec2\_vpc\_vgw\_facts
- ecs\_ecr
- elasticache\_parameter\_group
- elasticache\_snapshot
- iam\_role
- s3\_sync
- archive
- beadm
- bigswitch:
- bigmon\_chain
- bigmon\_policy
- cloudengine:
- ce\_command
- cloudscale\_server
- cloudstack:
- cs\_host
- cs\_nic
- cs\_region
- cs\_role
- cs\_vpc
- dimensiondata\_network
- eos:
- eos\_banner
- eos\_system
- eos\_user
- f5:
- bigip\_gtm\_facts
- bigip\_hostname
- bigip\_snat\_pool
- bigip\_sys\_global
- foreman:
- foreman
- katello
- fortios
- fortios\_config
- gconftool2
- google:
- gce\_eip
- gce\_snapshot
- gcpubsub
- gcpubsub\_facts
- hpilo:
- hpilo\_boot
- hpilo\_facts
- hponcfg
- icinga2\_feature
- illumos:
- dladm\_iptun
- dladm\_linkprop
- dladm\_vlan
- ipadm\_addr
- ipadm\_addrprop
- ipadm\_ifprop
- infinidat:
- infini\_export
- infini\_export\_client
- infini\_fs
- infini\_host
- infini\_pool
- infini\_vol
- ipa:
- ipa\_group
- ipa\_hbacrule
- ipa\_host
- ipa\_hostgroup
- ipa\_role
- ipa\_sudocmd
- ipa\_sudocmdgroup
- ipa\_sudorule
- ipa\_user
- ipinfoio\_facts
- ios:
- ios\_banner
- ios\_system
- ios\_vrf
- iosxr\_system
- iso\_extract
- java\_cert
- jenkins\_script
- ldap:
- ldap\_attr
- ldap\_entry
- logstash\_plugin
- mattermost
- net\_command
- netapp:
- sf\_account\_manager
- sf\_snapshot\_schedule\_manager
- sf\_volume\_manager
- sf\_volume\_access\_group\_manager
- nginx\_status\_facts
- nsupdate
- omapi\_host
- openssl:
- openssl\_privatekey
- openssl\_publickey
- openstack:
- os\_nova\_host\_aggregate
- os\_quota
- openwrt\_init
- ordnance:
- ordnance\_config
- ordnance\_facts
- ovirt:
- ovirt\_affinity\_groups
- ovirt\_affinity\_labels
- ovirt\_affinity\_labels\_facts
- ovirt\_clusters
- ovirt\_clusters\_facts
- ovirt\_datacenters
- ovirt\_datacenters\_facts
- ovirt\_external\_providers
- ovirt\_external\_providers\_facts
- ovirt\_groups
- ovirt\_groups\_facts
- ovirt\_host\_networks
- ovirt\_host\_pm
- ovirt\_hosts
- ovirt\_hosts\_facts
- ovirt\_mac\_pools
- ovirt\_networks
- ovirt\_networks\_facts
- ovirt\_nics
- ovirt\_nics\_facts
- ovirt\_permissions
- ovirt\_permissions\_facts
- ovirt\_quotas
- ovirt\_quotas\_facts
- ovirt\_snapshots
- ovirt\_snapshots\_facts
- ovirt\_storage\_domains
- ovirt\_storage\_domains\_facts
- ovirt\_tags
- ovirt\_tags\_facts
- ovirt\_templates
- ovirt\_templates\_facts
- ovirt\_users
- ovirt\_users\_facts
- ovirt\_vmpools
- ovirt\_vmpools\_facts
- ovirt\_vms\_facts
- pacemaker\_cluster
- packet:
- packet\_device
- packet\_sshkey
- pamd
- panos:
- panos\_address
- panos\_admin
- panos\_admpwd
- panos\_cert\_gen\_ssh
- panos\_check
- panos\_commit
- panos\_dag
- panos\_import
- panos\_interface
- panos\_lic
- panos\_loadcfg
- panos\_mgtconfig
- panos\_nat\_policy
- panos\_pg
- panos\_restart
- panos\_security\_policy
- panos\_service
- postgresql\_schema
- proxmox\_kvm
- proxysql:
- proxysql\_backend\_servers
- proxysql\_global\_variables
- proxysql\_manage\_config
- proxysql\_mysql\_users
- proxysql\_query\_rules
- proxysql\_replication\_hostgroups
- proxysql\_scheduler
- pubnub\_blocks
- pulp\_repo
- runit
- serverless
- set\_stats
- panos:
- panos\_security\_policy
- smartos:
- imgadm
- vmadm
- sorcery
- stacki\_host
- swupd
- tempfile
- tower:
- tower\_credential
- tower\_group
- tower\_host
- tower\_inventory
- tower\_job\_template
- tower\_label
- tower\_organization
- tower\_project
- tower\_role
- tower\_team
- tower\_user
- vmware:
- vmware\_guest\_facts
- vmware\_guest\_snapshot
- web\_infrastructure:
- jenkins\_script
- system
- parted
- windows:
- win\_disk\_image
- win\_dns\_client
- win\_domain
- win\_domain\_controller
- win\_domain\_membership
- win\_find
- win\_msg
- win\_path
- win\_psexec
- win\_reg\_stat
- win\_region
- win\_say
- win\_shortcut
- win\_tempfile
- xbps
- zfs:
- zfs\_facts
- zpool\_facts

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +0,0 @@
Changelogs
==========
As part of the release process a version-specific `CHANGELOG-vX.Y.rst` will be generated from fragments in
the `fragments` directory.
On release branches once a release has been created, consult the branch's version-specific file for changes that have
occurred in that branch. The `devel` branch does not have a generated changelog, only changelog fragments.

View File

@ -1,2 +0,0 @@
ancestor: 2.18.0
releases: {}

View File

@ -1,22 +1,18 @@
---
title: ansible-core
release_tag_re: '(v(?:[\d.ab\-]|rc)+)'
pre_release_tag_re: '(?P<pre_release>(?:[ab]|rc)+\d*)$'
changes_file: changelog.yaml
changes_format: combined
keep_fragments: true
always_refresh: true
ignore_other_fragment_extensions: true
mention_ancestor: false
notesdir: fragments
prelude_section_name: release_summary
new_plugins_after_name: removed_features
sections:
- ['major_changes', 'Major Changes']
- ['minor_changes', 'Minor Changes']
- ['breaking_changes', 'Breaking Changes / Porting Guide']
- ['deprecated_features', 'Deprecated Features']
- ['removed_features', 'Removed Features (previously deprecated)']
- ['security_fixes', 'Security Fixes']
- ['new_lookup_plugins', 'New Lookup Plugins']
- ['new_callback_plugins', 'New Callback Plugins']
- ['new_connection_plugins', 'New Connection Plugins']
- ['new_test_plugins', 'New Test Plugins']
- ['new_filter_plugins', 'New Filter Plugins']
- ['new_modules', 'New Modules']
- ['bugfixes', 'Bugfixes']
- ['known_issues', 'Known Issues']

View File

@ -0,0 +1,2 @@
bugfixes:
- EOS can not check configuration without use of config session (ANSIBLE_EOS_USE_SESSIONS=0). Fix is to throw error when hiting into this exception case. Configs would neither be checked nor be played on the eos device.

View File

@ -0,0 +1,2 @@
bugfixes:
- Adds exception handling which is raised when user does not have correct set of permissions/privileges to read virtual machine facts.

View File

@ -0,0 +1,2 @@
bugfixes:
- onyx_pfc_interface - Add support for changes in pfc output in onyx 3.6.6000 https://github.com/ansible/ansible/pull/37651

View File

@ -0,0 +1,2 @@
bugfixes:
- Fix mlag summary json parsing for onyx version 3.6.6000 and above https://github.com/ansible/ansible/pull/38191

View File

@ -0,0 +1,2 @@
bugfixes:
- Update documentation related to datacenter in vmware_guest_find module. Mark datacenter as optional.

View File

@ -0,0 +1,2 @@
bugfixes:
- Set default network type as 'dhcp' if user has not specified any.

View File

@ -0,0 +1,2 @@
bugfixes:
- Changed hostname variable in order for the esxi host to be found when authentication against a vcenter was done.

View File

@ -0,0 +1,2 @@
bugfixes:
- nmcli change default value of autoconnect

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-inventory - now supports a ``--export`` option to preserve group_var data (https://github.com/ansible/ansible/pull/36188)

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Upgrade to ``coverage`` version 7.9.1 for Python 3.9 and later.

Some files were not shown because too many files have changed in this diff Show More