Commit Graph

108 Commits (a5a7c7cb8076dd50acf54ff441a8835d2bd3d0f3)

Author SHA1 Message Date
Evan Kaufman cf69ec5db0 replace - fixed combined before and after usage (#31452)
When using before and after in combination, the opposite behavior was induced. This PR makes the the replacement happen between the specified patterns as intended.

* Added integration tests
* Add changelog, porting guide entry, and minor doc fixes
6 years ago
Jordan Borean b98e94df8f
porting guide - move win_dsc changes to proper section (#54372) 6 years ago
Jordan Borean 3044326b4d
win basic - do not warn on case insensitive matches (#54371) 6 years ago
Felix Fontein 752db43b2d Rename return of docker_compose. (#54171) 6 years ago
Jordan Borean 4f2d055e2c
win_psexec - deprecate the extra_opts module options (#53666) 6 years ago
Matthew Butch cd5c64c818 FreeIPA: Fix ipa_user password option (#48453)
Maintain idempotency in ipa_user while user update.
6 years ago
Sloane Hertel 9687879840
Fix inventory cache interface (#50446)
* Replace InventoryFileCacheModule with a better developer-interface

Use new interface for inventory plugins with backwards compatibility

Auto-update the backing cache-plugin if the cache has changed after parsing the inventory plugin

* Update CacheModules to use the config system and add a deprecation warning if they are being imported directly rather than using cache_loader

* Fix foreman inventory caching

* Add tests

* Add integration test to check that fact caching works normally with cache plugins using ansible.constants and inventory caching provides a helpful error for non-compatible cache plugins

* Add some developer documentation for inventory and cache plugins

* Add user documentation for inventory caching

* Add deprecation docs

* Apply suggestions from docs review

* Add changelog
6 years ago
Jordan Borean 6b294eab4d
win_dsc - Add argument validation and other fixes (#53093)
* win_dsc - Add argument validation and other fixes

* Fix doc issues
6 years ago
Felix Fontein 8c628c9b2c Simplify docker_*_facts return names (#51939)
* Simplify docker_*_facts return names.

* Adjust regular return values of modules to match style of docker_*_facts modules.
6 years ago
Chuck Douglas 0e9a79a589 Change the retry_files_enabled to False and modify the comments to reflect that this has been disabled (#52581)
* Change the retry_files_enabled to False and modify the comments to reflect that
this has been disabled.

* Change the default action of retry_files_enabled to False

* Update porting guide to reflect change in default state of retry_files_enabled variable

* Change log documenting a change in default behaviour of retry_files_enabled

* Revert config change to comment out the retry_files_enabled line to let the user decided what is best.
Comment above still states how to change.
6 years ago
Matt Davis 4d3a6123d5
Python interpreter discovery (#50163)
* Python interpreter discovery

* No longer blindly default to only `/usr/bin/python`
* `ansible_python_interpreter` defaults to `auto_legacy`, which will discover the platform Python interpreter on some platforms (but still favor `/usr/bin/python` if present for backward compatibility). Use `auto` to always use the discovered interpreter, append `_silent` to either value to suppress warnings.
* includes new doc utility method `get_versioned_doclink` to generate a major.minor versioned doclink against docs.ansible.com (or some other config-overridden URL)

* docs revisions for python interpreter discovery

(cherry picked from commit 5b53c0012ab7212304c28fdd24cb33fd8ff755c2)

* verify output on some distros, cleanup
6 years ago
Felix Fontein c6ae23062b Deprecate returned facts. (#52518) 6 years ago
Pilou d8a2d64ec1 osx_say callback plugin: add espeak support, rename to say (#33740)
* rename into say

* add support for espeak command

* adds symlink from osx_say to say

* Update version number
6 years ago
Sam Doran f52a088862
Add option to ignore, warn, or error when a module parameter is converted to a string (#51404)
* Add new module property to Windows modules
* Add brief pause to file tests to ensure the stat times are not equal, which was happening sometimes.
* Raise TypeError on error rather than fail_json()
* Rework error message to be less verbose
* Add porting guide entry
6 years ago
Garfield Lee Freeman fb97204291 Deprecating panos modules; pointing to Galaxy role (#52355)
* Deprecating panos modules; pointing to Galaxy role

* Updating porting guide; deprecating panos_set

* Changing 2.11 to 2.12
6 years ago
Martin Krizek be9f07279e Add stats on rescued/ignored tasks (#48418)
* Adding rescued/ignored tasks to stats gathering

Fixes #31245

* Amend integration tests to pass

* callback/dense.py: fix too-many-format-args

* Add changelog

* Amend counter_enabled and unixy callbacks

* Fix syntax error

* Fix typo in the changelog

* Remove not needed comment

* Re-add skipped

* Add test for rescued

* Fix colors...

* Fix unstable tests?

* Add a note to the porting guide

* Re-word the note in the porting guide

Fixes #20346
Fixes #24525
Fixes #14393

Co-authored-by: James Cammarata <jimi@sngx.net>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
6 years ago
Abhijeet Kasurde 57d85031d7
Parse multiple values for single key in cmdline facts (#49591)
* Facts parsing for cmdline can now handle multiple values for a single key.
* Unit tests for cmdline fact parsing
* Review comments

Fixes: #22766

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Hannes Ljungberg 0bf9052e06 docker_swarm_service: Remove defaults (#52420)
* Remove update_parallelism default

* Remove update_delay default

* Add documentation about removing defaults

* Present porting guide changes as a list
6 years ago
Alex Stephen 6ae04017d8 GCE deprecation warning (#52116)
* GCE deprecation warning

* porting guide typo

* fixing ignores

* moving error code back

* underscore marking on gce

* forgot to change status
6 years ago
Jordan Borean 7b8e814a10 Ansible.Basic: make module options case insensitive with dep warning (#51583)
* Ansible.Basic: make module options case insensitive with dep warning

* Add porting guide info
6 years ago
Andrew Gaffney 9c35f18dd6 Custom jinja Undefined class for handling nested undefined attributes (#51768)
This commit creates a custom Jinja2 Undefined class that returns
Undefined for any further accesses, rather than raising an exception
6 years ago
Abhijeet Kasurde fab815fc3b
VMware: Handle duplicate VM names in vmware_vm_facts (#45412)
This fix changes facts returned from vmware_vm_facts to list of dict from
dict of dict.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
James Cassell 953058d025 standardize connection variable names (#51776)
* standardize user/password connection vars

* docs: use ansible_user and ansible_password

* docs: var precedence for connection vars

* docs: ansible_become_pass -> ansible_become_password etc
6 years ago
Hannes Ljungberg b426daa064 docker_swarm_service: Remove root as default user (#51110)
* Remove root as default user

* Add changelog fragment

* Add deprecation documentation

* Tweak user default docs for docker_swarm_service

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Tweak user default deprecation docs

Co-Authored-By: hannseman <hannes@5monkeys.se>
6 years ago
Felix Fontein 4732728e40 Updating #51035: add rename to porting guide. (#51230) 6 years ago
Nathaniel Case 9702893729
Remove deprecated options from modules (#50246)
* Remove deprecated options from modules

* Update tests

* Add porting guide notes
6 years ago
Matt Martz 552cb1f6b9
Add porting guide note about change from 49317 (#49629) 6 years ago
ABond d55479d063 DigitalOcean module deprecation (#47272) 6 years ago
branen 88029a73d6 Correct docsite typos: it's -> its (#50812) 6 years ago
Toshio Kuratomi 40e7c7a210
Add a porting guide entry for ansible_distribution facts (#50251)
* Add a porting guide entry for ansible_distribution facts

Switching away from platform.distro() will cause changes sometimes due
to the new code using new sources of information that may be out of sync
with the old ones.  Just have to make people aware of that and also what
we are doing to mitigate it when appropriate.

* wordsmithed, added links for new distro backend
6 years ago
Toshio Kuratomi afdbb0d9d5 Save the command line arguments into a global context
* Once cli args are parsed, they're constant.  So, save the parsed args
  into the global context for everyone else to use them from now on.
* Port cli scripts to use the CLIARGS in the context
* Refactor call to parse cli args into the run() method
* Fix unittests for changes to the internals of CLI arg parsing
* Port callback plugins to use context.CLIARGS
  * Got rid of the private self._options attribute
  * Use context.CLIARGS in the individual callback plugins instead.
  * Also output positional arguments in default and unixy plugins
  * Code has been simplified since we're now dealing with a dict rather
    than Optparse.Value
6 years ago
Jacob Floyd 069e0b8d57 Make modprobe module check for builtins as well (#37150)
Without this modprobe always reports changed when modprobe-ing a builtin module.

With this, if a kernel module is a builtin, the modprobe module will:
- succeed (without incorrectly reporting changed) if ``state`` is ``present``;
- fail if ``state`` is ``absent``

The failure will have whatever error message modprobe returns when
attempting to remove a builtin module. For example:
``modprobe: ERROR: Module nfs is builtin.``
6 years ago
Dag Wieers 653c3da500 Fix document references in modules (#49892)
* Docs: Fixes internal module reference syntax for seealso
* Updates anchors and links
* Updates seealso in the docs for module **win_chocolatey**.
6 years ago
Pierre-Louis Bonicoli 7e278b23b4 inventory plugin order: update doc
add doc for #44428:
- add changelog fragment
- update porting guide
also:
- update auto inventory plugin doc
- mention toml plugin in examples
6 years ago
Chris St. Pierre 63b7882cbb Deprecate the github_hooks module (#49296)
It was super incomplete, and the interface was pretty strange; it had
built-in features to handle pretty bespoke workflows ("clean504",
e.g.) but was lacking lots of other useful features (like the ability
to create a webhook with a shared secret). Rather than try to update
the interface in a backwards compatible way, I've replaced it with the
more predictable, single-purpose github_webhook and
github_webhook_facts modules.
6 years ago
Toshio Kuratomi bd7322a3f6 Simplify FactCache.update()
We only need FactCache.update() for the backwards compatibility shim as
MutableMapping.update() will do the right thing.
6 years ago
Toshio Kuratomi 33f0c1ce22 FactCache changes
* Fix FactCache to conform to the dict API
  * update needs to take a dict rather than a key and a value
  * __init__ needs to allow for setting the intial dictionary
* Remove unneeded _display and _cache attributes
* Move ansible.plugins.cache.FactCache to
  ansible.vars.fact_cache.FactCache because this isn't part of the cache
  plugin API.
* Add backwards compatibility when calling update on the new FactCache
* Remove code for calling old FactCache. There's no way to call the old
  FactCache so there's no need for backwards compatible code for calling
  code.  Backwards compatibility is handling things which are calling
  the new FactCache.
* Port our code to the new FactCache location.
6 years ago
Chris Archibald 73348ae32d Fixes for na_ontap_cluster_peer (#48329)
* Fixes for na_ontap_cluster_peer, incorporating review comments, version, etc.
6 years ago
Matt Martz 9773a1f289
Add a Singleton metaclass, use it with Display (#48935)
* Add a Singleton class, use it with Display

* update six import

* Move remaining failes to display singleton

* Fix rebase issues

* Singleton improvements

* Add code-smell for 'from __main__ import display'. ci_complete

* s/self/cls/g

* Add docs for no-main-display

* Address linting issues

* Add changelog fragment. ci_complete

* Implement reentrant lock for class instantiation in Singleton

* Add Display singleton porting guide
6 years ago
Felix Fontein 891687284f docker_* modules: improve diff (#48546)
* Add difference tracking tool

* Improve --diff mode for docker_container.

* Improve diffs of sets by ordering the sets.

* Rewrite imports, get rid of HAS_DOCKER_PY_x variables and use docker_version instead.

* Rename container -> active (more generic).

* Add --diff for docker_volume. Change old diff output.

* Add --diff for docker_network. Change old diff output.

* Add --diff for docker_swarm_service.

* Add changelog.

* Add entry for porting guide on docker_network and docker_volume.
6 years ago
Matt Martz 45ff6df1af Remove Deprecated configs 2.8 (#46825)
* Removed deprecated ANSIBLE_HOSTS

* Bump sudo/su configs to match deprecation version for cli and playbook args

* Bump include configs to match deprecation version for 'include'
6 years ago
Christian Kotte 754c377dbd VMware: Improve output of vmware_local_role_facts (#47871) 6 years ago
Jordan Borean 73141d5035 pip: produce better error msg on import error (#47743)
* pip: produce better error msg on import error

* Added porting guide entry for 2.7
6 years ago
Matt Martz abe64775cf Add porting guide note about inline vars on import/include_tasks (#47121)
* Add porting guide note about inline vars. Fixes #47102
6 years ago
Mike Klebolt 5c93068223 incorrect ref (#46492) 6 years ago
Jordan Borean b570af020c added porting guide for PowerShell EAP changes (#46451) 6 years ago
Brian Coca 03d8b68549 added note about cli execution of include_x (#45227) 6 years ago
Jordan Borean 5c73d4f4bd
async: use async_dir for the async results file directory (#45461)
* win async: use async_dir for the async results file directory

* tried to unify POSIX and PowerShell async implementations of async_dir

* fix sanity issue
6 years ago
Eric Helms 74b94e119e Deprecate foreman and katello modules (#42043)
* Deprecate foreman and katello modules in 2.8, remove in 2.12
6 years ago
skylerbunny a892a6ef03 Add undocumented configuration parameter and explain in porting guide (#36059)
* Add undocumented configuration parameter and explain in porting guide
6 years ago