Commit graph

36443 commits

Author SHA1 Message Date
Abhijeet Kasurde
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
Toshio Kuratomi
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
Matt Clay
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
Alicia Cozine
f0761660bb
corrects links to 'list_of' pages (#39161) (#39230) 2018-04-24 12:27:26 -05:00
Loïc Blot
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
Alicia Cozine
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
Jordan Borean
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
Jordan Borean
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
Brian Coca
299861a302 remove slice filter as it already exists in jinja 2018-04-23 18:33:32 -04:00
Matt Martz
ec8bce2051 Add changelog for #38302 2018-04-23 18:01:21 -04:00
Brian Coca
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
Alicia Cozine
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
Alicia Cozine
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
Alicia Cozine
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
Alicia Cozine
628492f8b3 avoids not-in-toc errors with :orphan:
(cherry picked from commit 0fef3f1b48)
2018-04-23 12:15:59 -07:00
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)
2018-04-20 12:48:32 -07:00
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)
2018-04-20 23:49:19 +05:30
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
2018-04-20 12:31:56 -05:00
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
2018-04-20 11:45:28 -05:00
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
2018-04-20 11:42:30 -05:00
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
2018-04-20 11:41:35 -05:00
John R Barker
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
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)
2018-04-19 12:09:54 -07:00
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)
2018-04-19 12:05:14 -07:00
Adam Dobrawy
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
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)
2018-04-19 11:40:48 -07:00
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)
2018-04-19 11:40:05 -07:00
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)
2018-04-19 11:39:14 -07:00
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)
2018-04-19 11:38:14 -07:00
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)
2018-04-19 10:35:23 -07:00
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
2018-04-19 09:28:57 -04:00
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)
2018-04-19 09:25:24 -04:00
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)
2018-04-19 09:24:17 -04:00
Brian Coca
16f48b539f ensure cli dir exists before saving files to it
(cherry picked from commit 28015d8ae9)
2018-04-18 20:53:40 -07:00
Matt Davis
ed473d792b New release v2.5.1 2018-04-18 16:48:39 -07:00
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)
2018-04-18 10:14:02 -07:00
Brian Coca
2f64d6fcfb Ensure non ansilbe exceptions keep tracebacks (#37523)
(cherry picked from commit d9430b79f9)
2018-04-18 10:13:29 -07:00
Brian Coca
20430f901e show changed in online
(cherry picked from commit 32cf79c044)
2018-04-18 10:13:04 -07:00
Andrew Gaffney
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
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)
2018-04-18 10:08:58 -07:00
Brian Coca
5e8aeddc85 remove unused optoins from inventory cli
fixes #31929

(cherry picked from commit 1b9879ccbf)
2018-04-18 10:08:58 -07:00
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)
2018-04-18 10:06:44 -07:00
Brian Coca
07bb0407ad documented actual precedence (#38009)
fixes #22025
(cherry picked from commit 5ad13d66aa)
2018-04-18 10:02:37 -07:00
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)
2018-04-18 10:01:55 -07:00
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)
2018-04-18 10:01:31 -07:00
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)
2018-04-18 10:00:44 -07:00
Artem Tiumentcev
b37facb234 fix set options in callbacks for foreman
(cherry picked from commit 082b03c829)
2018-04-18 10:00:07 -07:00
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)
2018-04-18 09:59:35 -07:00
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)
2018-04-18 09:57:56 -07:00
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)
2018-04-18 09:41:16 -07:00