Commit Graph

1663 Commits (4be8b2134f0f6ed794ef57a621534f9561f91895)

Author SHA1 Message Date
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>
5 years ago
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
5 years ago
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>
5 years ago
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>
5 years ago
Martin Westergaard Lassen c9d3c9e233 hcloud: inventory: missing compose variables (#64559) 5 years ago
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
5 years ago
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
5 years ago
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>
5 years ago
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
5 years ago
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
5 years ago
Andrey Klychkov 01e4e1bb42 postgres.py: add query_params (#64661)
* postgres.py: add query_params

* postgres.py: add query_params, add changelog
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
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.
5 years ago
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
5 years ago
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>
5 years ago
Andre Lehmann a75a79b84c hostname - Add Manjaro Linux distribution (#64810)
* Add Manjaro Linux distribution
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
Jordan Borean f8f7662850
Add the ability to ignore files and collection build (#64688) 5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
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>
5 years ago
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>
5 years ago
Abhijeet Kasurde 575116a584
doc: Handle exception in parsing parameter description (#60933)
Fixes: #60587

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
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
5 years ago
PRASOON KARUNAN V 8b13836b1f change $partition variable name to $ansible_partition (#63968)
* change $partition variable name to $ansbile_partition

* Added changelog fragment
5 years ago
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
5 years ago
Rene Schumann f145057c5c - add nextToken support (#64598)
* - add nextToken support

* - add changelog fragment

* - use boto3 paginator for describe_log_groups
5 years ago
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.
5 years ago
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
5 years ago
Dusan Matejka 0cb19e655c zabbix_action shouldn't require args other than name when state=absent 5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
n0trax 27d3dd58a4 Replace clear() method for backward compatibility. (#64504) 5 years ago
Matt Clay 75646037dc Switch from RHEL 8.0 & 8.1b to 8.1 in CI. 5 years ago
sky-joker 4078dcbb77 Zabbix: zabbix_template: fix https://github.com/ansible/ansible/issues/64030 (#64032)
add zabbix_template changelog
5 years ago
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>
5 years ago
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
5 years ago
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>
5 years ago
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.
5 years ago
Felix Fontein f4ff45dcd4 ansible-test: bumping ACME test container version (#64424)
* Bumping ACME test container version.

* Add changelog.
5 years ago
Jordan Borean 7acae62fa8 Fix up role version pagination for Galaxy install (#64373)
* Fix up role version pagination for Galaxy install

* Fix sanity issue
5 years ago
Med a1ab093ddb synchronize - remove unused block (#64344) 5 years ago
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
5 years ago
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
5 years ago
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>
5 years ago
Mads Jensen 39bf09517a wait_for - remove an obsolete fallback for Python 2.6 (#63988) 5 years ago
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
5 years ago
Mads Jensen 3126c38f8a Replace import of pycompat24.literal_eval with ast.literal_eval. (#64088) 5 years ago
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.
5 years ago
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
5 years ago
Sloane Hertel 371d7aae31
Use templating in HostVarsVars __repr__ (#64282)
* Fix HostVarsVars templating

* Add some tests for HostVars and HostVarsVars templating

* changelog
5 years ago
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.
5 years ago
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>
5 years ago
Mads Jensen c3838b5d73 Replaces deprecated usage of functions in ansible.module_utils.basic (#63990) 5 years ago
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.
5 years ago
Pavan Bidkar 548fa65ac6 VMware: Allow dash in Windows server dnsname (#64052)
Fixes: #62810
5 years ago
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.
5 years ago
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
5 years ago
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.
5 years ago
Alexander Korsunsky b7e38dfa52 copy - check for changes beyond first level of subdirectories (#58323)
Add integration test for copy: deep recursive with remote_src=True
5 years ago
Sandra McCann 26236f474b fix spelling issues (#64103) 5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
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.
5 years ago
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"
```
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
Andrey Klychkov 88af9f6470 mysql_replication - accept empty string to the module's parameters (#63546) 5 years ago
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
5 years ago
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>
5 years ago
Kyle Umstatter fb38c9cea9 Support PostgreSQL Custom Format (#63806)
* Support PGC Restores

* Fix whitespace

* support pgc both dump and restore
5 years ago
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>
5 years ago
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>
5 years ago
Matt Clay 0923ed56c7 Changelog entry for ansible-test sanity fixes. 5 years ago
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
5 years ago
Stefan Horning 7aac7a56da Added missing param to lambda module to pass it through to boto3 (#58822)
* Added missing param to lambda module to pass it through to boto3

* Allow updating of runtime, because there is no reason why not

* Updated version_added to 2.10 to make tests green again

* Updated RETURN docs of Lambda module

* Added tests to aws_lambda test-suite.
5 years ago
Sam Doran 92cd13a2cf
lineinfile - use correct index value when inserting at the end (#63696) 5 years ago
Sam Doran 29d4d318a5
lineinfile - properly insert line when line exists and backrefs are enabled (#63763)
Use a separate variable for the boolean test rather than having the same variable sometimes be a boolean and sometimes be a regular expression match object

Add integration tests to cover this scenario
5 years ago
Xu Yuandong e4b6dd1862 ce_config/bug/jingdong: a bug from jingdong. (#62872)
* update to fix "`quit` may make seesion closed."

* update to fix "`quit` may make seesion closed."

* 274:49: E272: multiple spaces before keyword

* add a changelog fragment.

* Update ce_config.py

using run_command for prompts.

* Update ce_config.py

* Update ce_config.py

typo error

* update to use get_prompt

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py
5 years ago
Bob Boldin 40975cd436 fix 61907 - auto_attach yes option not honored in ec2_transit_gateway (#61993)
* fix 61907 - auto_attach yes option not honored in ec2_transit_gateway

* add changelog fragment
5 years ago
phongle1205 331d51fb16 Attach an attached/detached volume from OpenStack VM’s should return similar information (#21558)
Currently, attach an attached volume from OpenStack VM’s returns only
argument data. It is better to return full data as attaching a detached
volume.

In my use case, I need the extra data to mount and format the volume.
5 years ago
Toshio Kuratomi cc1ff57c5b
AH servers include automation-hub as part of the server configuration. (#63700)
* AH servers include automation-hub as part of the server configuration.

So we don't need to add it here.

Fixes #63699

* Update unittests for the fix to galaxy wait_import_task
5 years ago
Gary Williams 3f0479279e VMware: Add a parameter wait_for_ip_address_timeout in vmware_guest (#63557)
* Added a parameter (wait_for_ip_address_timeout) to allow a longer timeout than the default.
* Removed the wait_for_vm_ip function in this module as one in module_utils is already being used elsewhere.
5 years ago
Sam Doran dcec3d000e syslogger - disable check mode (#63646) 5 years ago
Felix Fontein 4b1fdee119
docker_container: deprecate trust_image_content (#63420)
* Deprecate trust_image_content.

* Add changelog.

* Mention it has never been used; removed test stub.
5 years ago
Xu Yuandong 47c31c201b action/ce.py:clear configuration candidate when return to user-view. (#63513)
* clear configuration candidate when return to user-view.

* add a changelog fragment for the pr.

* Update 63513-ce_action_wait_prompt_trigger_time_out.yaml

* Update 63513-ce_action_wait_prompt_trigger_time_out.yaml
5 years ago
Andrey Klychkov d22dc5ab8b doc: postgresql_user: Add changelog fragment for 63565 (#63666) 5 years ago