Commit graph

1664 commits

Author SHA1 Message Date
Mads Jensen
6a763d7133 Remove uneeded Python version compatibility checks. (#64076) 2019-11-20 18:08:30 -05:00
Xu Yuandong
da8ec327cc Update plugins/netconf/ce.py to fix a bug(failed to get veriosn information via neocnf). (#65065)
* fix version fail.

* add a changelog fragment.

* Update ce.py

* Rename plugins-netconf-ce-fix.yaml to 65065-plugins-netconf-ce-fix.yaml

* Update ce.py
2019-11-20 22:18:24 +01:00
John Imison
5bd06ee16e rabbitmq_publish SSL certificate implementation (#62036)
* Implementing ability to specify certificates.

* Changelog fragment for rabbitmq_publish certificate checking

* Fixing version_added

* Reducing line size.

* Minor documentation updates.

* Update to add missing space.

Co-Authored-By: Felix Fontein <felix@fontein.de>
2019-11-20 20:09:06 +00:00
Bill Dodd
f51f87a986 DeleteUser: do not disable user if already disabled (#64797)
* DeleteUser: do not disable user if already disabled

* add changelog fragment
2019-11-20 20:03:19 +00:00
Felix Fontein
b36f572256 openssh_keypair: fix idempotence issue (#65017)
* Fix idempotence issue.

* Add changelog.
2019-11-20 20:02:26 +00:00
Andrey Klychkov
509b989a9a postgresql_lang: use query parameters with cursor.execute() (#65093)
* postgresql_lang: use query parameters with cursor.execute()

* add changelog fragment
2019-11-20 20:00:07 +00:00
Abhijeet Kasurde
35cc26f8c0
VMware: Find unique tag using category id (#61082)
If two tags with same name and different category exists, vmware_tag_manager
used to take first found tag.

This commit use combination of tag and category to identify the category.

Fixes: #59379

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-11-20 14:43:04 +05:30
tcraxs
bc92170242 fix module that it reports the correct status of a change (#65061) 2019-11-20 00:43:20 -05:00
Jordan Borean
7092c196ed
config manager str type vault source (#65023)
* config manager str type vault source

* Convert vault text to_text earlier and add tests
2019-11-20 12:02:28 +10:00
Jordan Borean
200fb00310
Windows coverage - output temp files with UTF-8 BOM (#65086)
* Windows coverage - output temp files with UTF-8 BOM
ci_complete ci_coverage

* Remove testing changes to get ready for merge
2019-11-20 11:07:07 +10:00
Shachaf92
96a422a6fc win_firewall- Change req check from wmf version to cmdlets presence (#64998) 2019-11-20 11:00:56 +10:00
Matt Clay
ba273c72d8
Fix ansible-test handling of git submodules. (#65027)
* Revert most of PR #61605 commit e218c9814c

This removes the git error handling that converted all git errors into warnings.

* Fix ansible-test handling of git submodules.
2019-11-19 10:19:03 -08:00
Abhijeet Kasurde
a6bc43ba47
vmware_guest: Revert custom value customization in guest (#65031)
Due to confusion between 'Custom Attributes' and 'Advanced options',
this change got in devel. Revert to original behavior i.e. customizing
custom values using vmware_guest is done in this PR.

Fixes: #64291

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-11-19 18:49:02 +05:30
Guillaume Martinez
4e6fa59ec1 gitlab modules: unify authentication method (#64989)
* gitlab modules: unify authentication method
* gitlab module utils: remove useless import
* gitlab module utils: add documentation
* gitlab module utils: use distutil to compare version
* gitlab modules: sanity
* gitlab modules: remove useless import
* gitlab module utils: add missing import
* add changelog
2019-11-19 15:30:34 +05:30
Abhijeet Kasurde
d5fd588b34 distribution: ignore plesk-release file while parsing (#64665)
/etc/plesk-release file is now ignored while parsing distribution
release.

Fixes: #64101

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-11-18 15:05:23 -05:00
coreaut
1e59017d27 renamed module tls client auth params to avoid overlaping with fetch_url (#59522)
* renamed module tls client auth parameters to avoid overlaping with ansible fetch_url

* added version_added info for params

* Updated version_added

Updated version_added info from 2.9 to 2.10

* Update pulp_repo.py

removed version_added for renamed params

* Apply suggestions from code review

added ca_cert alias and 'version_added'

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* Apply suggestions from code review

added old behavior for client_cert and client_key which will deprecate in 2.14

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* Update pulp_repo.py

fix for linting error ansibot is complaining

* added changelog fragment for 59522

* Apply suggestions from code review

more informative depreciation warning and changelog fragment

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

* added mention for changes in client_key and client_cert behavior

* fixed too long line (linting)

* deprecated ca_cert alias to have consistent module params in Ansible 2.14

* fixed indentation for deprecation warning

* changed deprecated alias handling to argument_spec

* moved deprecated_aliases insied argument dict, thanks tremble

* suggestions from felixfontein

Move doc info about client_cert and client_key into its own paragraph

Co-Authored-By: Felix Fontein <felix@fontein.de>
2019-11-18 20:41:40 +01:00
Martin Westergaard Lassen
c9d3c9e233 hcloud: inventory: missing compose variables (#64559) 2019-11-18 13:54:36 +01:00
Klaus Frank
0efe5a666d Add full IPv6 support to win_dns_client - Fixes #55962 (#57577)
* Add full IPv6 support to win_dns_client - Fixes #55962

* Fix missing cast

* Add type to win_dns_client.py

* Remove version_added again, to hopefully make ansibot happy. Even though it was added as a response to the bot...

* Fix $params undefined error, that was introduced by fixing the "global variable" linting issue

* Fix casting error

* Fix inverted logic

* Fix rebase error

* Fix assignment to readonly variable

* Fix "reset IPv4 DNS back to DHCP adapter_name"

* Fix legacy windows server support (2008/2008R2)

* Fix 2k8

* Remove unecessary pslint ignore

* Added IPv6 tests, changelog fragment and further docs
2019-11-18 07:30:06 +10:00
Jordan Borean
480b106d65
become - stop using play context in more places (#62373)
* become - stop using play context in more places - ci_complete

* Fix up review points
2019-11-18 05:32:56 +10:00
Abhijeet Kasurde
b04940d256
VMware: Re-introduce backing_disk_mode in vmware_guest_disk_in… (#63244)
This info about backing_disk_mode was renamed to backing_diskmode,
to keep backward compatability re-introducing backing_disk_mode along
with backing_diskmode info.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-11-16 21:34:13 +05:30
Mario Lenz
034df49c56 VMware: New module vmware_host_dns (#64458)
* Restore module vmware_dns_config
* Remove domainname and change_hostname_to
* Changed version_added from 2.10 to '2.10'
* Add setup_attach_host: true to test case
* Add 'vcsim is not defined' block to integration tests
* Change 'result' to 'dns_config_result'
* Bugfix: Changing some static configurations while keeping others can crash the module
* Implement changing DNS config from DHCP to static on a cluster
* Update documentation for vmware_host_dns
* vmware_host_dns integration tests: Always revert to original DNS configuration, even if a test fails
* Deprecate vmware_dns_config
2019-11-16 11:25:06 +05:30
anupamaloke
96fc1a1b80 Add support for multiple manager attributes configuration (#60201)
* Add support for multiple manager attributes configuration

* Updated version_added to 2.10

* Added support for modifying LC and system attributes

* Added support for LC and system attributes

* Pylint fixes

* Add support for multiple manager attributes

* Add support for multiple manager attributes

* Add support for multiple manager attributes
2019-11-15 10:53:36 +00:00
Andrey Klychkov
01e4e1bb42 postgres.py: add query_params (#64661)
* postgres.py: add query_params

* postgres.py: add query_params, add changelog
2019-11-15 07:07:56 +00:00
Micah Hunsberger
8ff6e4c68e win_iis_webapplication: add authentication parameters (#56033)
* add connect_as, username, password parameters
add tests

* fixed reference to undefined variable.
added version added to new options.

* add changelog fragment

* fix line endings

* use ansible facts to determine os version
remove unused iis version check
test checksum of iis configuration after backup

* correct assertion

* added more cleanup tasks.

* version added is now 2.10

* skip server 2008 r2 for now

* run tests on server 2012 and higher
2019-11-15 16:04:19 +10:00
Wilmar den Ouden
40071e5db3 win_disk_facts: Adds Win32_DiskDrive object to facts (#51595)
* Adds win32_disk_drive object to win_disk_facts

* Names class parameter for Get-CimInstance as requested in the devdocs

* Maps whole class and adds docs

* Improve matching of disks when UniqueID is different format

* Improve logic for PNPDeviceID mapping

* Adds test for win32_disk_drive
2019-11-15 15:45:18 +10:00
Jordan Borean
762fcf78b9
win_pester - Align dir scanning with Pester's defaults (#64880)
* win_pester - Align dir scanning with Pester's defaults

Co-authored-by: Coby Caldwell <cobycaldwell@gmail.com>

* Fix sanity issues
2019-11-15 13:53:30 +10:00
Dag Wieers
521d6465f6 win_chocolatey: Fix error when choco.exe not found (#53115)
* win_chocolatey: Fix error when choco.exe not found

* Slight tweak to check and added changelog fragment

* Removed ignore rule that's no longer needed
2019-11-15 12:46:36 +10:00
Daniel-Sanchez-Fabregas
cd39e6ec6e win_domain_user: add retry logic for null user principal group (#54334)
* win_domain_user: add retry logic for null user principal group

* win_domain_user.ps1: Fix "user without group" case use

* Added changelog fragment

* Fix up missing dollar sign
2019-11-15 11:54:37 +10:00
Gianluca
bf8fe221bf Modified setup.ps1 in order to show Windows Installation type (#41002)
* Modified setup.ps1 in order to show Windows Installation type

* Fix after pull request comment

* Added changelog fragment
2019-11-15 11:19:01 +10:00
Matt Clay
4f51b7d323 Remove ansible-test --tox delegation option.
Use the --venv option instead.

This option was only available when running from source to test the ansible/ansible repository.

This will have no effect on testing collections or running from an installed version of Ansible.

Also update docs to reference the --venv option instead of the --tox option.
2019-11-14 17:18:00 -08:00
Martin Krizek
5c0b2c151c
Fix ansible_failed_{task,result} undefined in rescue (#64831)
This is a fix for a regression introduced by Perfy. Since then we mainly
operate on host.name instead of the Host object. In a call to
set_nonpersistent_facts where we set ansible_failed_task and
ansible_failed_result variables we were still passing the object which
led to those vars being undefined.

Fixes #64789
2019-11-14 15:50:54 +01:00
Abhijeet Kasurde
eac7fa1860
gitlab_user: Remove optional parameters while state is absent (#64832)
While deleting gitlab user, several parameters such as email, name,
password are not required. This fix removes this requirement from the
module.

Fixes: #61921

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-11-14 17:21:14 +05:30
Andre Lehmann
a75a79b84c hostname - Add Manjaro Linux distribution (#64810)
* Add Manjaro Linux distribution
2019-11-14 14:31:21 +05:30
Daniel-Sanchez-Fabregas
04b8f75ffa win_domain_computer module: Fix idempotence when name != sam_account_name (#56967)
* win_domain_computer module: Minor documentation error

* Fix idempotence when name != samaccountname

* Added changelog

* Added unsupported alias for CI check
2019-11-14 12:59:05 +10:00
Shachaf92
f6ac4361e7 win_firewall_rule - support ICMP types and codes (#60361)
* win_firewall_rule - support ICMP types and codes

* Update main.yml

* Add more examples and change type to list
2019-11-14 11:32:01 +10:00
Tony Chia
23a751323b allow using --check on win_iis_webapppool module (#50528)
* allow using --check on win_iis_webapppool module

* Added changelog and slight logic tweak

* Fix typo in changelog fragment
2019-11-14 08:52:34 +10:00
Jordan Borean
f8f7662850
Add the ability to ignore files and collection build (#64688) 2019-11-14 05:02:58 +10:00
Artem Meshcheryakov
bd9a0b6700 Improve handling of "restarted" state for win_iis_website module (#63829)
* Improve handling of "restarted" state for win_iis_website module

* Added changelog fragment
2019-11-13 10:24:25 +10:00
P-Hessler
95d613f3ab win_acl no longer needs SeSecurityPrivilege (#57804)
* win_acl no longer needs SeSecurityPrivilege
Set-ACL raises missing SeSecurityPrivilege error when the inheritance
from the parent directory is disabled.

* fixes test sanity

* registry rights can only be modified with Set-ACL

* add changelog
2019-11-13 09:54:57 +10:00
sergioirium
e77426dad3 Corrected Get-adcomputer (#63093)
* Corrected Get-adcomputer

Corrected Get-adcomputer on "Remove-ConstructedState" and "Set-ConstructedState" functions.
resolved error: Unable to contact the server. This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services running.

* Update lib/ansible/modules/windows/win_domain_computer.ps1

Co-Authored-By: Daniel-Sanchez-Fabregas <33929811+Daniel-Sanchez-Fabregas@users.noreply.github.com>

* Update win_domain_computer.ps1

changed
"-credential $credential" to "@extra_args" (Line 115 and 150)
corrected exception message (Line 122)

* Added changelog fragment, minor code tweak
2019-11-13 09:13:44 +10:00
Shachaf92
e74d397c01 setup.ps1 - parity with linux regarding missing local facts path (#58887)
* setup.ps1 - parity with linux regarding missing local facts path

* add warning

* Update setup.ps1-parity-with-linux-regarding-missing-local-facts-path.yml
2019-11-13 09:05:16 +10:00
Marius Rieder
d2e1aeeb67 win_domain_user: Make Identification of the user to work with more robust (#61594)
* Ensure we work on only one user.

After the initial get/create use the GUID of the found/created user to
ensure we will not start to work with  a different user. If we create a
user or modify it's attributes an he is not identified with the name
parameter afterwards this module fails in rather unpredictable ways.

This addressed #45298

* Use splatting create_args for creating user.

This prepars this for adding more optional create arguments without 
nesting of condictions.

* Set the UserPrincipalName and SamAccountName on create.

Set the UserPrincipalName and SamAccountName on the create operation if 
upn is given to ensure the User is created with a contollable 
SamAccountName.

* Rename $username to $name.

$username is missleading as its not the SamAccountName.

* Add a identity parameter to win_domain_user

This gives the user full controll over how the user is identified in the 
AD.

* Add version_added information for new parameter and fix yaml syntax.

* Added changelog fragment
2019-11-13 08:42:44 +10:00
Abhijeet Kasurde
68428efc39 Remove temp directory created by wait_for_connection (#64592)
wait_for_connection creates AnsiballZ_ping.py in temp directory,
which remains on remote machine even after playbook run.

Fixes: #62407

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-11-12 10:07:33 -05:00
Abhijeet Kasurde
47f9873eab
VMware: Handle slash in network name in vmware_guest module (#64494)
Encode slash in network name to work with vSphere API.

Fixes: #64399

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-11-12 17:13:57 +05:30
Abhijeet Kasurde
575116a584
doc: Handle exception in parsing parameter description (#60933)
Fixes: #60587

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-11-12 16:48:46 +05:30
Hidetoshi Hirokawa
c0331053db Add encoding and codepage params to win_command/win_shell (#54896) (#54966)
* Add output_encoding_override params to win_command/win_shell (#54896)

This enhancement enables Ansible to parse the output of
localized commands that ignore the prompt code page.

* Added changelog and minor nits
2019-11-12 15:58:57 +10:00
PRASOON KARUNAN V
8b13836b1f change $partition variable name to $ansible_partition (#63968)
* change $partition variable name to $ansbile_partition

* Added changelog fragment
2019-11-12 14:44:18 +10:00
Matt Martz
b93d92ef9a
Set alter_sys=True instead of False to address backwards incompat (#64670)
* Set alter_sys=True instead of False to address backwards incompat

* ci_complete

* Add integration test

* ci_complete

* sanity

* ci_complete

* Changelog fragment

* Update import test and validate-modules to match
2019-11-11 16:47:35 -06:00
Rene Schumann
f145057c5c - add nextToken support (#64598)
* - add nextToken support

* - add changelog fragment

* - use boto3 paginator for describe_log_groups
2019-11-11 13:27:09 -05:00
Felix Fontein
574bd32db2
docker_swarm_service: Allow source to be omitted for tmpfs mounts (#64637)
* Allow source to be omitted for tmpfs mounts.

* Add changelog.
2019-11-09 21:01:56 +01:00
Mario Lenz
5d30180f6b VMware: Implement updates for dvPG in vmware_dvs_portgroup (#62537)
* VMware: Implement updates / changes for dvPG in vmware_dvs_portgroup
* Remove unnecessary else
* Add more integration tests
* Improve create_vlan_list() helper function
2019-11-09 09:35:01 +05:30
Dusan Matejka
0cb19e655c zabbix_action shouldn't require args other than name when state=absent 2019-11-08 16:45:13 +05:30
Andrey Klychkov
5e3fda5582 postgresql_subscription: fix typo in module.warn method name (#64583)
* postgresql_subscription: fix typo in module.warn method name

* postgresql_subscription: fix typo in module.warn method name, add changelog
2019-11-08 08:54:16 +01:00
Andrey Klychkov
2039bf45fe postgresql_publication: fix typo in module.warn (#64582)
* postgresql_publication: fix typo in module.warn

* postgresql_publication: fix typo in module.warn, add changelog
2019-11-08 08:53:48 +01:00
Ali
26acb0703d Added support for pagination to the github_deploy_key module(#36876)
- Fixes #36745 
- removed json import
- removed requirements from documentation
- refactored the module
- added changelog fragment
2019-11-08 09:09:23 +05:30
n0trax
27d3dd58a4 Replace clear() method for backward compatibility. (#64504) 2019-11-07 16:30:03 -05:00
Matt Clay
75646037dc Switch from RHEL 8.0 & 8.1b to 8.1 in CI. 2019-11-07 13:17:49 -08:00
sky-joker
4078dcbb77 Zabbix: zabbix_template: fix https://github.com/ansible/ansible/issues/64030 (#64032)
add zabbix_template changelog
2019-11-07 08:21:14 -05:00
Matt Martz
254788bc22
unsafe wrapping should only happen for with_ loops (#64401)
* unsafe wrapping should only happen for with_ lookups. Fixes #64379. Addresses #64169

* edit porting guide entry

* typo in changelog fragment

* typo

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* punctuation

Co-Authored-By: Sandra McCann <samccann@redhat.com>
2019-11-06 10:31:55 -06:00
Martin Krizek
cd8ce16d48
template lookup: fix regression when templating hostvars (#64070)
This fixes a regression that was caused by switching from copy() to
deepcopy() when 'saving' variables before templating. Since HostVars
did not implement the __deepcopy__() method, deepcopy returned incorrect
results when host vars were present in the variables.

Fixes #63940
2019-11-06 15:25:43 +01:00
Benjamin Leber
52c4c1b00d docker_login: Use with statement for accessing files (#64382) (#64392)
* docker_login: Use with statement for accessing files (#64382)

* Update changelogs/fragments/64382-docker_login-fix-invalid-json.yml

Co-Authored-By: Felix Fontein <felix@fontein.de>
2019-11-06 09:40:30 +01:00
Matt Clay
adcf9458f1
Fix ansible-test collections sanity import test. (#64467)
* Fix ansible-test collections sanity import test.

Resolves https://github.com/ansible/ansible/issues/64466

* Fix get_source implementation also.

* Fix is_package function.
2019-11-05 16:06:57 -08:00
Felix Fontein
f4ff45dcd4 ansible-test: bumping ACME test container version (#64424)
* Bumping ACME test container version.

* Add changelog.
2019-11-05 10:51:22 -05:00
Jordan Borean
7acae62fa8 Fix up role version pagination for Galaxy install (#64373)
* Fix up role version pagination for Galaxy install

* Fix sanity issue
2019-11-05 10:34:50 -05:00
Med
a1ab093ddb synchronize - remove unused block (#64344) 2019-11-05 10:34:18 -05:00
Andrey Klychkov
04c999f0f8 postgresql_idx: add stat mode support (#64138)
* postgresql_idx: add stat mode support

* postgresql_idx: add stat mode support, add changelog

* postgresql_idx: add stat mode support, fix CI
2019-11-05 10:26:51 +00:00
Mark Chappell
819ba2259d Sanity test fixups for AWS ec2 modules (#64230)
* ec2_ boilerplate

* Deprecate unused options.

* ec2_vol: Perform explicit type checking on volume_size and iops when parsing the args

Boto would through a type exception if the string couldn't be converted to an int.

* ec2_lc_find: remove duplicate definition of region

It's defined in ec2_argument_spec and ec2 doc fragment

* ec2_lc_info: Move responsibility for type checking/conversion of sort_start and sort_end into arg parser

* General sanity test related doc fixups

* Remove EC2 related sanity/ignore.txt entries

* Add changelog fragment
2019-11-04 18:39:31 +00:00
Sloane Hertel
c1f1b2029c
Support vars plugins in collections (#61078)
* Move var plugins handling to a separate file

* Allow var plugins to require whitelisting

* Add global configuration ('demand', 'start') for users to control when they execute

* Add 'stage' configuration ('all', 'task', 'inventory') for users to control on a per-plugin basis when they execute

* Update ansible-inventory and InventoryManager to the global and stage configuration

* Update host_group_vars to use stage configuration and whitelisting

* Add documentation for using new options and to the developer's guide

* Add integration tests to exercise whitelisting and the new configuration options, using vars plugins in collections, and maintain backward compatibility

* Changelog

Co-Authored-By: Brian Coca <brian.coca+git@gmail.com>
Co-Authored-By: Sandra McCann <samccann@redhat.com>
2019-11-04 11:41:14 -05:00
Mads Jensen
39bf09517a wait_for - remove an obsolete fallback for Python 2.6 (#63988) 2019-11-04 11:39:19 -05:00
Mark Chappell
8c8077b5be Amazon related Sanity test fixups (remaining batch 1) (#64368)
* Remove Sanity test ignore.txt entries

* Fixup boilerplate

* Remove use of blacklisted _ variable name

* cloudformation: Add an explicit removal version for template_format

This option's been ignored since ansible 2.3

* General docs cleanup to clear sanity errors

* elasticache_parameter_group: Add list of choices

- matches documented choices
- other values wouldn't have worked

* data_pipeline: Deprecate 'version' - always ignored

* Add deprecation documentation
2019-11-04 15:13:27 +00:00
Mads Jensen
3126c38f8a Replace import of pycompat24.literal_eval with ast.literal_eval. (#64088) 2019-11-04 09:55:08 -05:00
Sam Doran
c67c23234a
clean_facts - use correct variable when evaluating the string (#64284)
A regexp object has no .startswith() method, which caused an unnecessary
try/except block to be added to handle this.
2019-11-04 09:44:10 -05:00
Andrey Klychkov
73526b9d65 mysql_variables: add mode parameter (#63547)
* mysql_variables: add mode parameter

* mysql_variables: add mode parameter, add changelog fragment

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix sanity

* mysql_variables: add mode parameter, remove warns

* mysql_variables: add mode parameter, refactoring

* mysql_variables: add mode parameter, fix logic
2019-11-02 10:16:28 +01:00
Sloane Hertel
371d7aae31
Use templating in HostVarsVars __repr__ (#64282)
* Fix HostVarsVars templating

* Add some tests for HostVars and HostVarsVars templating

* changelog
2019-11-01 15:51:34 -04:00
Pierre Prinetti
2444fae208 Add a named parameter to the filter to_uuid (#64057)
Let the caller choose a namespace for `to_uuid` and document the
behaviour of both the default case, and the new explicit case.

This PR does not change the existing behaviour of the `to_uuid` UUIDv5
filter.
2019-11-01 13:11:34 -04:00
Patrick O'Brien
c76e074e4c Callback: removing args from task_fields from Sumologic and Splunk plugin(#63527)
CVE-2019-14864 Ansible: Splunk and Sumologic callback plugins leak sensitive data in logs

Fixes #63522

Signed-off-by: Patrick O’Brien <patrick.obrien@thetradedesk.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-11-01 19:51:11 +05:30
Mads Jensen
c3838b5d73 Replaces deprecated usage of functions in ansible.module_utils.basic (#63990) 2019-10-31 16:22:44 -04:00
Sam Doran
d5fbe6573b
paramiko_ssh - Improve authentication error message (#64157)
The error is not always an invalid username/password. It could be a connection timeout or refusal.
2019-10-31 15:39:53 -04:00
Pavan Bidkar
548fa65ac6 VMware: Allow dash in Windows server dnsname (#64052)
Fixes: #62810
2019-10-31 14:02:52 +05:30
Felix Fontein
fed267df03
openssl_csr and openssl_certificate: fix support for Ed25519 and Ed448 private keys (#63984)
* Move X25519, X448, Ed25519 and Ed448 feature tests to module_utils.

* Correctly sign with Ed25519 and Ed448 keys.

* Fix public key comparison. Ed25519 and Ed448 do not have public_numbers().

* Add tests.

* Add changelog.

* Give better errors for cryptography 2.6.x and 2.7.x.

* Test for new errors.

* Forgot one.

* Used wrong private key.

* Use private key password for CA key. Add more stuff to its certificate.
2019-10-30 21:36:36 +01:00
parmsib
a5d69f2a26 Make docker_stack adhere to standard ansible return values (#63467)
* Make docker_stack adhere to standard return values

The names of the various fields returned from ansible modules are e.g defined here https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#msg.

Adhering to this improves usability and makes use of functionality for e.g stdout_lines etc.

* Update lib/ansible/modules/cloud/docker/docker_stack.py

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

* Fix under-indentation of continuation line (pep8)

Issue exposed in test here https://app.shippable.com/github/ansible/ansible/runs/146667/1/console

* Don't break old playbooks/roles

Made sure the changes are only adding new variables, not removing anything existing yet.

* Added comment

* Minor fixes

* Update lib/ansible/modules/cloud/docker/docker_stack.py

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

* Update lib/ansible/modules/cloud/docker/docker_stack.py

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

* minor change to docker_stack.py

* Add changelog fragment for PR 63467

* Format changelog fragment

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

* Add fragment about docker_stack return val depr

* Add docker_stack doc note about deprecated vals

* Remove whitespace in empty line

* Add docker_stack depr notice to porting guide

* Update changelogs/fragments/63467-docker-stack-return-fix.yml

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

* Update docs/docsite/rst/porting_guides/porting_guide_2.10.rst

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

* Update lib/ansible/modules/cloud/docker/docker_stack.py

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

* Added back a missing new line
2019-10-30 19:42:19 +01:00
Matt Clay
e9f8a34dce
Fixes for validate-modules import handling. (#63932)
* Fix validate-modules support for collections.

- Relative imports now work correctly.
- The collection loader is now used.
- Modules are invoked as `__main__`.

* Remove obsolete validate-modules code ignores.

* Handle sys.exit in validate-modules.

* Add check for AnsibleModule initialization.

* Remove `missing-module-utils-import` check.

This check does not support relative imports or collections.

Instead of trying to overhaul the test, we can rely on the `ansible-module-not-initialized` test instead.

* Fix badly named error codes with `c#` in the name.

The `#` conflicts with comments in the sanity test ignore files.

* Add changelog entries.
2019-10-30 09:48:21 -07:00
Alexander Korsunsky
b7e38dfa52 copy - check for changes beyond first level of subdirectories (#58323)
Add integration test for copy: deep recursive with remote_src=True
2019-10-30 12:17:11 -04:00
Sandra McCann
26236f474b fix spelling issues (#64103) 2019-10-30 09:26:36 -05:00
Edoardo T
0d905a0496 ACMEAccount.get_request check status code value lower boundary (#63140)
* check status code value lower boundary

Any HTTP code below 200 cannot be considered a success, should be
handled like a failure instead.

This is particularly true for below zero status codes.

Fixes #63139

* provide changelog fragment

* ensure connection errors are handled in Acme module

* add fetch_url check to ACME.send_signed_request

* remove module.fail_json

* move _assert_fetch_url_success out of ACMEAccount

* fix ansible-lint errors

* use simplified syntax status checking
2019-10-29 19:44:25 +01:00
Robert Osowiecki
3c978a3225 lineinfile - don't run os.makedirs on empty dir path (#63921)
* Fix #63919: don't run os.makedirs on empty dir path

* integration test for lineinfile create: yes without path
2019-10-29 13:06:17 -04:00
Bill Dodd
14eedb2956 Do not PATCH Account Enabled prop if not supported (#62617)
* do not PATCH Account Enabled prop if not supported

* add changelog fragment
2019-10-29 13:16:49 +00:00
Felix Fontein
5c973dd147 docker_container: get rid of defaults (#63419)
* Add container_default_behavior option to get rid of some defaults.

* Add changelog.

* Fix option.
2019-10-28 16:40:48 -04:00
Gonéri Le Bouder
039c770a95 vmware_host_firewall_manager: fix #61332
Since https://github.com/ansible/ansible/pull/56733, we were not able to apply
firewall rules with no `allowed_hosts` key.

closes: #61332

In addition, this patch ensures the `allowed_hosts` key accepts a dict,
instead of a dict in a single entry list.

```yaml
vmware_host_firewall_manager:
  esxi_hostname: "{{ esxi1 }}"
  rules:
    - name: NFC
      enabled: True
      allowed_hosts:
        - all_ip: False
          ip_address:
            - "1.2.3.4"
```

Should be written:

```yaml
vmware_host_firewall_manager:
  esxi_hostname: "{{ esxi1 }}"
  rules:
    - name: NFC
      enabled: True
      allowed_hosts:
        all_ip: False
        ip_address:
          - "1.2.3.4"
```
2019-10-28 13:01:02 -04:00
Andrey Klychkov
defccd1d44 postgresql_db: allow to pass users names with dots (#64007)
* postgresql_db: allow to pass users names with dots

* postgresql_db: allow to pass users names with dots, add changelog fragment

* postgresql_db: allow to pass users names with dots, fix ci
2019-10-28 13:23:09 +00:00
Mark Chappell
8d7580a59f AWS S3 : Fixup sanity test issues and deprecate 2 unused options (#63989)
* S3 module Sanity check fixes.

* s3_lifecycle: deprecate unused 'requester_pays' option

* s3_sync: deprecate unused retries option

* Add changelog fragment
2019-10-28 09:18:08 +00:00
Mark Chappell
fd54c54b51 AWS IAM Sanity test cleanup and deprecate unused 'fail_on_delete' option (#63961)
* AWS IAM Sanity test cleanup

* Changelog and porting guide updates

* Review recommendations
2019-10-28 09:18:58 +01:00
Andrey Klychkov
88af9f6470 mysql_replication - accept empty string to the module's parameters (#63546) 2019-10-25 11:56:40 -04:00
Matt Martz
cdb7ab61a0
Introduce context manager for temporary templar context changes (#60513)
* Introduce context manager for temporary templar context changes. Fixes #60106

* Rename and docstring

* Make set_temporary_context more generic, don't hardcode each thing you can set, apply to template action too

* not None

* linting fix

* Ignore invalid attrs

* Catch the right things, loop the right things

* Use set_temporary_context in a few extra action plugins
2019-10-25 09:51:57 -05:00
Abhijeet Kasurde
af0d70cb6f user: Handle exception when /etc/shadow file is missing (#63888)
Added exception handling when module tries to modify user details,
and /etc/shadow file is missing or not found.

Fixes: #63490

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-10-24 14:22:41 -05:00
Kyle Umstatter
fb38c9cea9 Support PostgreSQL Custom Format (#63806)
* Support PGC Restores

* Fix whitespace

* support pgc both dump and restore
2019-10-24 11:09:11 +01:00
Adam Miller
ed86907587 DNF Handle Empty AppStream stream definition (#63819)
* DNF Handle Empty AppStream stream definition

Fixes #63683

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

* Switch Fedora dnf test target modularity to stratis

In Fedora 29, the metadata was not properly set for a default stream
for ripgrep even though there is a profile called "default", however
that's an arbitrary string and the module maintainer must set the
default stream (which it never was for the ripgrep module, thus
failing the "empty stream" install test)

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-10-24 00:57:31 -04:00
Adam Miller
8c43697e3b yum - only instantiate YumBase once (#63713)
* yum - only instantiate YumBase once

Previously, this code was re-instantiating the `YumBase` object
many times which is unnecessary and slow. However, we must do it
twice in the `state: absent` case because the `yumSack` and
`rpmSack` data of the previously instantiated object becomes
invalid and is no longer useful post transaction when we verify
that the package removal did in fact take place. Also, this patch
removes the repetitive re-processing of enable/disable of repos in
various places.

Here's a display of the speed increase against a RHEL7 host:

```yaml
- hosts: rhel7
  remote_user: root
  tasks:
  - name: Install generic packages
    yum:
      state: present
      name:
        - iptraf-ng
        - screen
        - erlang
  - name: Remove generic packages
    yum:
      state: absent
      name:
        - iptraf-ng
        - screen
        - erlang
```

Before this patch:
```
real    0m52.728s
user    0m5.645s
sys     0m0.482s
```

After this patch:
```
real    0m17.139s
user    0m3.238s
sys     0m0.277s
```

Fixes #63588
Fixes #63551

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

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-10-23 03:34:13 -04:00
Matt Clay
0923ed56c7 Changelog entry for ansible-test sanity fixes. 2019-10-22 23:26:59 -07:00
Kevin C
b52d715567 add change_set_id to cloudformation output (#63752)
* Add change_set_id to the cloudformation module output when a change set is created

* Add module return documentation for change_set_id

* changelog
2019-10-22 23:31:06 +02:00