Commit Graph

8355 Commits (7ee58358213873a1403711e50c898e55f084f85a)

Author SHA1 Message Date
Chris Archibald b1360c0d94 bug fixes (#59049) 5 years ago
Trois-Six 6f9f67be18 virt_net: add way to get facts for only one specified network 5 years ago
Andrey Klychkov 59e647910d Add unit tests for bytes_to_human formatter
PR #58664

Co-Authored-By: Sam Doran <sdoran@redhat.com>
5 years ago
Evert Mulder 66d12f6f1e Only convert VirtualDiskFix for #57653 clone_with_convert is failing 5 years ago
Gonéri Le Bouder e9b1e36d76 vcenter provider: avoid a TypeError exception
Avoid `TypeError: option values must be strings` with `ConfigParser`.
Default values must be string, not `None`.

The error happens when `test/integration/cloud-config-vcenter.ini` does
not have the `vmware_proxy_host` or `vmware_proxy_port` keys defined.
5 years ago
Martin Krizek b7868529ee
Revert "Speed up VariableManager by preserving Templar state. (#45572)" (#59280)
This reverts commit 6069d09b9d.

Fixes #57351
5 years ago
Abhijeet Kasurde 791e565802
VMware: Additional testcase for mem_reservation (#59365)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Tyler Ramer 8d0f2e5725 Address regression causing bootproto=dhcp for manual IP addresses (#56376)
Commit b7724fdf85
appears to have caused a regression, where `ip4`, `gw4`, `ip6`, `gw6`
were converted to `ipv4.address`, `ipv4.gateway` etc.

This causes bootproto (or `ipv4.method`) to remain `dhcp`, as noted in https://github.com/ansible/ansible/issues/36615

This commit only reverts the key-value pairs to the original names,
which is in line with both expectation (manual ip addr == no dhcp) and
the language used in the playbook, which is, for example, "ip4" not
"ipv4.address"

Co-authored-by: Stuart Pollock <spollock@pivotal.io>
Co-authored-by: Tyler Ramer <tramer@pivotal.io>
5 years ago
Abhijeet Kasurde 1f49abb51c
VMware: Accept 0 as valid value for memory reservation (#59230)
vmware_guest accepts 0MB as valid value for memory reservation in
virtual machine hardware configuration. This fixes the regression
introduced via 193f69064f.

Fixes: #59190

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Jordan Borean 2f2b106423
Fix win_reg_stat for HKU hives (#59359) 5 years ago
Jordan Borean 015119df8c
Windows - Add common util for web requests (#54759)
* Windows - Add common util for web requests

* Use different method of retrieving options from module arg spec

* Added proper version_added for module options

* Fix linting errors

* Fix proxy issues and updated cred docs

* Fix FTP usage with proxy settings

* Removed uneeded function added in bad rebase

* Fix up client certificate auth

* fix new sanity checks

* Edit http agent code and update porting guide
5 years ago
Matt Clay b378e885ed Make ansible-test TestMessage hashable. 5 years ago
Matt Clay 4f1d0f1b39 Skip using paths for ansible-doc sanity test. 5 years ago
The Magician e7fba5cea0 New Module: gcp_mlengine_version (#59224) 5 years ago
The Magician 5b0214bcce New Module: gcp_appengine_firewall_rule (#58852) 5 years ago
The Magician 40ff1949fb New Module: gcp_mlengine_model (#59222) 5 years ago
Sam Doran 8edad83ae0
User - make groups and append mutually exclusive with local (#59309)
* Update intigration tests
5 years ago
The Magician 5c6aa9b9e8 Bug fixes for GCP (as of 2019-07-09T06:06:53Z) (#59171)
* Bug fixes for GCP modules

* ignore syntax
5 years ago
The Magician c5e26ab4da Bug fixes for GCP (as of 2019-07-09T06:06:53Z) (#59172)
* Bug fixes for GCP modules

* ignore syntax
5 years ago
The Magician b75e8d19be Bug fixes for GCP (as of 2019-07-09T06:06:53Z) (#59132)
* Bug fixes for GCP modules

* ignore syntax
5 years ago
Sloane Hertel 1d3f2c7764
disable s3_lifecycle tests (#59311) 5 years ago
Felix Fontein 4a574c4d0c Option parsing: warn if both an option and its alias are specified for a module (#53698)
* Print warning when both an option and its alias is specified.

* Improve output.

* Put warnings into self._warnings directly, resp. use self.warn() when handling subspecs.

* Add changelog.

* Add unit test.
5 years ago
Sam Doran f231f21669
Handle situation where ansible_architecure may not be defined when gathering facts (#55466) 5 years ago
Nilashish Chakraborty bb006db7c8
Add exclusive configuration mode support (#59289)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Abhijeet Kasurde 4b152235ff
Typo fixes (#59227)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Raul Mahiques fd2116e26a Added state "remount" which will remount the device (#52649) 5 years ago
Toshio Kuratomi 87601969a3 Correct places where match was intended
pytest.raises has two parameters, message and match.  message is meant
to be the error message that pytest gives when the tested code does not
raise the expected exception.  match is the string that pytest expects
to be a match for the repr of the exception.  Unfortunately, it seems
that message is often mistakenly used where match is meant.  Fix those
cases.

message is also deprecated so removed our usage of it.  Perhaps we
should write a sanity test later that prevents the use of
pytest.raises(message) to avoid this mistake.

seealso: https://docs.pytest.org/en/4.6-maintenance/deprecations.html#message-parameter-of-pytest-raises

Also update the exception message tested for as we're now properly
detecting that the messages have changed.
5 years ago
Aljaž Košir 42073b6331 Add lambda_bucket_event module (#58059) 5 years ago
Jill R 1c1da3c11d
Re-enable ec2_vpc_vpn_facts test (#58893) 5 years ago
pratikgadiya12 393e4a41d0 Added support to create and delete multiple databases in MySQL (#58602)
* Added support to create/delete mulitiple databases in MySQL

Fixes: #58370

* Added additional tests cases and fixed documentation changes

* Code refactoring and added tests for better test coverage

- Removed db_exists usage from most of the code. Used existence_list
 and non_existence_list instead

- Added additional tests to cover all scenarios w.r.t creation and deletion
 on multiple databases

- Added tests for dump operations

* Minor fix

* Minor fix - create check mode test

* Added dump tests for better dump tests coverage

* Removed minor database connection details

* fixed error

* Added test case for import operations

* Code refactoring and review fixes

- Added dump all test case

* Fixed review comments

* Minor review comment fixes

* Altered db_create return value

* Removed db_list and altered "does exist" to just "exist"

* Kept db and db_list in module.exit_json

* Refactored tests

- Added removal of dump2 file

* Moved import tests to state_dump_import file

* Removed import tests from multi_db_create_delete

* Updated porting guide, added RETURN block

* Minor identation fix

* Added validation to check if databases are dumped
5 years ago
Hannes Ljungberg 0e8eb1d17f pip: Remove unused option use_mirrors and remove all ignore.txt entries
PR #58977

* Remove unused option use_mirrors

* Add changelog fragment
5 years ago
Sam Doran d2edf1d435 User - Create parent directories if they do not exist in the specified home path (#51043)
* Create a user home directory if it has parents that do not exist

The useradd command line tool does not create parent directories. Check if the specified home path has parents that do not exist. If so, create them prior to running useradd, then set the proper permission on the created directory.

Add tests

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

* Use dict for default user group in tests

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

* Fix tests

Signed-off-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sumit Jaiswal b01b1d40cf
PR to add Unit TC for Checkpoint network module (#57710)
* cp_network unit TC

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
5 years ago
Yunge Zhu cb201bfba1 add xmltodict to azure requirements file (#55748)
* add xmltodict

* fix lint
5 years ago
Sebastiaan Mannem d0538c0d7a postgresql_pg_hba: Exception when two lines with same weight are compared (#59198) 5 years ago
Abhijeet Kasurde 8a13b41823
VMware: Use managed object id to find VM (#59143)
* Based upon partial work of wilmardo
* Now, user can specify managed object id of virtual machine to find
an existing virtual machine

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Yunge Zhu 42c43a2822 add azure_rm_keyvaultkey_info module (#55754) 5 years ago
Matt Clay 13bbfacb04 Show ansible-test --explain errors in CI. 5 years ago
Andrey Klychkov 0e09800a9a Postgresql modules: tidying up of CI tests (#59099) 5 years ago
Brian Coca a39b721db5
fixes to config manager (#58530)
* skip unreadable ansible.cfg

* all types should check for type

* patch access for tests and fix tests that relied on missing files not being checked
5 years ago
dx0xm b8eba8e1f0 VMware: Add testcase for vmware_dvs_portgroup_facts (#59088)
* Tests for choosing specific DVS while gathering facts

Signed-off-by: dx0xm <52723266+dx0xm@users.noreply.github.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Hannes Ljungberg 6f94995b52 npm: Validate all option types (#58965)
* Add type validation for name, version and registry
* Add changelog fragment
* Remove ignore of E337 and E338
5 years ago
Matt Davis d28f25d118
patch ansible-connection collection plugin loading (#59119) 5 years ago
Matt Clay d4dec59cb0 Fix collection loader builtin handling. (#58897)
- Support more import statements:

  from ansible_collections.ansible.builtin.plugins.module_utils import basic
  from ansible_collections.ansible.builtin.plugins.module_utils.basic import AnsibleModule

- Add unit tests for more import statements.
- Raise ImportError instead of returning None if load_module fails.
5 years ago
Toshio Kuratomi 019d078a5a
Move common build code from _build_helpers (#55986)
We have some common code used by several docs scripts.  Migrate that
into the build-only shared code repository.

* Move lib/ansible/utils/_build_helpers.py to the directory for common
  build code
* Migrate docs/bin/dump_config.py to a build-ansible subcommand
* Migrate dump_keywords to the build-ansible framework
  * Make the script more maintainable by using functions and good
    variable names
  * Port to Python3 idioms
  * Fix bug so that private attributes will be undocumented
* Move generate_man to a build-ansible subcommand
* Port plugin_formatter to a build-ansible subcommand
* Rework command_plugins so that docs scripts can target Python-3.4+ and
  releng-only subcommands can use more recent versions of Python.
  The architecture is now that command_plugins/* need to be importable
  on Python-3.4.  The init_parsers() method needs to run on Python-3.4.
  But the main() method can utilize features of more recent Python as
  long as it fits within those parameters.
* Update docs build requirements

Port the plugin_formatter to build-ansible framework
5 years ago
Matt Clay cb0dfc9793 Prepare pylint test for collections support. 5 years ago
Chris Archibald 8bf069114f New Module: Vscan Enable (#57953)
* new module

* fix netapp.py

* updates

* fixes
5 years ago
Sam Doran d17e7a91b1
Add test for meta: end_play (#59118)
- Set ansible_python_interpreter for hosts using local connection
5 years ago
Wojciech Sciesinski e8a7d89180 Correct a documentation of the jenkins_plugin module (#59139) 5 years ago
Matt Clay 2ed78b650f Update to ansible-test to prepare for collections.
Changes to simplify merging of collections support.
5 years ago