Commit Graph

1055 Commits (e8948f7655d2a37032821b61dc76951132e8fe10)

Author SHA1 Message Date
Jordan Borean aba6f5f50d
win_acl - fix glob file paths (#53828) 6 years ago
Jordan Borean 4f9de45785
win_tempfile - return absolute path on created temp file (#53827)
* win_tempfile - return absolute path on created temp file

* Fix tests for CI
6 years ago
Sloane Hertel 87ebc56de6 Allow parent groups to be variables or literal (#53649)
* Allow parent groups to be variables or literal, requires {{ }}
* Check strict before failing on templating errors
* Don't add a group if an invalid parent group was provided
6 years ago
Brian Coca e280f2f7b0
Try to get correct buffer size to avoid races (#53547)
* Try to get correct buffer size to avoid races

  fixes #51393

* fix test, mock buffer function since all is mocked
6 years ago
Matteo Ferrando 86405b8fe4 (postgresql_privs) accept 'ALL_IN_SCHEMA' objs for 'function' type (#35331)
* avoid using Postgres formatting function
* add tests for ALL FUNCTIONS IN SCHEMA
* documentation and changelog
* requested changes in tests
* fixed changelog
6 years ago
Felix Fontein fbbab7429e docker_*: report more warnings (#53710)
* More warnings.

* Add changelog.

* Improve docstring.
6 years ago
Felix Fontein 35e7fb776a docker_image: improve usage (#52894)
* Add source option.

* Split force parameter into force_source, force_absent and force_tag.

* Move all build-related options into a suboption called build.

* Add changelog.
6 years ago
Matt Clay f6d12fc918 Fix changelog entries using strings for sections. 6 years ago
Matt Clay 7f0e09aa31
Keep existing to_yaml behavior with pyyaml >= 5.1. (#53772)
In pyyaml versions before 5.1 the default_flow_style for yaml.dump
was None. Starting with 5.1 it is now False. This change explicitly
sets the value to None to maintain the original to_yaml behavior.

The change to pyyaml was made in the following commit:

507a464ce6
6 years ago
Brian Coca 42e6700a71 Undeprecate force handlers (#53705)
* removed deprecation notice, made comment instead

* remove noisy deprecation

* space
6 years ago
David Passante 244a9a83aa cs_iso: fix missing param "is_public" (#53740)
* cs_iso: fix missing param "is_public"

* add changelog fragment
6 years ago
Andrey Klychkov d30879a0b7 postgresql_db - Handle pg_dump return code (#52985)
Handle return code return by pg_dump command

Fixes: #40424
6 years ago
Abhijeet Kasurde f0ef4dae05
iptables: Add support for gateway parameter (#53465)
When user specifies the JUMP value to 'tee', gateway is required.
This fix adds new parameter 'gateway' to support this functionality.

Fixes: #53170

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Felix Fontein c2cb82ec14 ACME: add support for IP identifiers (#53660)
* Adding support for IP identifiers according to https://tools.ietf.org/html/draft-ietf-acme-ip-05.

* Add changelog.

* Make sure that the authorizations return value is unchanged for CSRs with DNS-only SANs.

* Remove unneeded import.

* type -> identifier_type

* Python 2.6 compatibility.

* Fix unit tests.

* Add IP address normalization.

* Extend tests.

* Move data into fixtures.

* Adjust BOTMETA.
6 years ago
Felix Fontein 028facdfed acme_challenge_cert_helper: add support for IP identifiers (#53661)
* Add IP address identifier support to acme_challenge_cert_helper.

* Add changelog.

* type -> identifier_type.
6 years ago
Jason Witkowski acdb4c3ede Fix min_size reference where type is None (#53669) 6 years ago
Jordan Borean 3d23e47c53
win_reboot - Fix rc validation when using psrp and add extra docs (#53711)
* win_reboot - Fix rc validation when using psrp and add extra docs

* Revert boot time command and fix docs
6 years ago
Brian Coca b793f08a92
fixes for stripping (#52930)
function changed to do in place replacement, should be less expensive even with copy as it avoids 'sub copies', can compose with module_args_copy to create replacement for old behavior

  attempt to fix #52910

* handle lists and subdicts correctly
* added  missing exception case, which was not noticed since 'cleaning' was not working
* added comments to clarify exceptions
6 years ago
Brian Coca a8eb25ac14
clear all loader caches with new dir for plugin (#53413)
* clear all loader caches with new dir for plugin

  fixes #17078

* added toggle to revert behaviour
6 years ago
Martin Krizek e0a7f01f0b
Add changelog for #53552 (#53695) 6 years ago
Matt Martz 77217fdd24
Fix checksum file parsing in get_url (#53685)
* Fix checksum file parsing. Fixes #48790

* guard invalid int conversion

Co-Authored-By: sivel <matt@sivel.net>

* Remove extra newline
6 years ago
Brian Coca 3e52a6a693
Overridable safety (#53458)
* create overridable sanitation function
* now used in aws, gce and azure plugins
* added new option to these plugins to work in conjunction with general toggle to make it easier
  to emulate inventory script behavior.
6 years ago
Matt Martz e9f9bcae6a
Don't raise AnsibleConnectionFailure if the ssh process has already died. (#53534)
* Don't raise AnsibleConnectionFailure if the ssh_process has already died. Fixes #53487

* Better support for file not found messages

* Add changelog fragment
6 years ago
Sloane Hertel 4172d68dc3 use composed vars in constructed groups (#53152)
* changelog

* combine provided variables and host vars inside of constructing groups to take into account composed variables

let composed variables "win"

* fix whitespace

* Allow user to control hash behavior
6 years ago
Glandos d784b77cb4 Remove dependency to psycopg2 with dump/restore (#53323)
* Remove dependency to psycopg2 with dump/restore

'dump' and 'restore' state only need pg_dump and pg_restore. These tools
don't use psycopg2 so this change tries to avoid the use of it in these
cases.

The db_exists test was replaced with an error detection when piping to
compression program, using a FIFO file. This effectively reverts #39483,
that was a fix for #39412.

* Fix typo

* Add changelog fragment

* Add note for dump and restore not requiring psycopg2

* Fix YAML syntax

* Update lib/ansible/modules/database/postgresql/postgresql_db.py

Co-Authored-By: Glandos <bugs-github@antipoul.fr>
6 years ago
Felix Fontein 3117900b1e docker_container: show warnings, fix/improve tests (#53440)
* Output warnings from docker daemon on container create and update.

* Accept warning for blkio_weight instead of idempotency.

* Value quoting.

* Avoid loop variable conflict.

* Add changelog.

* Make one test case faster.

* Add 'Docker warning: ' prefix.

* Add a generalized warning reporting function.
6 years ago
Hannes Ljungberg 7bb174214c docker_swarm_service: Add option rollback_config (#53594)
* Add rollback_config

* Add change log fragment

* Fix broken test

* Actually fix broken tests

* Add rollback_config example

* Default rollback_config as None

* Abort early if rollback_config does not exist
6 years ago
Jordan Borean 830a11dd38
test: optimize win_psmodule tests (#53431) 6 years ago
Hannes Ljungberg 57f706e5a0 docker_swarm_service: Extend mount options (#53559)
* Add mount options

* Remove mount readonly default

* Fix driver_config test

* Add documentation

* Add changelog fragment

* Properly indent tmpfs_ options

* Use correct service suffix for mount tests

* Check for None value on tmpfs usage check

* Document change of mounts.readonly return key

* Use correct change log type

* Really use correct change log type

* Revert changing mount.readonly to read_only
6 years ago
Felix Fontein c75da35595 Removing a swarm node does not work with docker-py < 2.4.0, since it calls client.inspect_node(). (#53565)
For the same reason, docker_node requires docker >= 2.4.0.
6 years ago
Matt Clay 2c59d88154 Fix yamllint issue. 6 years ago
Matt Clay 0c4785720d Add extensions to changelog fragments. 6 years ago
Matt Clay 5c866fc17e Move fragment to correct location. 6 years ago
Adam Miller 7b98ff6a31 fix pkg name nevra parsing regex in dnf (#53572) 6 years ago
Jason Witkowski be39e757e3 apply node_id parameter to swarm node removal (#53503) 6 years ago
Matt Martz 414440e323
Allow dict2items to work with hostvars (#53538) 6 years ago
Brian Coca 90bcff3d92
allow nontype configdata (#53365) 6 years ago
Felix Fontein caf7fd2245 openssl_*: improve passphrase handling for private keys in PyOpenSSL (#53489)
* Raise OpenSSLBadPassphraseError if passphrase is wrong.

* Improve handling of passphrase errors.

Current behavior for modules is: if passphrase is wrong (or wrongly specified), fail.
Current behavior for openssl_privatekey is: if passphrase is worng (or wrongly specified), regenerate.

* Add changelog.

* Add tests.

* Adjustments for some versions of PyOpenSSL.

* Update lib/ansible/modules/crypto/openssl_certificate.py

Improve text.

Co-Authored-By: felixfontein <felix@fontein.de>
6 years ago
Bartosz Licheński 6e198487c9 postgresql_privs: Support FOREIGN DATA WRAPPER and FOREIGN SERVER (#38803)
* Support FOREIGN DATA WRAPPER and FOREIGN SERVER in postgresql_privs module
* Added available from note to fdw and fs object types
* Integration tests, examples in documentation
* Complete integration tests
6 years ago
Hannes Ljungberg f5faf8211d docker_swarm_service: Add read_only option (#53482)
* Add read_only option

* Add changelog fragment

* Add version_added

* Fix broken test
6 years ago
Jakob Ackermann 13ab9a61a8 [docker_image] fix the changed state for tagging and pushing (#53451)
* [docker_image] fix the changed state for tagging and pushing

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker_image] add tests for (force) tagging and force pushing

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker_image] add a news fragment for the fixed force tag/push behavior

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
6 years ago
Timo Runge b45b599433 Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#49191) (#53445)
* Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#49191) (#1)

* Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#49191)

* Adding changelog fragment for issue #49191 and the following PR.

* Update lib/ansible/module_utils/mysql.py

Co-Authored-By: timorunge <timorunge@users.noreply.github.com>
6 years ago
S 3bc474bf99 Fixed win_file crash with hidden files (#52584)
* Fixed crash with hidden files

added "-force" parameter on "Get-Item" cmdlet. this is needed to get file info if the file is "hidden" 
without this option modules like win_file, win_template, win_copy crashes on hidden files. this is because with "test-path" it sees that the file exists, but "get-item" can't get the file info. 
for more information on "-force option": https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-item

* Add changelog and integration tests

* fix tests for older Windows versions
6 years ago
Abhijeet Kasurde a5d3647eca
include_vars: include main.yml (#51926)
Enhance the conditional check to include main.yml if it is not
from 'role/vars/'

Fixes: #29135

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
synical f470736476 ipa_dnsrecord: Add SRV and MX record type (#42482)
* Add dnsrecord_show method for supporting base domain record
* Replace dnsrecord_show with conditional in dnsrecord_find
* Added changelog entry for MX and SRV

Signed-off-by: synical <sjohnsondot@gmail.com>
6 years ago
Jordan Borean 8ef2e6da05 Add support for Windows hosts in the SSH connection plugin (#47732)
* Add support for Windows hosts in the SSH connection plugin

* fix Python 2.6 unit test and sanity issues

* fix up connection tests in CI, disable SCP for now

* ensure we don't pollute the existing environment during the test

* Add connection_windows_ssh to classifier

* use test dir for inventory file

* Required powershell as default shell and fix tests

* Remove exlicit become_methods on connection

* clarify console encoding comment

* ignore recent SCP errors in integration tests

* Add cmd shell type and added more tests

* Fix some doc issues

* revises windows faq

* add anchors for windows links

* revises windows setup page

* Update changelogs/fragments/windows-ssh.yaml

Co-Authored-By: jborean93 <jborean93@gmail.com>
6 years ago
Hannes Ljungberg 3d07e7241a docker_swarm_service: Documentation fixes (#53479)
* Document and validate mode choices

* Update examples

* Test cpu float values

* Test correct option

* Fix module return sample

* Add secrets and user to module return value

* Order options alphabetically

* Add changelog

* yaml indentation

* Revert "Order options alphabetically"

This reverts commit 51dabccda7.

* Be consistent with choices type
6 years ago
Jordan Borean 008db85d44
win_domain: fix issue when running without credential delegation (#53480)
* win_domain: fix issue when running without credential delegation

* Add check for reboot is required to complete role e install

* Fix changelog sanity issue

* removed meta file accidentally committed
6 years ago
Jordan Borean 072fa54b50
win reg - Support special chars in path (#53305)
* win reg - Support special chars in path

* Added deprecation warning for path separators
6 years ago
Matt Martz 728970232e
Properly quote the username to support usernames with spaces (#53420) 6 years ago
Felix Fontein b2e992cecd openssl_csr: improve subject validation (#53198)
* Improve subject field validation.

* Add country name idempotency test.

* Add failed country name test.

* Add changelog.
6 years ago
Matt Martz 264d9a9008
Allocate an explicit stdin in async_wrapper (#53410)
* add changelog fragment

* Add stdin async test

* Allocate an explicit stdin in async_wrapper. Fixes #50758
6 years ago
James Cassell e55e8fe2c4 regex_escape: support POSIX basic regex (#50327) 6 years ago
Hannes Ljungberg c563caf451 docker_swarm_service: Set minimum docker-py version to 2.0.2 (#53295)
* Fix version checks in tests

* Set minimum version to 2.0.2

* Networks can only be updated >= docker-py 2.7

* Constraints require docker-py 2.4.0

* Healthchecks require docker-py 2.6.0

* Properly run tests different docker_py_versions

* Add changelog fragment

* Specify lowest version on placement.constraints

* Fix running new tests on older docker-py

* Handle different hosts formats returned by docker

* FIx test naming

* Quote str options

* secrets options require docker-py 2.4.0
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
Brian Coca b94bfed1a6
scan_packages: made adding package managers easier (#49079)
* made adding package managers easier

  added portage support

* moar pkg mgrs and moar info

 - added 'pkg' pkg manager (freebsd)
 - added pip
 - more apt info

* updated clgo

* Updates from feedback

Co-Authored-By: bcoca <bcoca@users.noreply.github.com>

* incorporated more feedback and added docstrings

* moar from feedback

  - made manager list dynamic and names based on class
  - better not found msg
  - made abstract metaclass again
  - test is now init exception
  - module to global
  - better dedupe comments

* more targetted errors/warnings

* added strategy, reordered to conserve priority

* rpm > apt

* move break to top

* fix trate

* piping it

* lines and meta

* refactored common functions

 - moved pip into it's own module
 - cleaned up base clases
 - ensure 'lower' match in package_facts

* missing license

* avoid facts

* update clog

* addressed feedback

* fix clog

* cleanup

* upd

* removed pip as that was removed

* renamed cpan

* added a single line since 2 lines are needed to be

readabnle instead of just 1 line, it is a huge problem otherwise

* fix internal ref

* not intended in this round

* updated as per fb
6 years ago
Brian Coca d241794daa
Add toggle to control invalid character substitution in group names (#52748)
* make add_group return proper name
* ensure central transform/check
* added 'silent' option to avoid spamming current users
  those already using the plugins were used to the transformations, so no need to alert them
* centralized valid var names
* dont display dupes
* comment on regex
* added regex tests
  ini and script will now warn about deprecation
* more complete errormsg
6 years ago
Andrea Tartaglia 5c6b16edc3 Fix ec2_instance eventual consistency when wait: false (#51885)
* Do not return 'instances' when wait is false

* Added integration tests for wait: false

* Added changelog fragment

* Fix test suite to work with ec2_instance

* Additional permissions
* Enforce boto3 version
* Fix broken tests
* Improve error messages

* fix linter issues
6 years ago
Tad Merchant b979b26a74 Add launch type to ecs task (#49081)
* adds fargate launch_type to ecs_task module

* White space changes

* fix documentation for running ecs task on fargate

* remove extraneous example from ecs_task

* White space changes

* Adds changelog fragment

* Pluralize minor_changes in changelog fragment

* Add Stop and Start task permissions
6 years ago
Felix Fontein 61abbfc269 docker_swarm_service: rename return variable to swarm_service (#53229)
* Rename return variable to swarm_service.

* Add changelog.

* Add that old name will stay in Ansible 2.7.x.
6 years ago
Brian Coca 7a0b4a5117
Allow user to control output of verbose messages (#52948)
to stdout (default) or stderr
6 years ago
Brian Coca 949ddb48c0
make debconf compare apples to apples (booleans) (#53331)
hope to fix #25481
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
Brian Coca 853a65eead
made chroot exe configurable (#53147)
* made chroot exe configurable

 fixes #53146

* added default for executable
6 years ago
Hannes Ljungberg 7a130d5446 docker_swarm_service: Add hosts option (#53290)
* Add hosts option

* Add changelog fragment
6 years ago
Alan Rominger 56e3597856 Add keyed_groups feature (#52045)
This implements:
- Allow creating keyed group parents
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
Hannes Ljungberg 139abd0849 docker_swarm_service: Add option groups (#53213)
* Add logging option

* Add limits option

* Add reservations option

* Add restart_config option

* Add update_config option

* Add placement option and remove placement_preferences

* Yaml indentation

* Use correct PR number for change log

* Handle grouper fallbacks better

* Add removed_in_version to argument spec

* Fix broken suboption usage check

* Reduce duplicate deprecated option tests

* Clearer deprecation documentation

* Compare bytes with MiB

* Use correct test service suffix
6 years ago
Felix Fontein 628326b879 openssl_csr: improve invalid SAN error messages (#53201)
* Improve invalid SAN error messages.

* Add changelog.
6 years ago
Felix Fontein 07fcb60d55 Python 2: accept both long and int for type=int (module options) (#53289)
* Added unit test
6 years ago
Viktor Utkin b2a7561a7f [win_get_url] feature: Add support `checksum` to module win_get_url (#51986)
* set valid_until equal to current time + spot_wait_timeout

* Add checksum check for downloaded file.

* refactoring

* fix typo

* add fixes

* mart try,catch handling

* revert lib/ansible/modules/cloud/amazon/ec2.py from upstream

* refactoring

* remove empty lines

* add checksum verification for existing file

* fix current file check

* refactoring destination file check

* add handling exceptions

* refactoring

* Added download file hash data from url

* fix string aligning

* fix bug with uri

* Added get hash from multy-string file

* Added URI support for checksum file location

* refactoing

* Remove any non-alphanumeric characters for hash from url

* fix discussions; add support for PS3

* refactoring

* add size return value

* checkout from upstream for lib/ansible/modules/cloud/amazon/ec2.py

* add Ansible.ModuleUtils.Legacy support; refactoring

* Copyright added

* Checking files size before and after downloading added.

* remove unused code

* Corrected regexp for dotted slashed file name prefix in hash-file

* hotfix typo error; add int tests

* remove legacy module support; split checksum to checksum, checksum_algorithm, checksum_url

* changed default hash algorithm

* Fixed case for ContentLength = -1

* Old comment removed

* fix typo

* Remove file size check before downloading

* add alias to ; fix tests

* adjust tests; fix lint warnings from PSScritpAnalyzer

* workaround for bug in win_chocolatey module on win2008

* remove win_get_url.ps1 from /test/sanity/pslint/ignore.txt

* add checksum_algorithm as retuen value

* first normalise before return Result

* resolve discussions

Signed-off-by: Viktor Utkin <viktor.utkin7@yandex.ru>

* fix discussions
fix http tests as discussed

* fix last discussions

* Reduce code duplication and add idempotency check

* fix sanity issue and remove testing code

* move back to using tmp file for checksum comparison
6 years ago
Abhijeet Kasurde d39f35c1d6
assert: allow list of strings in msg or failed_msg (#50531)
Added check for assert module for msg and failed_msg as a list or string types.

Fixes: #48547

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Jordan Borean b74295d25f
win_chocolatey - add ability to pin a package (#53157)
* win_chocolatey - add ability to pin a package

* fix typoe in changelog fragment
6 years ago
Jordan Borean be7768efc7
win_chocolatey_source - fix state=disabled with no source (#53097) 6 years ago
Jordan Borean ae24bbff4a winrm - try and recover from a send input failure (#53187) 6 years ago
Felix Fontein 6249bb8ea4 openssl_certificate: make sure extensions are present when they are queried by assertonly (#53207)
* Make sure extensions are present when they are queried by assertonly provider.

* Add changelog.
6 years ago
Sloane Hertel 4cf7854ca3
If the private_ip has been provided for the new network interface it shouldn't also be added to top level parameters for run_instances (#52579)
changelog
6 years ago
Martin Krizek 239fb1f68d yum/dnf: Add download_dir param (#53171) 6 years ago
Felix Fontein 8e26c2dfbe docker_swarm: support older docker-py versions (#53129)
* Decreasing docker_swarm requirements.

* Fixing docker-py / docker API version requirements, and some comments.

* Add changelog.

* Only send parameters specified by user to docker daemon.

* Extend labels test: not specifying == keep labels.

* Bump minimally required docker-py version for docker_node and docker_node_facts to 2.4.0.

* Prevent crashing when publish or healthcheck is not provided.

* Similarly to docker_swarm tests, only execute docker_node tests on real VMs and restart docker daemon when tests are done.
6 years ago
Andrea Tartaglia d5d92e4a70 openssl_certificate, fixed has_expired to check the cert expiration date (#53168) 6 years ago
Martin Krizek 66eb301cd3 profile_tasks: Fix last task time with multiple plays (#53065) 6 years ago
Sloane Hertel 8a02f894a6 replace uses of sort_json_policy_dict with compare_policies (#52943)
* replace uses of sort_json_policy_dict with compare_policies which is compatible with Python 3 and remove sort_json_policy_dict from the AWS guidelines since it only works on Python 2

* Sort any lists containing only strings

* Sort the original policy too
6 years ago
Sam Doran 1c87ea6fa6 Reboot - add parameter for paths to search for shutdown command (#51194)
* Look in /lib/molly-guard for shutdown command

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Add parameter for extra_search_paths

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Change option to search_paths

- Update docs
- Make the parameter replace the default values
- Add some sanity checking on the data type

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Correct parameter in tests, change conditional for molly-guard tasks

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Address feedback

* Simplify field validation

Needed the try except in case a non-iterable type is put in the search_paths field
6 years ago
Jiri Tyr 7739b5e96c Last two fields in fstab are optional (fixes #43855) (#43941)
* Last two fields in fstab are optional
* Add changelog
6 years ago
Brian Coca 55dc63be3a
properly convert inputs to handle bytes/unicode (#53072)
* properly convert inputs to handle bytes/unicode

  fixes #52186

* Update changelogs/fragments/nmap_bytes_fix.yml

Co-Authored-By: bcoca <bcoca@users.noreply.github.com>
6 years ago
rwagnergit d2bdbadb03 adding quiet option to assert (ansible#27124) (#52032)
* adding quiet option to assert (ansible#27124)

* adding doc for quiet to assert.py

* fixing PEP8 failure

* improving example

* improving docs

* adding changelog fragment

* adding . at end of descriptions

* removing trailing blank line

* adding integration test for assert

* fixing CI complaints

* disabling gather_facts in quiet.yml test

* rerunning to capture skip

* cleaning up python 2 vs 3

* following rebase

* fixing CI complaints

* fixing CI complaints

* fixing CI complaints

* fixing CI complaints

* fixing CI complaints
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
Andrey Klychkov cf05429b3c postgresql_privs change fail to warn if role(s) does not exist (#52574)
* postgresql_privs change fail to warn if role does not exists

* postgresql_privs change fail to warn if role does not exists: fix sanity

* postgresql_privs change fail to warn if role does not exists: add changelog fragment

* postgresql_privs change fail to warn if role does not exists: fixes

* postgresql_privs change fail to warn if role does not exists: added fail_on_role param
6 years ago
Sam Doran 23a6b88dd2
Modify the correct variable when setting available hashing algorithms (#52994)
* Revert "use list instead of tuple and remove md5 on ValueError (#51357)" c459f040da.
* Modify the correct variable when determining available hashing algorithms
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
Brian Coca cfba6dfe91
Ensure play order is obeyed (#49897)
* Ensure play order is obeyed

 it was being ignored depending on other options
 also added tests for each order (except shuffle) both serial and not
 fixes #49846
6 years ago
Marcos Paulo de Souza fa83a711b6 hostname.py: Fix openSUSE distribution name (#47020)
All openSUSE distributions changed to the way they are returned from distro.id().

This patches fix the openSUSE Leap and SLES distro names, and adds one entry for Tumbleweed.

These descriptions are capitilized, as expected by Ansible's hostname module.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years ago
Sloane Hertel 8fbb2f8b2a
fix no_log indentation so AWS temporary credentials aren't displayed in tests (#53073) 6 years ago
Felix Fontein 76e0e0080b Fix force when state==present. (#53003) 6 years ago
Felix Fontein dec97381bc docker_swarm: fix ca_force_rotate idempotency (#53039)
* Fix ca_force_rotate idempotency.

* Add changelog.
6 years ago
Brandon Bui 1aae196cfa add boto3_tag_list_to_ansible_dict to ec2_vpc_peering_facts.py, and parameter checking to ec2_vpc_peer.py (#52307)
* add boto3_tag_list_to_ansible_dict to ec2_vpc_peering_facts.py

* Add parameter checking to ec2_vpc_peer and give helpful error message

* Fixed modules --> module typo in ec2_vpc_peer

* Added required_if logic and fixed incorrect boolean check for absent peering connection

* Changed error message to one of the following is

* Added changelog fragments for ec2_vpc_peer changes

* Changed changelog fragment as per request
6 years ago
Tad Merchant b538e34a32 Ecs service add features (#50059)
* Support UpdateService forceNewDeployment in ecs_service module

* Fixes for review

* Add force_new_deployment option to ecs_service.py

cherrypicks changes from via/ansible
Adds tests for pull request #42518
fixes backwards compatability with boto<1.8.4

* WIP commit so I don't have to stash

* WIP commit for healthcheck grace period

* WIP commit; ecs_module handles service registries

* Fix bad check for desired_count

* Add scheduling strategy test, comment out service registry test

* Fix names in ecs_cluster role main task.

* move full test run back to the end

* Change botocore version for full test to support scheduling strategy

* fix bug with desired_count==0 in amazon/ecs_service

* Fix changed checking for scheduling strategy DAEMON in ecs_service

* Pass testS

* Fix some unhelpful comments

* Add changelog for ecs_service
6 years ago
Brian Coca 514b974182
Loader invalid plugin nicer error (#52754)
* stop processing invalid plugins
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
Felix Fontein bf3c291606 docker_swarm: add diff support (#52947)
* Add diff support to docker_swarm.

* Add changelog.

* Using diff mode for docker_swarm tests. This improves debugging, since the the module now outputs more information on *why* it did certain actions.
6 years ago
Felix Fontein 42ae6cdb95 docker_swarm: fix idempotency (#52976)
* Improve idempotency checking: only consider parameters which are part of the generated spec.

* Properly handle rotate_worker_token and rotate_manager_token.
6 years ago
Dawson Mortenson 6f585b6ee9 terraform: patch state 'planned' outputs and perform minor refactor (#52004)
* patch state 'planned' outputs and perform minor refactor

* reconcile with pep8 and pylint

* remove a space...

* update changed to only flip when >0 added, changed, or destroyed is detected

* add state dependecy to conditional change check

* fix typo

* reconcile with pep8[E317]

* add a changelog fragment
6 years ago
Jordan Borean d55ddec923
Revert Clear failed state in always only if we did rescue (#52968)
* Revert "Clear failed state in always only if we did rescue (#52829)"

This reverts commit f135960fc2.

* Add tests for failed scenario

* Set failed task with EXPECTED FAILURE
6 years ago
Brian Coca 40a053ce78
better error for bad module options (#52726)
also document clearly inline vaults don't work on 'options'
  fixes #52707
6 years ago
Martin Krizek f135960fc2
Clear failed state in always only if we did rescue (#52829)
Fixes #52561
6 years ago
Felix Fontein a1ec307d43 docker_swarm: make labels work with older docker daemon versions (#52895)
* Make labels work with older docker daemon versions.

* Fix idempotence detection.

* Add changelog.
6 years ago
Mario Lenz bcd6702b8a VMware: Fix KeyError in vmware_host_config_manager (#52736)
* Bug fix for vmware_host_config_manager

* Update changelogs/fragments/44561-vmware_host_config_manager-fix_key_error.yml

Co-Authored-By: mariolenz <m@riolenz.de>
6 years ago
Jordan Borean 1126f76d4d
win_certificate_store - Fix exception handling typo (#52906) 6 years ago
René Moser ee416fd01d
cloudscale: fix compatibilty with older py3 versions (#52822)
* cloudscale: fix compatibilty with older py3 versions

* add doc fragment
6 years ago
Felix Fontein 81d58cfef6 docker_swarm: hopefully fix debug CI problems, and fix check mode (#52825)
* Let's see some debug output.

* Also check LocalNodeState.

* Improve tests.

* Actually implement check mode.

* Add changelog.

* Add pretty-printing and more output.
6 years ago
Sam Doran cc9c72d6f8 Do not add state: absent when a non-existent path is returned (#51350)
Leave it up to the module to return the state in the results.

I went through all the modules in files/ and only found one case where the module needed to return this. No other modules return paths that do not exists.

Signed-off-by: Sam Doran <sdoran@redhat.com>
6 years ago
Kevin Breit d65a91ea7e meraki_config_template - Fix actions when specifying net_id (#51586)
* Allow configuration templates when using net_id...for reals
- Didn't work before, I had bad code. I'm sorry.
- Cleaned up code and simplified functions
- Added integration tests to test for net_id actions

* Add changelog

* Add module name to changelog

* Fix indentation
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
Bramzor 17186bbde0 Added npm ci command (#49665)
* #49664 Added npm ci command

* Update lib/ansible/modules/packaging/language/npm.py

Sure

Co-Authored-By: Bramzor <bramverdonck@telenet.be>

* Moved ci_install so it would work for specific packages

Would this work?

* Reverted last commit

npm ci will remove node_modules so cannot be used it to install a specific module.

* Update lib/ansible/modules/packaging/language/npm.py

Co-Authored-By: Bramzor <bramverdonck@telenet.be>

* Update lib/ansible/modules/packaging/language/npm.py

Co-Authored-By: Bramzor <bramverdonck@telenet.be>

* Update lib/ansible/modules/packaging/language/npm.py

Co-Authored-By: Bramzor <bramverdonck@telenet.be>
6 years ago
Till Maas 0469134f16 rhsm_repository: Properly handle no repos (#51938)
When no repos are defined, the `repo` variable is undefined. Therefore
append it only to the result if a repo was found. Otherwise Ansible will
fail with an UnboundLocalError.
6 years ago
Albert Cervera i Areny e0274adafe Filter DNSimple request by record name. (#49981)
* Filter DNSimple request by record name.

The request was not filtered and DNSimple returns only the first 100
records so if the number of records is larger the check could fail.

This patch fixes the issue and also makes the check to perform better.

* Add changelog fragment.
6 years ago
Tuan Anh Hoang-Vu b0fc2a2103 Fixed lvol ValueError with float size. (#36811)
* Fixed lvol ValueError with float size.

* Fixed lvol ValueError with float size.

* Initialized locale using system default.
Changed size validation from float() to locale.atof().

* Added changelog fragment.
6 years ago
rockandska 540b07b884 Fix idempotence in rabbitmq_plugin (#52166)
* Fix idempotence in rabbitmq_plugin

* Add changelog fragment
6 years ago
arsenicks d3fcdae4ad Katello: Added product to the dict choices (#49776)
* Added product to the dict choices.

Following issue 48594 where product is not a recognised choice: https://github.com/ansible/ansible/issues/48594

* fixed doc

added - product to the doc

* split line 549

to correct ci test splitting line 549

* Create 49776-product_fix_katello_foreman_module.yaml

changelog fragment creation
6 years ago
Abhijeet Kasurde e41b98ffb5
VMware: Refactor guest inventory plugin (#52642)
* VMware: Refactor guest inventory plugin
* Review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
plumbeo e73e9ecbc3 mysql_user: fix malformed regex used to check current privileges (#52278)
* mysql_user: fix malformed regex used to check current privileges

* Add changelog fragment for PR #52278
6 years ago
Jiri Tyr ee14b123f3 Adding changelog fragment for PR #52051 (#52687) 6 years ago
Jiri Tyr 280e8911ce Adding changelog fragment for PR #52086 (#52689) 6 years ago
Hannes Ljungberg dd4b4aa941 docker_swarm_service: Add stop_grace_period option (#52519)
* Add stop_grace_period option

* Add changelog fragment

* Move doc type to last

* Add version_added
6 years ago
Hannes Ljungberg da8574c567 docker_swarm_service: Allow passing period strings on relevant options (#52530)
* Allow duration to be passed as duration strings

* Remove whitespace

* Add changelog fragment

* Fix broken test

* Better error handling
6 years ago
Hannes Ljungberg 7276344f85 docker_swarm_service: Don’t remove service when networks change (#52634)
* Don’t remove service when networks change

* Add changelog fragment

* Some more network integration tests

* Add hannseman as author

* Remove return on self.client.fail
6 years ago
Brian Coca 8a0347ac7a
warn when having issues with local facts (#52507)
* warn when having issues with local facts

fixes 41609
6 years ago
Veaceslav Mindru 6f91bccf78 handle non strings in requirements version for ansible-galaxy (#52109) 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
Jordan Borean 1ec376abca
win_chocolatey - fix beta version parsing (#52601) 6 years ago
Mariusz Mazur 03c4cd757c Add k8s_auth and kubevirt_vm to the k8s group (#52320) 6 years ago
Martin Nečas 8d5811a611 ovirt_network: ovirt fix getting labels (#52499)
* ovirt fix getting labels

* add changelog - ovirt_network_label_fail

* add new line to changelog ovirt_network_label_fail
6 years ago
Hoshiyo 008313b8cc fix(rundeck_acl_policy): compatible python 2 and 3 (#52473)
* fix(rundeck_acl_policy): compatible python 2 and 3

* Add changelog fragment

* Use to_text instead of decode
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
René Moser d99728d9e6
cron: adjust deprecated version (#52531)
* add changelog fragment

* fixed freudian slip in changelog
6 years ago
Kevin Breit 48128ec2fc meraki_ssid - Modifying SSID won't work when specifying number (#51645)
* Fix bug when specifying SSID by number
- Migrated integration test to blocks with always
- Minor URL fixes

(cherry picked from commit ed79c294f2e3f82d4828226004c055dcd7ce9f63)

* Create changelog file

* Add new line
6 years ago
Dominik Holler 4df55bea2f provider_segmentation_id is int (#51600)
According to the OpenStack Networking API
the attribute provider:segmentation_id of a network has to be
an integer.
Even if neutron accepts provider:segmentation_id to be a
string, other implementations may not.
6 years ago
Kevin Breit c254b93796 Meraki performance fixes for net and org lookups (#51395)
* Performance fixes for net and org lookups
- Both methods had duplicate lookups
- This should significantly improve performance
- Currently untested

* Add ChangeLog file

* Change from bugfix to bugfixes and change indent
6 years ago
Brian Coca 5e9b089ec2
Avoid resolving module_paths for docs (#51453)
alternate to #51419
6 years ago
Matt Martz 42cf50fbac Do not send "Connection: close" when requesting a tunnel. Fixes #32750 (#46070) 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
Matt Martz 77bfcad33a
Support unix socket with urls/uri (#43560)
* First pass at allowing unix socket with urls/uri. See #42341

* Only insert handler as needed

* Fix and add tests

* Add HTTPS functionality for unix sockets

* Additional test fixes

* Create context manager for monkey patching HTTPConnection.connect, de-dupe code, raise better errors

* doc

* Add a few more tests

* Fix __call__

* Remove unused import

* Patch HTTPConnection.connect with the functionality we want, instead of duplicating code and disabling

* Fix var name

* Remove unused var

* Add changelog fragment

* Update uri docs

* Fix rebase indentation issue
6 years ago
Matt Clay 687279c7bd Set user expires on FreeBSD using UTC. (#52276) 6 years ago
Hannes Ljungberg c80ad43371 docker_swarm_service: Add working_dir option (#52425)
* Add working_dir option

* Check local mounts var to align with other checks

* Add changelog fragment

* Add trailing comma
6 years ago
Felix Fontein 37b0f5c81b docker: provide alternatives to ansible_facts results (#51192)
* Try to stop using ansible_facts for docker modules.

* Stop using facts returned from regular modules.
6 years ago
Felix Fontein 8222ebd23a docker_image: really deprecate state==build (#52412)
* Really deprecate state==build.

* Also explicitly deprecate use_tls.

* Add changelog.
6 years ago
Hannes Ljungberg 64b12d2c0d docker_swarm_service: Add groups option (#52428)
* Add groups option

* Add changelog fragment

* Remove whitespace

* Remove whitespace
6 years ago
Matt Martz 9f82f3fd14 Alias ansible_model to ansible_product_name for Darwin. Fixes #52233 (#52242) 6 years ago
Hannes Ljungberg 18b968d486 docker_swarm_service: Add healthcheck option (#52419)
* Define yaml versions as strings

* Add healthcheck option

* Add changelog fragment

* Don’t set version_added as strings

* Use single quoted string

* Disable healthcheck tests on python 2.6

* Bring back quoting on already quoted version-added

* Python 2.6 compat

* Move functions to docker-common

* Move parse_healthcheck to docker-common

* Cast exception to str before printing failure

* Extend parse_healthcheck tests
6 years ago
Hannes Ljungberg 77d116f66e docker_swarm_service: Add stop_signal option (#52424)
* Add stop_signal option

* Add changelog fragment
6 years ago
Zim Kalinowski fa73abcf5d
fixing force_update in azure_rm_mysqldatabase (#52389) 6 years ago
Zim Kalinowski 8422e23533
Fixing azure_rm_postgresqldatabase force_update parameter (#52388) 6 years ago
Abhijeet Kasurde fad6443e58
Distribution: Add support for Linux Mint 18.3 (#52224)
* Distribution: Add support for Linux Mint 18.3
* Review comments

Fixes: #52210

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Felix Fontein be3a47e2fe docker_common: improve image finding methods (#44692)
* Work around problem with Docker daemon that sometimes won't find image if prefixed with docker.io repo name.

* When tring library/xxx, docker-py also doesn't sometimes find the image.

* Add changelog.
6 years ago
Martin Krizek 50d7483632
Native Jinja2: raise undefined error immediately (#52237)
Fixes #52158
6 years ago
Timo Runge 47190088b4 module_utils/mysql: Fixing unexpected keyword argument 'cursorclass' error after migratio… (#47809)
* Fixing unexpected keyword argument 'cursorclass' error after migration from MySQLdb to PyMySQL

* Adoptions for mysql.py as suggested by felixfontein.

* Adding changelog fragment.
6 years ago
Zim Kalinowski 2f3960558d
Fix for PostgresSQL server update and storage_mb (#51653) 6 years ago
Zim Kalinowski 1f5cda37b3
Fix for MySQL server update and storage_mb (#51661) 6 years ago
Zim Kalinowski 0c8c72a0bf
Fixing managed disk facts (#51781) 6 years ago
Adam Miller ea0e2bf2b3 yum always return changes dict, not only in check mode (#51987)
Previously the yum module would provide a `changes` dict when
executed in check mode but omit it when not in check mode in favor
of the `results` data which is raw output from the yum command. This
pull request makes that output uniform.

Fixes #51724

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Simon Westphahl 02e87b7d70 Raise AnsibleConnectionError on winrm connnection errors (#51744)
* Raise AnsibleConnectionError on winrm con errors

Currently all uncaught exceptions of the requests library that is used
in winrm will lead to an "Unexpected failure during module execution".

Instead of letting all exceptions bubble up we catch the connection
related errors (inkl. timeouts) and re-raise them as
AnsibleConnectionError so Ansible will mark the host as unreachable and
exit with the correct return code.

This is especially important for Zuul (https://zuul-ci.org) to
distinguish between failures and connection/host related errors.

* Update lib/ansible/plugins/connection/winrm.py

Co-Authored-By: westphahl <westphahl@gmail.com>

* Add changelog fragment
6 years ago
Kevin c512471428 Add two more failure conditions to unarchive (#51914) 6 years ago
Matt Martz b34d141eed
Disallow use of remote home directories containing .. in their path (CVE-2019-3828) (#52133)
* Disallow use of remote home directories containing .. in their path

* Add CVE to changelog
6 years ago
Juan Antonio Osorio 9f081ca04f identity: Add GSSAPI suport for FreeIPA authentication (#52031)
* identity: Add GSSAPI suport for FreeIPA authentication

This enables the usage of GSSAPI for authentication, instead of having
to pass the username and password as part of the playbook run.

If there is GSSAPI support, this makes the password optional, and will
be able to use the KRB5_CLIENT_KTNAME or the KRB5CCNAME environment
variables; which are standard when using kerberos authentication.

Note that this depends on the urllib_gssapi library, and will only
enable this if that library is available.

* identity: Add documentation for GSSAPI authentication for FreeIPA

This documentation describes how to use GSSAPI authentication with the
IPA identity modules.

* identity: Add changelog for GSSAPI support for IPA

This adds the changelog entry for the GSSAPI authentication feature for
the IPA identity module.
6 years ago
Alan Rominger af9ff07c74 Send openstack inventory logs to stderr (#51827) 6 years ago
Will Thames 46fbcf08bc
aws_kms enhancements (#31960)
* Allow creation and deletion of keys (deletion just schedules for
  deletion, recreating an old key is just cancelling its deletion)
* Allow grants to be set, thus enabling encryption contexts to be
  used with keys
* Allow tags to be added and modified
* Add testing for KMS module
* Tidy up aws_kms module to latest standards
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
hansmi 76ab88c9f5 callbacks/slack: Explicitly set Content-Type header (#51824)
There are other chat systems with hook implementations more or less
compatible with Slack, such as Rocket.Chat. The latter requires the
Content-Type header to be set to "application/json" (the body is JSON).

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
6 years ago
Abhijeet Kasurde 5c992fcc3f
ansible-vault: handle utf-8 filename in vault (#50341)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Hannes Ljungberg 70d8f02db7 docker_swarm_service: Extend env and add env_files support (#51762)
* Extend env and add env_files support

* Python 2.6 compat

* Handle lists passed as string

* Add changelog fragment

* Use correct link formatting

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

* Fix typo

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

* Handle empty env and env_files values
6 years ago
Felix Fontein 09f78d2f6c ufw: allow to insert rules relative to first/last IPv4/IPv6 rules (#49796)
* Insert should have type int.

* Add insert_relative_to option.

* Add changelog.

* Add tests.

* Improve comment.
6 years ago
Jordan Borean 179cbb9891
win_dsc - return warning from DSC invocation (#51927) 6 years ago
Matt Martz 445ff39f94
Become plugins (#50991)
* [WIP] become plugins

Move from hardcoded method to plugins for ease of use, expansion and overrides
  - load into connection as it is going to be the main consumer
  - play_context will also use to keep backwards compat API
  - ensure shell is used to construct commands when needed
  - migrate settings remove from base config in favor of plugin specific configs
  - cleanup ansible-doc
  - add become plugin docs
  - remove deprecated sudo/su code and keywords
  - adjust become options for cli
  - set plugin options from context
  - ensure config defs are avaialbe before instance
  - refactored getting the shell plugin, fixed tests
     - changed into regex as they were string matching, which does not work with random string generation
     - explicitly set flags for play context tests
 - moved plugin loading up front
 - now loads for basedir also
 - allow pyc/o for non m modules
 - fixes to tests and some plugins
 - migrate to play objects fro play_context
 - simiplify gathering
 -  added utf8 headers
 - moved option setting
 - add fail msg to dzdo
 - use tuple for multiple options on fail/missing
 - fix relative plugin paths
 - shift from play context to play
 - all tasks already inherit this from play directly
 - remove obsolete 'set play'
 - correct environment handling
 - add wrap_exe option to pfexec
 - fix runas to noop
 - fixed setting play context
 - added password configs
 - removed required false
 - remove from doc building till they are ready

future development:
  - deal with 'enable' and 'runas' which are not 'command wrappers' but 'state flags' and currently hardcoded in diff subsystems

* cleanup

  remove callers to removed func
  removed --sudo cli doc refs
  remove runas become_exe
  ensure keyerorr on plugin
  also fix backwards compat, missing method is attributeerror, not ansible error
  get remote_user consistently
  ignore missing system_tmpdirs on plugin load
  correct config precedence
  add deprecation
  fix networking imports
  backwards compat for plugins using BECOME_METHODS

* Port become_plugins to context.CLIARGS

This is a work in progress:
* Stop passing options around everywhere as we can use context.CLIARGS
  instead

* Refactor make_become_commands as asked for by alikins

* Typo in comment fix

* Stop loading values from the cli in more than one place

Both play and play_context were saving default values from the cli
arguments directly.  This changes things so that the default values are
loaded into the play and then play_context takes them from there.

* Rename BECOME_PLUGIN_PATH to DEFAULT_BECOME_PLUGIN_PATH

As alikins said, all other plugin paths are named
DEFAULT_plugintype_PLUGIN_PATH.  If we're going to rename these, that
should be done all at one time rather than piecemeal.

* One to throw away

This is a set of hacks to get setting FieldAttribute defaults to command
line args to work.  It's not fully done yet.

After talking it over with sivel and jimi-c this should be done by
fixing FieldAttributeBase and _get_parent_attribute() calls to do the
right thing when there is a non-None default.

What we want to be able to do ideally is something like this:

class Base(FieldAttributeBase):
    _check_mode = FieldAttribute([..] default=lambda: context.CLIARGS['check'])

class Play(Base):
    # lambda so that we have a chance to parse the command line args
    # before we get here.  In the future we might be able to restructure
    # this so that the cli parsing code runs before these classes are
    # defined.

class Task(Base):
    pass

And still have a playbook like this function:

---
- hosts:
  tasks:
  - command: whoami
    check_mode: True

(The check_mode test that is added as a separate commit in this PR will
let you test variations on this case).

There's a few separate reasons that the code doesn't let us do this or
a non-ugly workaround for this as written right now.  The fix that
jimi-c, sivel, and I talked about may let us do this or it may still
require a workaround (but less ugly) (having one class that has the
FieldAttributes with default values and one class that inherits from
that but just overrides the FieldAttributes which now have defaults)

* Revert "One to throw away"

This reverts commit 23aa883cbed11429ef1be2a2d0ed18f83a3b8064.

* Set FieldAttr defaults directly from CLIARGS

* Remove dead code

* Move timeout directly to PlayContext, it's never needed on Play

* just for backwards compat, add a static version of BECOME_METHODS to constants

* Make the become attr on the connection public, since it's used outside of the connection

* Logic fix

* Nuke connection testing if it supports specific become methods

* Remove unused vars

* Address rebase issues

* Fix path encoding issue

* Remove unused import

* Various cleanups

* Restore network_cli check in _low_level_execute_command

* type improvements for cliargs_deferred_get and swap shallowcopy to default to False

* minor cleanups

* Allow the su plugin to work, since it doesn't define a prompt the same way

* Fix up ksu become plugin

* Only set prompt if build_become_command was called

* Add helper to assist connection plugins in knowing they need to wait for a prompt

* Fix tests and code expectations

* Doc updates

* Various additional minor cleanups

* Make doas functional

* Don't change connection signature, load become plugin from TaskExecutor

* Remove unused imports

* Add comment about setting the become plugin on the playcontext

* Fix up tests for recent changes

* Support 'Password:' natively for the doas plugin

* Make default prompts raw

* wording cleanups. ci_complete

* Remove unrelated changes

* Address spelling mistake

* Restore removed test, and udpate to use new functionality

* Add changelog fragment

* Don't hard fail in set_attributes_from_cli on missing CLI keys

* Remove unrelated change to loader

* Remove internal deprecated FieldAttributes now

* Emit deprecation warnings now
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
Matt Martz 3c85ac1788
Promote include_tasks/role and import_tasks/role to stableinterface (#51975) 6 years ago
Felix Fontein 4d3d8dd60f ufw: check values for direction depending on situation (#50402)
* Check values of 'direction'.

* Add changelog.

* Update lib/ansible/modules/system/ufw.py

Co-Authored-By: felixfontein <felix@fontein.de>

* Update lib/ansible/modules/system/ufw.py
6 years ago
Felix Fontein a279892fae ufw: allow gre and igmp protocols (#51166)
* ufw: allow gre and igmp protocols.

* Add changelog.
6 years ago
Jérôme BAROTIN b99de25f32 Enable changed var with ufw check mode (#49948)
* Enable 'changed' var with ufw check mode

* Fix from comment of the PR + Unit Test

* Fix on ufw module after the second review

- delete rules change works in check mode
- simplify execute def & use it on every call process
- improved regexp
- rename vars defaults to current_default_values

* Add ignore error to execute() and use it in get_current_rules()

* Update after third code review (introduce change in changed status)

* Adjust tests and fix some problems (#1)

* 'active' also appears in 'inactive'.

* 'reject' is also a valid option here.

* For example for reloaded, changed will be set back to False here.

* Improve and adjust tests.

* Fix after merging integration test

* handle "disabled" on default routed

* Add /var/lib/ufw/.. rules files

* add unit test

* Fix pep8 formatting error

* Separate ipv6 and ipv4 rules process from checkmode

* fix non-ascii error on ci

* Some change after review

* Add unit test with sub network mask

* rename is_match function by is_starting

* add changelog fragment
6 years ago
Felix Fontein 9b1cbcf3a4 openssl_csr: ignore empty strings in altnames (#51473)
* Ignore empty strings in altnames.

* Add changelog.

* Add idempotence check without SAN.

* Fix bug in cryptography backend.
6 years ago
Adam Miller 2721ed260e Properly handle unauthenticated yum proxy config (#51915)
Fixes #51548

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Jeremiah Mahler ffbc9d99de fix Amazon system-release version parsing (#51521)
Previously it was assumed that the Amazon system-release
number was the final value of the string.  This isn't always
the case.  Some releases have the name at the end.

  Amazon Linux release 2
  Amazon Linux release 2 (Karoo)

Fix by instead looking for a number in the string.

Fixes #48823
6 years ago
Adam Miller 9bb05b72b2 correctly detect pkg_mgr on fedora/rhel/centos rpm-ostree installed (#49256)
Check the path /run/ostree-booted which I'm told by upstream that it
will always be present when a host system is Fedora/RHEL/CentOS
Atomic/CoreOS vs "traditional" distro instance to detect the
non-traditional instance and ensure pkg_mgr selection is correct

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Mike Sgarbossa c459f040da use list instead of tuple and remove md5 on ValueError (#51357)
* use list instead of tuple and remove md5 on ValueError

Signed-off-by: michael.sgarbossa <msgarbossa@cvs.com>

* convert algorithms to list and add comment

Signed-off-by: michael.sgarbossa <msgarbossa@cvs.com>

* only convert to list if algorithms is not None

Signed-off-by: michael.sgarbossa <msgarbossa@cvs.com>

* new fragment for PR 51357

Signed-off-by: michael.sgarbossa <msgarbossa@cvs.com>

* fix lint: remove blank line
6 years ago
Viktor Utkin d40f0313e2 spot instance request stay opened when module exit with timeout (#51535)
Fixes: #51534

* set valid_until equal to current time + spot_wait_timeout
* add setting ValidUntil to  value
* add changelog fragment
* fix shebang issue
6 years ago
plumbeo 4d93c440b9 mysql_user: Match both single quotes and backticks when checking curr… (#40092)
* mysql_user: Match quotes, double quotes and backticks when checking current privileges

* Add changelog fragment for PR #40092
6 years ago
Felix Fontein c9b08db979 acme_challenge_cert_helper: fix bad module.fail_json() call (#51795)
* Fix bad module.fail_json() call.

* Add changelog.
6 years ago
Jordan Borean 146a89b612
psrp - do not display bootstrap wrapper for eachach task (#51779) 6 years ago
Martin Krizek 33b07f322c
yum: disableexcludes is supported on centos6 (#51698)
* yum: disableexcludes is supported on centos6

* Add changelog
6 years ago
Hannes Ljungberg 4a5d38b55a docker_swarm_service: Enable tests (#51170)
* Enable tests

* Comment fixes

* Try lowering timeouts

* Comment fix

* Comment fix

* Comment fix

* Add a pause to let service update

* Fix comment

* Disable dns_search tests

* Disable dns_servers test

* Fix comment

* Fix comment

* Fix comment

* Fix comment

* Fix comment

* Fix comment

* Fix comment

* Revert "Disable dns_servers test"

This reverts commit 763e9da716b78f4986f313b3ba1ab98faacb742e.

* Revert "Disable dns_search tests"

This reverts commit 2859e4e3a5ebdca078de84d821bb53bbdf967dfd.

* Revert "Add a pause to let service update"

This reverts commit e990dfae1a62e9a42b07960819818bc75fd04427.

* Revert "Try lowering timeouts"

This reverts commit 1617772de81ecef0e560b38c7564646ec3874c3c.

* Ensure that services are running while testing

* Retry tasks on update out of sequence error

* Remove unnecessary check for APIError.explanation

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

* Ignore errors when tearing down test suite

* Retry with a loop instead of tail recursion

* Initialize self.diff_trace in run

* Add change log fragment

* Actually raise error

* Add unit test for retrying

* Lint

* Change to bugfix

* Remove whitespace

* Mock docker dependency

* Use download.fedoraproject.org

* Revert "Use download.fedoraproject.org"

This reverts commit 5931791f7c.
6 years ago
Pilou 7a3582d651 uri: check unexpected failure doesn't occur when file cannot be saved (#45824)
* uri: fix TypeError when file can't be saved

Fix the following exception (and others):

    Traceback (most recent call last):
      File "/home/lilou/debug_dir/__main__.py", line 604, in <module>
        main()
      File "/home/lilou/debug_dir/__main__.py", line 554, in main
        write_file(module, url, dest, content, resp)
      File "/home/lilou/debug_dir/__main__.py", line 320, in write_file
        module.fail_json(msg="Destination dir '%s' not writable" % os.path.dirname(dest), **resp)
    TypeError: fail_json() got multiple values for keyword argument 'msg'

I would rather remove **resp from returned values but this module is
flagged as stableinterface.

* Static imports are more straight forward and preferred unless dynamic inclusion is required.
6 years ago
Felix Fontein 89a1c68f98 docker_volume: improve force option (deprecate, add new option) (#51145)
* docker_volume: Deprecating force option, adding recreate option.

* Add changelog.

* Remove mis-placed force: yes for docker_volume.
6 years ago
Abhijeet Kasurde 18ed84b877 hashi_vault: add support for userpass authentication (#51538)
Added support for username and password authentication in hashi_vault
lookup plugin.

Fixes: #38878

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Andrea Tartaglia b8790abcbe Added description to single net interface (#51602)
* Added description to single net interface

* ec2_instance single iface description changelog
6 years ago
chronidev 240d1a6afb Add coherency between check and normal mode for copy plugin action see issue #24633 (#51582)
* Add coherency between check and normal mode see issue #24633

* Add changelog fragment for the PR

* Make change following PR comment

* Remove trailing whitespace
6 years ago
Simon Dodsley c65909d6db Add network fact to obtain FC WWN initiator ports (#37043) 6 years ago
Jordan Borean f27078df52
win_power_plan: fix for Windows 10 and Server 2008 compatibility (#51471) 6 years ago
Simon Dodsley 8707f1793e Add default fact for NVMe support (#50164) 6 years ago
Jordan Borean 6a2aac487d
win_stat - add follow option and fix broken tests (#51522)
* win_stat - add follow option and fix broken tests

* fix docs issues
6 years ago
Fabian von Feilitzsch 0be66113d4 [k8s] Always check envvars when auth parameter is not provided (#51495)
* Always check envvars when auth parameter is not provided

This will make it so that all code using the get_api_client
method will make use of the environment variables, instead of
silently ignoring them if default values haven't been set. This
affects at least the k8s lookup plugin.

* Add changelog
6 years ago
Brian Coca abb964a5a0
move extravars and option vars loading into VM (#51070)
* move extravars and option vars loading into VM

  also safedir setting, all these are intrinsic to VM
  avoid uneeded and inefectual shallow copy
  remove setters/getters as VM now does most of the work in init
  updated and added tests

* feedback + fixes

* keep extra_vars property for vars_prompt

* pass values not objects
6 years ago
Brian Coca 4ac0c23db6
added unsafe toggle to vars_prompt (#49219)
* added unsafe toggle to vars_prompt

	fixes #47534
6 years ago
Brian Coca 4a0fceaa3b remove bare var handling in conditionals (#51030)
* remove bare var handling in conditionals

  this makes top level and multilevel vars (dicts keys) behave the same
  it will require adding |bool for 'string comparissons' in indirect templates

  - added new tests to ensure uniform handling
  - switched to 'is' testing for status
  - changed warning to 'conditional' as 'when:' is not only place it gets triggered

* updated to include toggle and deprecation

* fix deprecated

* updated tests to handle toggle

* fixed typo and added note about the future
6 years ago
Brian Coca 50b40c47df aws_ec2 Implement the missing 'region discovery' (#51333)
* aws_ec2 Implement the missing 'region discovery'

  fixes #45288

  tries to use api as documented (which seems to fail in latest boto3 versions)
  and fallback to boto3 'hardcoded' list of regions

* fixes and cleanup, add error for worst case scenario

* fix tests, remove more unused code

* add load_name

* acually load the plugin

* set plugin as required

* reverted test changes, removed options tests

* fixes as per feedback and cleanup
6 years ago
Brian Coca 3ba3af5058
toggle for stripping empty shell/command output (#51342)
* toggle for stripping empty shell/command output

  fixes #45367

* Update lib/ansible/modules/commands/command.py

Co-Authored-By: bcoca <bcoca@users.noreply.github.com>
6 years ago
Will Thames 23b5599244 Add k8s module_defaults group and document (#51093)
It makes sense to use module_defaults with k8s modules, and thus
have a k8s module_defaults group.
6 years ago
Adam Miller 61ed229732 dnf load substitutions from installroot (#51206)
Fixes #51059

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Dag Wieers d8a0e1a9b7
aci_aaa_user: Fix changing user description (#51408)
This fixes a reported problem with the aci_aaa_user module.
6 years ago
Matt Martz 134b77961b
Add inject_ovf_env functionality for vmware_deploy_ovf (#51074)
* Add functionality to set hidden properties. Fixes #50299

* Add inject_ovf_env functionality

* Add xml declaration

* Revert "Add functionality to set hidden properties. Fixes #50299"

This reverts commit 4b41bb7520.

* Add changelog fragment

* Minor changes

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Hannes Ljungberg 72a44e144a docker_swarm_service: Compare image by digest (#51134)
* Compare image by digest

* Add changelog fragment

* Fix version check

* Remove unused import

* Add note about image resolving

* Don’t overwrite image

* Fix documentation error

* Add resolve_image option

* Add version_added

* Remove whitespace

* Remove unused attribute

* Remove unused attribute
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
Dusan Matejka 2133f0821a zabbix_template: Fixed interactions between options and data within JSON object (#51222) 6 years ago
Brian Coca be776daefe
add static facility and apply to register (#49737)
* add static facility and apply to register

* added warning

* added test for templated register

* test register 'static' status

* rely on subshell to deal with quote context

* use corrects pb for test

* bring constants back cause new code in devel
6 years ago
Ganesh Nalawade 70bf9b9919
Add backup filename and dir path option for config network modules (#50801)
* Add configurable backup path option for network config modules

Fixes #50283
Fixes #32724

*  Add back_options in network config module argspec
*  Handle backup path options in network action plugin

* Fix review comments

* Add integration tests

* Update changelog
6 years ago
Martin Krizek 11fb0a5d6a
facts: detect IP addresses on busybox properly (#51131)
* facts: detect IP addresses on busybox properly

Fixes #50871

* Check rc before parsing data

* Ooops
6 years ago
Matt Martz 8c08d03989
Fieldattribute inheritance with defaults (#50891)
* Add tests for check_mode at play and task level

These test inheritance of check_mode from the various levels (command
line, as a play attribute and as a task attribute) so they will be
useful for checking that the change to fieldattribute inheritance with
defaults works

* Add a sentinel object

The Sentinel object can be used in place of None when we need to mark an
entry as being special (usually used to mark something as not having
been set)

* Start of using a Sentinel object instead of None.

* Handle edge cases around use of Sentinel

* _get_parent_attribute needs to deal in Sentinel not None

* No need to special case any_errors_fatal in task.py any longer

* Handle more edge cases around Sentinel

* Use Sentinel instead of None in TaskInclude

* Update code to clarify the vars we are copying are class attrs

* Add changelog fragment

* Use a default of Sentinel for delegate_to, this also allows 'delegate_to: ~' now to unset inherited delegate_to

* Explain Sentinel stripping in _extend_value

* Fix ModuleArgsParser tests to compare with Sentinel

* Fixes for tasks inside of roles inheriting from play

* Remove incorrect note. ci_complete

* Remove commented code
6 years ago
Brian Coca ad57efff8f
[WIP] force install role and its deps (#49347) 6 years ago
Sam Doran 9d4c0dc111 Catch sshpass authentication errors and don't retry multiple times to prevent account lockout (#50776)
* Catch SSH authentication errors and don't retry multiple times to prevent account lock out

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Subclass AnsibleAuthenticationFailure from AnsibleConnectionFailure

Use comparison rather than range() because it's much more efficient.

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Add tests

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Make paramiko_ssh connection plugin behave the same way

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Add changelog

Signed-off-by: Sam Doran <sdoran@redhat.com>
6 years ago
Brian Coca b6824669df
Handle complex quoting in extra args in pull cli (#50212)
* Handle complex quoting in extra args in pull cli

fixes #40729
6 years ago
Peter Oliver 9edeb19354 Populate product_name and system_vendor facts on Solaris (#44114)
* Populate product_name and system_vendor facts on Solaris

* Add QEMU as Solaris "hardware" vendor.

* Lint fix.
6 years ago
Felix Fontein d2c4f57f16 docker_service: rename to docker_compose. (#51035)
* Rename docker_service -> docker_compose.

* Added changelog.

* Update scenario guide.

* Clean up module.
6 years ago
Matt Davis 2cb9ec9f0e fix include_vars non-ASCII error handling (#51198) 6 years ago
Jordan Borean 419727a6da
file - allow touch on files not owned by user (#50964)
* file - allow touch on files not owned by user

* use Sentinal value and preserved existing args

* Do no instantiate the Sentinel object
6 years ago
AlanCoding f018b9d07d Fix missing tracebacks in ansible-inventory
(cherry picked from commit b62693299b)
6 years ago
Jonathan 20936bbc3d module mongodb_user fix roles default value (#46443) (#46526)
* module mongodb_user fix roles default value (#46443)

* mongodb_user remove ignoring test E324

* mongodb_user add changelog (#464443)

* mongodb_user change doc to set parameter roles as None (#464443)

* mongodb_user fix lint in changelog fragment (#464443)

* mongodb_user : remove E325 exception in test
6 years ago
MarkusTeufelberger c1bc556b0a Relative time support for crypto modules (openssl_certificate) (#50570)
* Move relative time handling to module_utils and rewrite it

* Fix cases with no seconds defined

* fix a small typo along the way

* add relative time handling to the ownca provider in openssl_certificate

* add initial integration test for relative time ownca

* quote the documentation to produce valid yaml

* move timespec conversion and validation to the init function

* fix small edge case in conversion function

* add relative timestamp handling to the selfsigned provider

* add get_relative_time_option

* add relative timestamp handling to valid_in

* pep8 fix indentation

* add quotes in error message

* add changelog fragment

* Update changelogs/fragments/50570-relative_time_crypto.yaml

Co-Authored-By: MarkusTeufelberger <mteufelberger@mgit.at>
6 years ago
John Nelson 5540d66747 win_chocolatey: Fix hang on missing/required base env vars (#51154)
* win_chocolatey: Fix crash on missing/required base env vars

* Add changelog fragment
6 years ago
Martin Krizek 9ec9f18b13 dnf: allow to operate on file paths (#51080)
Fixes #50843
6 years ago
Jan Sušnik 70a39d358b Docker Network module labels support (#50883)
* Added support for labels for Docker Network

* Fixed missing comma in Docker Network module

* Specified minimal versions for dependencies and added changelog

* Fixes based on suggestions after code review

* Added integration tests
6 years ago
Hannes Ljungberg e3f61f4480 docker_swarm_service: Add command option (#50984)
* Add command option

* Fix test task name

* Changelog fragment

* Fix indendation

* Add version_added

* Better command description

* Test passing command as list

* Handle invalid command types

* Cleaner command type checking

* Check that all items in command list are strings

* Better error about command list items

* Better type checking errors

* Add tests for command type checking

* Update command tests

* Fix messed up rebase
6 years ago
Hannes Ljungberg 393bf5e4b1 docker_swarm_service: Add placement_preferences option (#51082)
* Add placement_preferences option

* Add changelog fragment

* Python 2.6 compat

Python 2.6 compat

* Cleaner check

* Better description

* Don’t compare placement_preferences if None

* Add placement_preferences example
6 years ago
Hannes Ljungberg 7ceb2ac95a docker_swarm_service: Fix publish idempotency when mode is None (#50882)
* Fix publish idempotency when mode is None

* Add changelog fragment

* Python 2.6 compat

* Use self.publish

* Check length of publish before comparing content

* Sort publish lists before zipping

* Enable publish tests

* python3 compat

* Don’t sort by mode as it is not safe

* Document publish suboptions and add them to args

* Add type to publish documentation

* Add choices to publish argument_spec suboptions

* Make tcp the default protocol

* Make documentation reflect protocol default

* Simplify setting mode

* Remove redundant string quoting

* Test order of publish

* Add comment about publish change detection
6 years ago
Felix Fontein 345011e024 openssl_csr cryptography backend, try II (#50894)
* Revert "Revert "openssl_csr: Allow to use cryptography as backend (#50324)""

This reverts commit bbd2e31e9f.

* Remove more complicated selection copy'n'pasted from openssl_privatekey.

* Add tests for backend selection.

* Add openssl_csr test for arbitrary string commonName.

* Allow to disable commonName -> SAN copying (fixes #36690).
6 years ago
Ganesh Nalawade 1b6228fa10
Increase persistent command_timeout default value (#51056)
* Increase persistent command_timeout default value

*  Increase command_timeout default value from 10 to 30 sec
   to reduce frequent timeout issue for network connection
   types (netconf/network_cli/httpapi/napalm)

* Fix review comments
6 years ago
Brian Coca 30da7a363c
allows loop pause for subseconds (#50461)
* allows loop pause for subseconds
* skip test on os x and bsd since date commands lacks nano

fixes #49951
6 years ago
Jeffrey Noehren 2eaf0956b5 Spotinst - adding support for instance health check validation (#49211)
[src] - adding changlog fragment
6 years ago
Alan Rominger baf59ccaac Put in documented default for gcp_compute filters (#50025) 6 years ago
Jordan Borean 9fa46e7f94 reboot - Fix connection timeout reset (#51000)
* only reset if we could retrieve the conn timeout
6 years ago
Martin Krizek 3b42b1796c
facts: set virtualization_role for KVM hosts (#50770)
* facts: set virtualization_role for KVM hosts

Fixes #49734

* Add changelog
6 years ago
Yunge Zhu 0f846f39ca fix new inventory azure_rm.py (#50006)
* fix new inventory

* fix lint

* resolve comments

* resolve comments

* add defensive code

* fix response not match handler

* remove useless import

* fix lint

* add changelog
6 years ago
Brian Coca eca7c3c8c7 Prevent duplicate role insertion into roles: (#50552)
* Corner case in which import_role would add another instance of a role with the same signature into roles: when it already existed there.

  roles:
	- name: a
  tasks:
       - import_role: name=a

  would execute role 'a' 3 times instead of the intended 2 (x2 in roles: phase +1 in tasks:)

* added tests
6 years ago
Brian Coca a7e81ba500
ensure we have required systemd env var (#50607)
* ensure we have required systemd env var
* add clarification about systemd and user scope

  fixes #50272
6 years ago
Ricardo Carrillo Cruz 1beb6f433b
Add object_type param to checkpoint_object_facts (#50982)
* Add object_type param to checkpoint_object_facts

* Add changelog fragment

* Fix sanity

* Fix sanity

* Pass type param to payload

Otherwise it does not do what is expected to do

* Add ip-only default to docstring
6 years ago
Brian Coca 119b65f919
Clarify clear facts (#50667)
* Revert "avoid x2 setting of set_fact when 'cacheable' (#50564)"

This reverts commit 207848f354.

* clarify clear_facts with set_fact cacheable

 revert previous 'fix' as it will break playbooks by changing precedence
 opted to leave current behaviour but document it on both plugins to mitigate confusion

 fixes #50556

 also fix grammer, add comment, remove unused e
6 years ago
Fabian von Feilitzsch 09bfe42a5c Bubble up import exception content for k8s module (#50657)
* Bubble up import exception content for k8s module

Signed-off-by: Fabian von Feilitzsch <fabian@fabianism.us>

* Track down other places import exception is reported

* Add changelog fragment
6 years ago
Strahinja Kustudic eb8294e6d9 Fix create home dir fallback (#49262)
When a user home dir is not created with `useradd`, the home dir will now
be created with umask from /etc/login.defs. Also fixed a bug in which
after a local user is deleted, and the same user exists in the central
user management system, the module would create that user's home.
6 years ago
Jacob Olsen 37960ccc87 check for chroot in systemd module (#43904)
* check for result['status'] in systemd module

* instead of checking for result['state'], actually check for chroot and warn

* allow systemctl status to work if in a chroot, update warn text

* simply change warning message
6 years ago
Manuel Molina Cuberos 3b5ac77a16 Preventing '/dev/tty not found' problems (#49950)
* Preventing '/dev/tty not found' problems when ' apt_repository` calls GPG in order to import keys.
6 years ago
Felix Fontein bbd2e31e9f Revert "openssl_csr: Allow to use cryptography as backend (#50324)"
This reverts commit 409f8a15bd.
6 years ago
Felix Fontein 8dfdd9abf3 Move changelog fragment to correct place. (#50869) 6 years ago
Felix Fontein 409f8a15bd openssl_csr: Allow to use cryptography as backend (#50324)
* Allow to use cryptography as backend for openssl_csr.

* Use different curve.

* Adding changelog.

Includes changelog fragment for #49416, which didn't include one.
6 years ago
Hannes Ljungberg 644057e9ec docker_swarm_service: Documentation fixes (#50861)
* Describe labels and container_labels correctly

* Clarify reserve_memory and limit_memory docs

* Remove default from container_labels doc

* Remove trailing whitespace

* Document min api version for configs and secrets

* Add changelog fragment

* Specify type on labels and container_labels

* Consolidate required API version descriptions

* Update reserve and limit memory docs

* Use correct power-of-two units

* Remove description about limit_memory minimum 4mb
6 years ago
Rich Wareham fd32760d7a docker_swarm_service: use exact name match when finding services (#50665)
* docker_swarm_service: use exact name match when finding services

The Docker API's filtering support allows filtering for substring
matches which means that when we filter the list of running services we
may accidentally match a service called "foobar" when looking for a
service named "foo".

Fix this by filtering the list of services returned from the Docker API
so that name matches are exact. It is still worth passing the filter
parameter to the Docker API because it reduces the number of results
passed back which may be important for remote Docker connections.

Closes 50654.

* add changelog fragment for #50654
6 years ago
Hannes Ljungberg cde292cc43 docker_swarm_service: Don’t add difference when update_order is None (#50655)
* Don’t add difference when update_order is None

* Add changelog fragment
6 years ago
Felix Fontein 0e7a9a2771 docker_volume: revert #47390 (#50663)
* Revert "Fix option change detection / force support for docker_volume. (#47390)"

This reverts commit 8ef994fbc5.

* Update changelog.

* Adjusting tests.
6 years ago
Alan Rominger be5b7889f9 Do not load user kube config if path specified (#49952) 6 years ago
Abhijeet Kasurde af914695e6
VMware: Fix vmware_vm_inventory (#50592)
* Added documentation around using vmware dynamic inventory plugin
* Fixed bug for populating host_ip in hostvars for given inventory host
* VMware: Add properties in vmware_vm_inventory

Fixes: #50249

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Dhanuka 94a1d86d70 redfish_utils: fix reference to local variable 'systems_service' (#50298)
* fixes issue 50296

* fixes the indentation of the return statement

* Adds a conditional test into `_find_systems_resource()` to check the existence
of the Members of System resource

* updates the error message

* harden the conditional test

* Add a changelog
6 years ago
Brian Coca 91d8383898 added missing docs for option in acl module (#50775)
* added missing docs for option in acl module
* remove acl from ignore
6 years ago
Matt Martz 8a2d39bcb2
Guard creating HTTPSClientAuthHandler behind HTTPS checks (#50523)
* Guard creating HTTPSClientAuthHandler behind HTTPS checks. Fixes #50339

* linting fixup
6 years ago
Abhijeet Kasurde 17bb4f4932 default: callback plugin allow unreachable task to stderr (#50533)
Provide toggle flag to allow display of unreachable task to stderr
using default callback plugin.

Fixes: #48069

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Renato Orgito 6f9bca9de3 Add auth_timeout parameter when supported by paramiko (#50448)
* Add auth_timeout parameter when supported

Paramiko 2.2 introduces the auth_timeout parameter. This will set the
parameter to the same value of the timeout parameter to prevent
"Authentication timeout" errors.

* Conditionally add auth_timeout to ssh.connect

Renamed sock_kwarg to ssh_connect_kwargs and conditionally added the
auth_timeout parameter based on the installed paramiko version.

* Add changelog fragment
6 years ago
trogdor_the_burninator 1dac10e5c3 Add AIX support to reboot module (#50353)
* Add ability for reboot module to work for AIX

* changelog for AIX reboot support
6 years ago
Brian Coca 207848f354 avoid x2 setting of set_fact when 'cacheable' (#50564)
* avoid x2 setting of set_fact when 'cacheable'

  fixes #50556

* ammend docs to new behaviour

* added period
6 years ago
vpiserchia 774a667591 Add Devuan Support for ascii release - resolve 49615 (#49616)
* Add Devuan Support for ascii release - resolve 49615

* Devuan Ascii does not have the VERSION_ID in the /etc/os-release file, we need to set NA
6 years ago
Toshio Kuratomi 27f9c3fba0 Clarify the change made to reverse_inventory 6 years ago
Martin Krizek 6d604f9b01 Allow for vaulted templates in template lookup (#49819)
Fixes #34209
6 years ago
Martin Krizek 82c95e07b5
Fix searchpath in the template lookup (#50488) 6 years ago
Matt Martz 9abeecb6d4
Add new AnsibleTemplateError to more easily catch templating issues (#50563)
* Add new AnsibleTemplateError to more easily catch templating issues. Fixes #50154

* Add changelog fragment
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
Jordan Borean b967f4dcc1 dnf/yum - added install_weak_deps option (#50525)
* dnf/yum - added install_weak_deps option

* skip creating weak dep packages if rpm doesn't support it

* fix rpm check for older hosts
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
Matt Martz 3b49bbcfde Give IncludedFile more context via ansible_search_path (#50045)
* Give IncludedFile more context via ansible_search_path to template lookups. Fixes #49969

* Update units
6 years ago
Jordan Borean 63e454a4b2 dnf - fix conf_file loading (#50515) 6 years ago
Abhijeet Kasurde a45063defe Update changed_when and failed_when examples (#50411)
Added examples in playbooks_error_handling doc for handlining
multiple conditions in changed_when and failed_when

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Felix Fontein 5c5cd2dc4d openssl_*: prevent error when path includes no path (#50322)
* Prevent error when path includes no path.

* Add changelog.
6 years ago
Felix Fontein a5bf71ac6a openssl_csr: idempotency doesn't work correctly for keyUsage (#50361)
* Fix key usage idempotency bug.

* Extend tests.

* Add changelog.
6 years ago
Felix Fontein 6b33c588d0 docker_swarm_service: Fix typo for option type (#50483)
* Fix typo for option type in docker_swarm_service.

* Add changelog.
6 years ago
Adam Miller b81a74f551 add changelog for #50242 (#50480)
Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Adam Miller ca084889c7 fix order of dnf api operations so transactions don't fail (#50038)
* fix order of dnf api operations so transactions don't fail

Previously dnf.base.fill_sack() was called before
dnf.base.update_cache() which apparently breaks dnf transaction
logic as per https://bugzilla.redhat.com/show_bug.cgi?id=1658694

Fixes #49060

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

* add changelog and test case

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Felix Fontein 26e3240315 docker_secret, docker_config: allow to base64-decode data (#49688)
* Adjust docker_config and docker_secret to be more similar.

* Add data_is_b64 parameter to docker_secret and docker_config.

* Add changelog.
6 years ago
René Moser e761ea3f9d
vultr_server: fix multiple ssh keys not handled (#50337)
* vultr_server: fix multiple ssh keys not handled

* add changelog fragment
6 years ago
Simon Dodsley 507f89e693 Pure Storage facts fix (#50349)
* Add module for Pure Storage FlashBlade to manage directory services

* Fix facts not correctly passing into ansible_facts dict
6 years ago
Adam Miller 33156712a9 Provide both service state and status when possible in service_facts (#49618)
* Combine systemd units/unit-files output for service_facts

Fixes #47118

Previously we were only taking the output of `systemd units` which
would leave out information about the service units that were
disabled, static, masked, etc. Now we're aggregating the results so
that anything not active/inactive/dead at least is pulled as fact
data with it's state provided.

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

* provide state and status information about services

Fixes #45730

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Abhijeet Kasurde fc6c500b5b
postgresql_user: set type of conn_limit (#50178)
conn_limit type is set to 'int'. This will allow module to compare conn_limit with record value without type casting.

Fixes: #38118

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Nathaniel Case f05979932b
Allow AnsibleVaultEncryptedUnicode to pass through exec_jsonrpc (#48306)
* Allow AnsibleVaultEncryptedUnicode to pass through exec_jsonrpc

* Add changelog
6 years ago
Abhijeet Kasurde 14eba662c8 Correct match test documentation (#50229)
Match test matches zero or more characters at the begining of the string.

Fixes: #32366

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Dag Wieers 0fe7d569c9 win_firewall_rule: Remove invalid 'bypass' action (#50207)
* win_firewall_rule: Remove invalid 'bypass' action

This fixes #50143

* Add changelog fragment
6 years ago
Dag Wieers 50ed152ab9 win_updates: Correctly report changes on success (#50188)
* win_updates: Correctly report changes on success

* Add changelog fragment
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
Gavin Williams 01a1ce16ce Jenkins_plugin: Handle 'latest' version when installing plugin for first time (#49723)
* Handle 'latest' version when installing module for first time

Otherwise, a fresh install of a plugin with 'version: latest' gets installed without its dependencies, rendering the plugin effectively useless.

* Add changelog
6 years ago
Julien Girardin 3e303bea4c List correctly current PV in "lvg" module: fix lvg reduce (#49731)
* Refactor integration test for lvg module to introduce grow/reduce test

* List correctly current PV in lvg module: fix lvg reduce

Previous behaviour was to only take into account PV passed in 'pvs'
argument. This lead to reduce not working as expecting:

* with state=present and list of wanted pvs, lvg found only the pvs to
  add or already present and ignored the pv to remove (obviously absent
  from the list of given PV)

* with state=absent and a pv to remove, lvg found that the remaining pvs
  list is empty (ignoring possible other PV in the vg) and decides to
  remove the vg entirely (as supposely no PV are left anymore to store
  lvm metadata)

* Add changelog fragment
6 years ago
Abhijeet Kasurde b132593861 Move doc fragments to changelogs/fragments dir (#50179)
Move changelog fragment to changelogs/fragments dir
6 years ago
Miguel Duarte Barroso 4951e5a5b7 os_security_group_rule proper module exit (#50076)
When the security group the rule belongs to does not exist and
the state is absent, the module is not properly exited, leading
to a playbook execution failure.

Fixes issue #50057
6 years ago
Michael Rose bcae7f24cb influxdb_user: Fixed unhandled exception on invalid login credentials (#50134) 6 years ago
Andrea Tartaglia 65c7424a35 Added organization in the scm_credential get (#49884)
* Added organization in the scm_credential get

* Fallback looking for cred in project org

* Tests project with multi org credential

* Fixed CI issue

* Added changelog fragment
6 years ago
Jordan Borean 65ce1b727e
win_copy - fix remote dir copy when it contains an empty dir (#50126) 6 years ago
Martin Krizek 545edc9114 facts: detect FreeBSD KVM guests (#50030)
Fixes: #49158
6 years ago
Martin Krizek 29c3bb48e9 facts: correctly detect multiple ipv6 addresses per device (#50020)
Fixes #49473
6 years ago
Jordan Borean efda3eaf1c
win_lineinfile - fix malformed returned json (#50066) 6 years ago
Brian Coca 88c87a3583
added handlers_from (#49220)
* added handlers_from

fixes #46769
6 years ago
Jérémy Lecour 2fb9b46752 Lineinfile must not insert lines multiples times with insertbefore/insertafter (#49409)
* Change test suite to fit expected behaviour

This reverts some changes from ansible/ansible@723daf3
If a line is found in the file, exactly or via regexp matching, it must 
not be added again.
insertafter/insertbefore options are used only when a line is to be 
inserted, to specify where it must be added.

* Implement the change in behaviour mentioned in the previous commit

* Fix comment to reflect what the code does

* Set the correct return message.

In these cases, the lines are added, not replaced.

* Add a changelog
6 years ago
Matt Martz 7eb1ab45a7
Allow tags to be templated from a variable (#49833)
* Allow tags to be templated from a variable. Fixes #49825

* Restore _load_tags to ensure we do csv tag splitting

* Add tests for csv tags and templated tags

* evaluate_tags doesn't need to accept strings, because _load_tags handles this
6 years ago
Matt Martz a0d71e7735
Fix reverse_inventory order to work on python3 (#49895) 6 years ago
Aleksander Kovtunenko ba562043e1 changed if logic Type to boolean (#49628)
* changed Type to boolean

* fix after review

* created fragment
6 years ago
Toshio Kuratomi 61b1daa65f Port from plaform.dist to ansible.module_utils.distro.linux_distribution
ci_complete
6 years ago
Eric Miller 4d0f2e632c Docker inventory service/stack groups for docker swarm (#48021)
* Adding service and stack grouping to docker inventory

* Updating documentation

* Adding changelog fragment for docker.py inventory script
6 years ago
Adam Miller 16f48bb4be
add changelog for pr #49912 (#49962)
Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Dave Bendit d62d7176b0 [docker_container] Failing on non-string env values (#49843)
* [docker_container] Failing on non-string env values

Fixes #49802

* Clarify failure message

Co-Authored-By: DBendit <David@ibendit.com>

* Fixup from review
6 years ago
Dave Bendit c67f4290e6 [docker_volume] Checking option minimal versions (#49839)
Fixes #38833
6 years ago
Akshay Gaikwad 1e0363ec7d Support for cache_from parameter in docker_image module (#49787)
* Support for cache_from parameter in docker_image module

Fixes #21704

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Minimum docker version check for cache_from option

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Add changelog fragment

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* cache_from fix when docker-py is older

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
6 years ago
Jordan Borean 4019d4f6d1
Windows Privileges - moved util code to it's own C# util (#48897)
* Windows Privileges - moved util code to it's own C# util

* Rename Enabler class to PrivilegeEnabler to remove ambiguity

* rename Utils to PrivilegeUtil

* fix missing util name changes
6 years ago
Jordan Borean 190d1ed7f1 win become: refactor and add support for passwordless become (#48082)
* win become: refactor and add support for passwordless become

* make tests more stable

* fix up dep message for Load-CommandUtils

* Add further check for System impersonation token

* re-add support for become with accounts that have no password

* doc fixes and slight code improvements

* fix doc sanity issue
6 years ago
Michael Rose b422c59ada Amends #47040 - influxdb_user - Prevents potential accidental password changes to blank (#49084)
* Amends #47040 - Prevents potential accidental password changes to blank

* Added changelog fragment
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
WhyIsThisOpen 7bdca72713 rhn_register fixes for username and password when unregistering
- Require username and password for unregistering and avoid "cannot marshal None unless allow_none is enabled" error when using an activation key and no channels specified.
- Update test fixtures and add changelog


Co-authored-by: WhyIsThisOpen <WhyIsThisOpen@users.noreply.github.com>
6 years ago
Dave Bendit 8fcf9e1a28 [docker_container] Fixes idempotency checks for network_mode (#49797)
Fixes #49794
6 years ago
Abhijeet Kasurde d36922064b Add support for hex color in slack module (#49804)
Fixes: #11935

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Andrea Scarpino 06099bd116 win_uri: fix body with one item in list (#49484) 6 years ago
Brian Coca daaca1abd5
fix vbox inventory to correclty unset pwfile (#49774) 6 years ago
Sam Doran 7c8af3d684 Reboot - Fix VMware ESXi not working by adding appropriate commands (#49637)
* Add commands for VMware ESXi

* Add changelog
6 years ago
Sam Doran c1589c33c4
Reboot - Fix command not found, add Apline support, fix Solaris command (#49272)
* Fix various bugs related in reboot

- Use format strings for consistency and improve debug log messages
- Use local variables instead of class attributes in order to be thread safe
- Run setup module to get distribution and version
- Run find module to get full path of shutdown command
- Use ansible_os_family and ansible_distribution to find commands and args
- Use same command for all Solaris/SunOS distributions
- Move delay calculations to properties
- Reliably check for module run failure
- Fix bug in run_test_command() that accidentally made the method work properly
- Use better exceptions rather than Exception
- Use dict literals rather than constructors
- Correct _check_delay() so it always returns a value, not None
- Don't store and return result in run_test_command() because it's not used anywhere
- add test for post reboot command that fails
- test negative values for delay parameters
6 years ago
Matt Martz c9040d7579
Don't just raise AnsibleError with the exception message (#49654)
* Don't just raise AnsibleError with the exception message. Fixes #49252

* Add changelog fragment
6 years ago
Brian Coca 8ce4720f44
pear: More info if failure occurs (#49735)
* added cli errors to error msg for pear
6 years ago
Steven Tobias 260512459d stop requiring description. this is not a mandated jira field for all screens (#46023) 6 years ago
Matt Davis 30c611a9cf
add changelog for 46608 6 years ago
Brian Coca b924476d63 updated clog with cve 6 years ago
Abhijeet Kasurde be21140384
VMware: update docs and return docs for vmware_host_service_facts (#49736)
Follow up of 45155

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Dag Wieers 7b01725bb5 mail: Fix new breakage on python 2.7 (#49197)
* mail: Fix new breakage on python 2.7

* Add changelog fragment

* Add basic SMTP testing

* Add SMTP integration tests using starttls and TLS
6 years ago
Brian Coca 758ac1846b
match interpreter on stdout also (#49446)
fixes #46980
6 years ago
Brian Coca e53a7856f6
simplify vm_guest detection code (#49378)
- remove a lot of repetition
  - change lists to tuples since they are faster to assign
6 years ago
Brian Coca 42a13d15f1
add path info to role list (#49346)
* add path info to role list

 - use same display format for both listing all and specific roles


Co-Authored-By: bcoca <bcoca@users.noreply.github.com>
6 years ago
Brian Coca 0c1f62065c
make adhoc include_role/task work again! (#49247)
* adhoc include_role/task work again!
  - fix task, pass if set
6 years ago
Brian Coca 70ba960f6d
More specificity in errors for cfg mgr (#48995)
* More specificity in errors for cfg mgr
6 years ago
Brian Coca 20270680fc
fixes to ansible-doc (#47682)
fixes to ansible-doc
 - change json to always be type dependent
 - change changelog generation to loop over the options
 - warn about ignoring module path
6 years ago
Brian Coca ba4c2ebeac
ensure ssh retry respects no log (#49569) 6 years ago
Dag Wieers 37820be05b
aci_rest: Fix ignoring custom port (#49715) 6 years ago
Dario Zanzico b183eb4464 docker_swarm_service: ensure idempotency when the user parameter is None (#49235)
* ensure idempotency for user set to None

* Update `user` documentation and add changelog fragment

* clarify changelog fragments and parameters documentation

* use restructuredtext syntax in changelog fragment
6 years ago
Abhijeet Kasurde c9325ca247
Override help string version (#49545)
This fix adds additional help message to version command options

Fixes: #20488

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Matt Martz 9007dbec2f
Add info about loop based on jinja2 loop var (#42134)
* Add info about loop based on jinja2 loop var

* ansible_loop

* Update test count

* Add extended loop_control that defines whether ansible_loop should be added

* Extended needs to be defaulted

* Revert "Update test count"

This reverts commit f1e93ee469825f4cdcd90fb28667d29aa088275c.

* Add docs about loop_control.extended

* Add revindex and revindex0

* Document ansible_loop in special vars

* Add changelog fragment

* Add tests, change items to allitems so that dot notation works, fix logic error with previtem
6 years ago
Brian Coca 597c258e0e
explain 'bare variables' (#49577) 6 years ago
Matt Martz 3a4d476512
Add now() jinja2 global func for getting the date/time (#43792)
* Add now() jinja2 global func for getting the date/time

* Docs and changelog

* now isn't a lookup, it doesn't need disabled
6 years ago
Dave Bendit 73640a4190 [docker_network] Adding `scope` and `attachable` flags (#49562)
Incorporating the abandoned work from PRs #35288 and #45552. Also adding in
the version checking from `docker_container.py`, which should be abstracted
out to `docker_common.py`.
6 years ago
Matt Martz 69d230f4bf Make squash deprecation messages less misleading (#49551) 6 years ago
Thomas Picariello c8ecac8dc2 Fix google auth scoping for unscoped credentials (#46740)
* Fix google auth scoping for unscoped credentials

* Add changelog fragment
6 years ago
Adam Miller 6f90d62be3 fix py3 scope for unique filter errors, enable filters integration tests on rhel8 beta (#48961)
* fix py3 scope for unique filter errors, enable filters integration tests on rhel8 beta

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

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
uberjew666 b72187cd2c Fixed win_route module (#46395)
* Changed $IpAddress to $Gateway

* Tweaked win_route unit tests

Checks to see if new static route has the correct gateway

* Create win_route.yaml

* Fixed incorrect variable name
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
Brian Coca 6096f57880 fix cache 'update' method to be 'mapping' compatible
- also simplify the update functions
 - fix methods and allwow backwards compat with plugins overriding 'update'
6 years ago
Matt Martz 77de219836
Support version 3 of the redis python library (#49445)
* Support version 3 of the redis python library. Fixes #49341

* Document 2.4.5 minimum redis-py version
6 years ago
Ryan Conway aacd22acc6 Fix an issue retrieving some types of 1Password items. (#47213)
* Some types of 1Password items have a 'password' field alongside the 'fields' attribute, not inside it, so we need to search there as well.

* Add changelog fragement for onepassword_facts PR #47213.
6 years ago