* 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>
* Initial commit for meraki_mx_l7_firewall module
* Add argument checking
* Sanity fixes
* Fix crash and improve integration tests
* Improved integration tests and coverage
* Reformat response data
- Module does not match argument structure of API
- PR reformats the response to match Ansible arg spec
- Improved integration tests
* Fix reformatting for diffs
* Create rename_* functions
- is_update_required() ignores the key id
- Meraki expects one of the keys to be id
- Function temporarily renames key to appId to get around this
* Tweak documentation and tests
- Tests now do an include so each task doesn't need delegate_to
* Fix which files I'm editing
* Initial commit for meraki_nat module
- Query fully works
- Present is still very much in development
* Add initial code for present functionality, not complete
* Add request documentation
* Add examples and return documentation.
* Added payload to requests
- Module seems to need new idempotency check
* Allow 1:1 and 1:many NAT to work
- New idempotency check method is probably required to work
* Make all three options work
- Module isn't idempotent
* Diff support
- Added integration tests
- Diff support isn't quite done
* Fix diff output
* Enable idempotency assertion in tests
* Add test assertions for code coverage
* Update documentation and tests
- Split tests to separate file to avoid delegate_to
* Fix blank line
* Initial commit for module
- Module can query or modify network services on Meraki gear
- Check mode supported
- Integration tests included
* Small change to examples
* Move mutual exclusive to build in approach
* Sanity err
* Split integration tests into two files to avoid delegate_to
* Add the integration tests, woops
The default for a httpapi connection is to do basic auth, however
when setting the url_username and url_password without
force_basic_auth, the call to ansible.module_utils.open_url would
not always properly handle the basic auth headers based on the
combinations of **kwargs passed. This ensures that is always the
case when no session token exists and as the goal is to use basic
auth in the event of not having a session token, this should be
a safe operation.
Signed-off-by: Adam Miller <admiller@redhat.com>
Before this fix, the module was not able to look up a `VM Network` located at
`/DC0/network/VM Network`. As a consequence, the test module was failing
with a real environment (Non-govcsim).
* Adding Avi ansible lookup module
(cherry picked from commit 77b8951f68cbc889e6595b2a359ca27b84a43c0d)
* Added description for examples
* Added debug logs and unit tests
* Fix __builtin__ import and restting super
* Fix pep8 errors
* Updated as per review comments on IP address
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.
* Add junos_lag_interfaces resource module
* Add new resource module junos_lag_interfaces.
* Targets model https://github.com/ansible-network/resource_module_models/pull/29
* Deprecate junos_linkagg module
* Fix CI issues
* Fix junos integration test cases
* Fail if base lag interface is not configured
* Generate galaxy.yml based on single source of truth
* Fix up tests and align file names
* Minor Makefile tweak
* Remove link in galaxy.yml file and make it a template file
* Moved collections docs to dev_guide
* change Makefile clean path
* Added readme to example meta file
* review fixes
* Use newer style for doc generation script
* Fix mistake in dev_guide index
* removed uneeded file, fixed links and added preview banner
* Moved banner for sanity test
* add parameter list argument
* add tests
* fix test and add doc
* correct test file
* fix typo
* fix tests
* fix typo in file name
* correct file name reverting the previous commit
* correct property name
* add checkmode message
* changes as per review comments
* variable casing and other review comment changes
* define $test_parameters_check_mode_msg variable
* InventoryManager start of perf improvements
* 0 not 1
* More startswith to [0] improvements
* Remove unused var
* The hash doesn't need to be a string, start as a list, make it into a tuple
* set actually appears faster than frozenset, and these don't need to be frozen
* Cache hosts lists, to avoid extra get_hosts calls, pass to get_vars too
* negligible perf improvement, it could help with memory later
* Try the fast way, fallback to the safe way
* Revert to previous logic, linting fix
* Extend pre-caching to free
* Address test failures
* Hosts are strings
* Fix unit test
* host is a string
* update test assumption
* drop SharedPluginLoaderObj, pre-create a set, instead of 2 comparisons in the list comprehension
* Dedupe code
* Change to _hosts and _hosts_all in get_vars
* Add backwards compat for strategies that don't do set host caches
* Add deprecation message to SharedPluginLoaderObj
* Remove unused SharedPluginLoaderObj import
* Update docs/comments
* Remove debugging
* Indicate what patterh_hash is
* That won't work
* Re-fix tests
* Update _set_hosts_cache to accept the play directly, use without refresh in get_hosts_remaining and get_failed_hosts for backwards compat
* Rename variable to avoid confusion
* On add_host only manipulate _hosts_cache_all
* Add warning docs around _hosts and _hosts_all args
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>
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>
* 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
* 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.