Commit Graph

1237 Commits (2be2ae366ea3779d247c9c4f0294fa43f3d1ef84)

Author SHA1 Message Date
Sam Doran 372f21e3b5 Handle new output for podman image build (#59807) 5 years ago
James Cassell 17f2b5f73e os_subnet: allow using non-default subnet pool (#52608) 5 years ago
Abhijeet Kasurde 025e30ea0c VMware: add support for http_proxy in connection API
This commit allows users to access a vCenter or a ESXi through a
HTTP CONNECT based proxy.

To do so, the users have to set the `proxy_host` and `proxy_port`
variables.

The can also use the `VMWARE_PROXY_HOST` and `VMWARE_PROXY_PORT`
environment variables.

This feature depends on pyvmomi > v6.7.1.2018.12.

Fixes: #42221

Co-Author: Abhijeet Kasurde <akasurde@redhat.com>
Co-Author: Gonéri Le Bouder <goneri@redhat.com>
5 years ago
Mario Lenz 3aa73cb6b8 VMware: Refactor vmware_cluster into several modules (#58468)
Refactor vmware_cluster into several modules (vmware_cluster, vmware_cluster_drs, vmware_cluster_ha and vmware_cluster_vsan) as discussed in #58023.

vmware_cluster lacks a lot of configuration options for DRS, HA and vSAN. Implementing them
all in vmware_cluster would make the module hard to maintain. Therefore, splitting it into several
modules and implementing the missing configuration options in them seems a good idea to me.

This is step one, refactoring vmware_cluster into several modules. Step two, implementing more
configuration options for DRS, HA and vSAN, will follow.
5 years ago
glyngholm f46eb8ebcd Headers in URL lookup plugin (#59555)
* Update url.py

Allow passing of headers to URL lookup plugin
5 years ago
Simon Dodsley 288d74ca48 Update FlashBlade Directory Service config module to support NIS (#59608) 5 years ago
Maciej Delmanowski 75be309242 Don't warn if local user is found in user database (#56838)
If the 'local' parameter of the 'user' Ansible module is enabled, and
the user has been found in the local user database, don't emit
a warning, because this is an expected outcome.

Add changelog and integration tests

Co-authored-by: drybed <drybjed@gmail.com>
5 years ago
Mark Chappell 934d25a820 iam_password_policy: boto expects pw_expire to be ommitted when setting no expiration requirements (#59848)
Fixes #59102
5 years ago
Mark Chappell c1e5758c4c Add missing aws modules to aws module defaults group (#59788)
* Add missing aws modules to aws module defaults group

* add changelog
5 years ago
Marc Hörsken 98df8e01db Fix py3 decoding issues in cyberarkpassword (#59500)
* Fix py3 decoding issues in cyberarkpassword.py
* Use to_native instead of forced utf-8 decoding
* Use to_bytes to avoid trouble with Popen
* Create 59500-cyberarkpassword-fix-py3-decoding.yaml
5 years ago
Jordan Borean 04ec47bdf1
win_dsc - be more lenient with datetime parsing (#59703)
* win_dsc - be more lenient with datetime parsing

* Remove l that shouldn't be there
5 years ago
Simon Dodsley 4c1f52c6c0 Add support for preferred arrays to host configuration (purefa_host) (#59735) 5 years ago
Simon Dodsley 27c60a7cec Add ability to force immeadiate replication of a pgroup (#59785) 5 years ago
Abhijeet Kasurde 2ebc4e1e7e inventory: Handle IndexError while parsing limit file (#59776)
Handle IndexError exception raised while parsing the limit file.

Fixes: #59695

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Jordan Webb 20c4ad3b95 Add pipelining to podman connection plugin (#57579)
* Add pipelining to podman connection plugin

* Add changelog fragment
5 years ago
Martin Krizek fd899956b4
Use correct delegate_to hostnames in loops (#59659)
Fixes #59650
5 years ago
Jiri Hnidek 978fe81a6d Added unit tests for redhat_subscription module (#58665)
* Fixed the redhat_subscription module:
  - Option 'pool_ids' works in Python3 now
  - It tries to attach only pools IDs that are available
  - Optimization of code: do not call list --available, when
    no pool is requested
  - Simplified configure() method
  - Small changes to generate same commands on Python2 and Python3.
    Order of arguments/options and pool IDs have to be same to
    be able to run unit test using Python2 and Python3.
  - Added fragments file for redhat_subscribtion module
5 years ago
Tommy Brecher 4d775cbbf1 ec2_eip - added support for BYOIP and filtering reuse addresses by tag/value (#59180)
* change variable name from isinstance to is_instance (prevent overriding builtin function)

* Added support for:
  - Filtering existing Elastic IPs based on a tag name or it's value (when reuse_existing_ip_allowed is true)
  - Allocating new Elastic IPs from a given IPv4 pool (BYOIP support)

* yamllint corrections

* added examples for:
  -  tag_name,
  -  tag_value
  -  public_ipv4_pool

* remove aliases

* Added changelog fragment

* added integration tests for ec2_eip module

* removed space to trigger rebuild
5 years ago
Sorin Sbarnea 7c6fb57b7d Implements extra_hosts for docker_image module (#59540)
* Implements etc_hosts for docker_image module

Allows custom hosts on docker_image module.

The of this option made impossible to use docker_image module to build
images that required a custom hostname in /etc/hosts. For running
containers this option was already present.

While the python-docker API uses extra_hosts term, our existing module
already uses etc_hosts argument, so it sounds better to have some
consistency between docker_container and docker_image.

Fixes: #59233

* Update test/integration/targets/docker_image/files/EtcHostsDockerfile

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

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

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

* Update changelogs/fragments/docker_image_etc_hosts.yml

Co-Authored-By: Felix Fontein <felix@fontein.de>
5 years ago
Ihor Borodin 3b5a96fcb7 Fixing race condition in ec2 inventory plugin (#59638)
* Fixing race condition in ec2 inventory plugin

Co-Authored-By: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

* Fixing code block according to suggestion

* Adding changelog fragment
5 years ago
Pilou 65013c4001 consul_session: ensure certificate is checked when HTTPS is used (#58693)
* consul_session: ensure SSL certificate is checked

* consul_session: don't ignore validate_certs param
5 years ago
Simon Dodsley d82446652f Update FlashBlade filesystem module to support quotas and NFS v4.1 (#59559) 5 years ago
basos g 3c8838f0f7 Add check mode indicators at the beginning and the end of the playbook, play, and task (#49432)
* Add integration tests for default callback check mode markers
5 years ago
Brian Coca a5d409a8b2
point at corresponding version (#59200) 5 years ago
Andrey Klychkov db26fe2f1e module_utils.common.*: removed unused objects (#59570) 5 years ago
Brian Coca e9a37f8e31
prevent templating of passwords from prompt (#59246)
* prevent templating of passwords from prompt

  fixes CVE-2019-10206
5 years ago
Strahinja Kustudic 5fc769f6b1 sysctl - Reload also when current system values differ (#56153)
Previously if `sysctl_set=no` (which is the default) this module only
checked for changes in the sysctl.conf file to decide whether it should
reload it or not. This means that if the values in the conf file are the
same as they are set with the module, but the current values on the
system are different, that this module wouldn't apply the changes on the
system and thus the value set with the module wouldn't be applied on the
OS. This isn't obvious and it doesn't make sense that the module works
like that by default, especially because there is a separate option
`reload`. Now sysctl will also check if the current value differs on the
system and if it does, it will reload the file again.
5 years ago
Abhijeet Kasurde 401e70c0a2
VMware: add facts about tags in vmware_cluster_facts (#56848)
Fixes: #46458

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Martin Nečas c7f414dece ovirt vm when creating Nonetypefix (#59377)
* ovirt vm when creating Nonetypefix

* update fix and add comment

* add changelog

* Update 59377-ovirt-vm-when-creating-fix.yml
5 years ago
Brian Coca 8a886a6bee
Fix gather facts ignoring gather_subsets config (#59271)
* Fix gather facts ignoring gather_subsets config

 fixes #58728

* Update lib/ansible/playbook/play.py

Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Jordan Borean 9ff26a4a22
psrp - Added proper reconnection variable name (#59369) 5 years ago
Brian Coca 74ac229fa8 fix all cases of none remote/become users (#59397)
some cases failed, when defaults were None on the plugins
5 years ago
Martin Krizek d6b1376006
Add changelog for #59280 (#59380) 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
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
Raul Mahiques fd2116e26a Added state "remount" which will remount the device (#52649) 5 years ago
Martin Krizek a752e2a467
Clear 'connection related' plugin vars for next loop iteration (#59024)
Fixes #58876
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
James Cassell 28259ee247 dzdo: fix password prompt (#59208) 5 years ago
Matt Davis 277690bcc6 add changelog 5 years ago
Brian Coca c2253c8133
Allow for no role_versions to be present (#56519)
* Allow for no role_versions to be present

  fixes #46650

  better info on fetch, ensure list return

* use correct to_
5 years ago
Brian Coca 48d4d6ec69
Stop ignoring merge hash behaviour in inventory (#58460)
* stop ignoring merge hash behaviour in inventory

fixes #58120

* added porting note

Co-Authored-By: Alicia Cozine <879121+acozine@users.noreply.github.com>
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
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