Commit Graph

36328 Commits (c485c439c7f8f46a2a06e516a311449a0845f986)
 

Author SHA1 Message Date
Toshio Kuratomi 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)
7 years ago
Ganesh Nalawade 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)
7 years ago
Matt Martz 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
7 years ago
Matt Martz 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
7 years ago
Matt Martz 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
7 years ago
Matt Martz 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
7 years ago
John R Barker 3e54803fa4
Modules to link relatively to docs (#39081) (#39086)
* Modules to link relatively to docs

* consistency

(cherry picked from commit 9e028ab704)
7 years ago
Sudheer Satyanarayana 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)
7 years ago
pcahyna 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)
7 years ago
Adam Dobrawy 057ceb724d [file] Update description of state (#38451)
* [file] Update description of state

(cherry picked from commit af9d6aadf0)
7 years ago
Toshio Kuratomi 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)
7 years ago
Alicia Cozine 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)
7 years ago
scottb 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)
7 years ago
Toshio Kuratomi 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)
7 years ago
Brian Coca 0d83a0a888 make aef test more predictable
revert "Disable any_errors_fatal test."
This reverts commit 56189cc312.

fixes #38407

(cherry picked from commit 3c996d0f74)
7 years ago
Sloane Hertel 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
7 years ago
Will Thames 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)
7 years ago
Will Thames 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)
7 years ago
Brian Coca 16f48b539f ensure cli dir exists before saving files to it
(cherry picked from commit 28015d8ae9)
7 years ago
Matt Davis ed473d792b New release v2.5.1 7 years ago
Dag Wieers 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)
7 years ago
Brian Coca 2f64d6fcfb Ensure non ansilbe exceptions keep tracebacks (#37523)
(cherry picked from commit d9430b79f9)
7 years ago
Brian Coca 20430f901e show changed in online
(cherry picked from commit 32cf79c044)
7 years ago
Andrew Gaffney 3362ad16b1 Load plugin config defs on first load only (fixes #37553) (#37584)
(cherry picked from commit 0d0bdbec62)
7 years ago
Jonas Meurer 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)
7 years ago
Brian Coca 5e8aeddc85 remove unused optoins from inventory cli
fixes #31929

(cherry picked from commit 1b9879ccbf)
7 years ago
Toshio Kuratomi 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)
7 years ago
Brian Coca 07bb0407ad documented actual precedence (#38009)
fixes #22025
(cherry picked from commit 5ad13d66aa)
7 years ago
Christian Fetzer 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)
7 years ago
Pilou 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)
7 years ago
Jim Gu 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)
7 years ago
Artem Tiumentcev b37facb234 fix set options in callbacks for foreman
(cherry picked from commit 082b03c829)
7 years ago
Brian Coca 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)
7 years ago
Lutz Reinhardt 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)
7 years ago
Bill Nottingham 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)
7 years ago
Brian Coca 0852ea6dc0 clarify os x password with user module (#38344)
also removed pointer to non existing example

fixes #36427
(cherry picked from commit f630d420c6)
7 years ago
AlanCoding 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)
7 years ago
Brian Coca 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)
7 years ago
Brian Coca 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)
7 years ago
Toshio Kuratomi 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)
7 years ago
Martin Krizek 751ae4f4a9 playbooks_variables.rst: fix facts code-block (#38520)
(cherry picked from commit 5297eac46d)
7 years ago
Brian Coca 145f42eba3 fix displaying group vars in graph
(cherry picked from commit 265d838ec9)
7 years ago
Toshio Kuratomi 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)
7 years ago
Chris Houseknecht 61e3f32f81 Auth method for the k8s lookup plugin now matches other modules (#37533) (#37618) 7 years ago
Trishna Guha 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>
7 years ago
Abhijeet Kasurde 9a7da8d3da
add instanceUuid (also called PersistentId) in vmware utils (#38870)
(cherry picked from commit 0cdba9ff70)
7 years ago
Jordan Borean 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
7 years ago
Jordan Borean 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)
7 years ago
Matt Clay 8606fa0431 Update httptester container reference.
(cherry picked from commit 35748e5228)
7 years ago
scottb 893807bfc9 [WIP] disambiguating autogenerated module docs attempted fix of #38439. (#38890)
Disambiguates autogenerated module docs - fixes #38439.

(cherry picked from commit c97e508806)
7 years ago