If a host is already missing, `self.host_update` is `None`. With
this change,`state_exit_unchanged()` won't try anymore to access
`self.host_update.runtime`.
* Add win_format
* Some doc changes were missed
* Fixes for ansible-test, additional assertion for check mode
* Fix -WhatIf issues
* Support for idempotency and changes to integration tests
* Fix trailing whitespace
* Fixes from review, and added check for non-empty volumes
* Remove an extra line
* Structural changes
* Minor fixes for CI
- xenserver module_util: fixed comment in set_vm_power_state().
- xenserver module_util: renamed cdrom.iso VM fact to cdrom.iso_name
in gather_vm_facts() to be in line with module parameter of same name.
- xenserver module_util: sorted IPv6 addresses by their OS index
in gather_vm_facts().
- xenserver_guest module: fixed a bug in deploy() where an error message
would not be shown when VM name is empty and check mode is used.
- xenserver_guest module: fixed a bug in destroy() where VM would be
shut down by error when check mode is used.
- xenserver_guest module: fixed a bug in get_changes() where wrong
out-of-bound disk position would be shown in error message when
CD-ROM device occupies last position.
- xenserver_guest module: assume value "none" for "networks.type" and
"networks.type6" module parameters in get_changes() when no value is
found in xenstore_data (custom customization agent).
- xenserver_guest module: added separate error message in get_changes()
for a case when maximum number of network interfaces is reached.
- xenserver_guest module: negative value for disk size in
get_normalized_disk_size() now properly shows an error.
* Correct behavior so that direction isn't required for default.
* Add more tests.
* 'disabled' values cannot be changed.
* Include 'not specified' in messages.
This added support for increasing shard count:
https://github.com/ansible/ansible/pull/24805
But the conditional to fail if you have specified a shard count other
than the current shard count was still left in.
This removes that conditional since it's no longer needed and prevents
you from actually updating things!
fileglob returns a list of paths it does not return file contents, as explained in latest notes. The file lookup retrieves file contents. This change clarifies the first example to make it clear a paths, not contents, are returned.
It also adds spaces around the lookup to avoid E206 from ansible-lint: "Variables should have spaces before and after: {{ var_name }}"
+label: docsite_pr
* netbox_device: Allow device modification
* Add ability to update and existing device
* Allow check_mode
* Fail when device name is missing
* Fail when cannot resolve ID instead of taking ID 1 by default
* netbox_device: Add diff output
* netbox: Some refactoring
* Add diff output and check_mode to netbox_ip_address
* Deduplicate redundant code into netbox_utils
* netbox_utils: A few unit tests
In the documentation the rule_num parameter works only in conjunction with `action` set to `insert` - fix the example with the rule_num parameter.
+label: docsite_pr
The existing documentation does not include an example that shows how to create a deployment slot for a web app. After much frustration, I finally had to break out fiddler and look at the actual request that was being made in order to figure out how to create one. Hopefully the addition of this example will help someone like me who is struggling to easily solve this problem.
+label: docsite_pr
* innit of ovirt_role.py
* put permits to build_entity
* add manual update to role permit
* ovirt role add docs
* ovirt_role update syntax
* ovirt role dont use permit name
* use correct syntax fo get_all_permits
* add role description
* ovirt role update whitespace
* update pep8 syntax
* update permits description
* ovirt role add check_mode
* add remove all permits example
* update examples spacing
* nxos_interface:DI: should only use delay when operation state check is requested
There is a 10 second delay that is added for every interface that is changed.
This delay should only occur when a task sets one of the `want` vars.
* /return/continue/
tags.keys() returns a list of the keys, sure. But in Python 3 it's a
"dict_keys" class, and BOTO is expecting a list. So let's make this work
in Python 3.
list(tags) returns a list of the keys in Python 2 and Python3. That
seems to be what we want.
* fix missing attribs with dirct module execution
* also make remote tmp handling smarter
update tests
* set default if attrib does not exist
* add simple test
* Fix removal of tag when os_stack invokes update if a stack already exists.
* Add warning if a tag is provided and openstacksdk version is less than 0.27.0
* Fix pep8 errors
* Bump min_version up to 0.28.0
* Add GetMemoryInventory command to CATEGORY_COMMANDS_ALL['Systems']
* Add elif command == GetMemoryInventory to Systems category, to use forthcoming get_memory_inventory() function from redfish_utils
* Add get_memory_inventory() function to redfish_utils.py, which does not include any Absent dimms
* Remove trailing whitespace
* Add get_multi_memory_inventory() function to aggregate get_memory_inventory
* Call new function get_multi_memory_inventory()
* Add memory example in docstring
* Fix comment referring to CPUs instead of DIMMs
* splunk httpapi
Signed-off-by: Adam Miller <admiller@redhat.com>
* use he correct var to send the payload to the request
Signed-off-by: Adam Miller <admiller@redhat.com>
* Remove default use of paramiko connection plugin on macOS
This fix was originally to work around a bug that caused a kernel panic on macOS
that has since been fixed.
* Remove paramiko from requirements.txt
* Move paramiko checking to common place
* Drop the warnings obfiscation code
* Update pip installation instructions to reflect upstream instructions
* Fix tests on CentOS 6 (Python 2.6) that now show Python deprecation warnings
* Add changelog fragment
Fixes the functionality to group_by 'platforms'. Adds the call to self.refresh_platforms_lookup
back and fixes square brackets to return a list instead of a string.
* Created netbox_interface module and updated netbox_utils
* Updated documentation
* Updated descriptions to include type and argument spec to include required subtions of data
* refactored to use new shared functions create()/delete()/update()
* Fixed conflicts
* Added region to API_APPS_ENDPOINTS
* add asa_og module
* add test
* fix pep8
* fix some sanity pylint
* fix import error order
* fix import
* replace cmd() method
* rename file and class
* add mock for connection
* fix commands in replace test function
* fix lines list
* update unit test
* fix 'and' logic for port-object command
* restore previous unit test; fix pep8 and remove debug
* other unit tests
* Add state present, absent, replace
* Update doc; add default for state
* update unit test with state present/absent
* fix typo in unit test
* fix pep8 too many blank lines
* fix show run for service object ASA Ver 8.x
* Add description field; fix bug for state present and absent
* Re-designed module structure for network, service and port objects
* update integration test for new module structure
* fix pep8
* update EXAMPLES and RETURN
* update units tests
* fix module typos in unit test
* removed provider from examples
* fix missing comma in replace test
* fix module name and remove provider
* update license
* remove register; update license; change import order; chage def state
* remove shebang
* fix doc default state
* change import order
* Update year in banner
* fix integration test as set of tasks
* remove arg_spec
* remove extends_documentation_fragment: asa
* Update DOC, remove unused import, change import order
The controller's fixup_perms2 uses filesystem acls to make the temporary
file for copy readable by an unprivileged become user. On Python3, the
acls are then copied to the destination filename so we have to remove
them from there.
We can't remove them prior to the copy because we may not have
permission to read the file if the acls are not present. We can't
remove them in atomic_move() because the move function shouldn't know
anything about controller features. We may want to generalize this into
a helper function, though.
Fixes#44412
Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
* Created netbox_interface module and updated netbox_utils
* Fixed PEP issues and documentation issue for ASN type
* tenant API endpoint doesn't support slug currently, changed to name, fixed user issue
* Updated documentation to include types
* Updated argument_spec to include required sub options of data
* Fixed formatting of argument spec - missing parenthesis in data options
* Fixed syntax error
* refactored to use shared functions create()/delete()/update()
* Fixed PEP issues
* Be explicit with prompt inspection
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
* Use regex to evaluate prompt for sub-level config sessions
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
* Add new line at the end of file
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
* Paramiko might not come standard everywhere
There is a platform where paramiko isn't shipped but a special version
of paramiko just for our use is shipped. This code imports paramiko
from that location.
The host could have been either the inventory name (`inventory_hostname`)
or the discovered hostname (`ansible_hostname`)
Inspecting the source code of `fetch.py` shows that the
inventory name is preferred.
```
if 'inventory_hostname' in task_vars:
target_name = task_vars['inventory_hostname']
```
* Add new Redfish config modules to handle Dell-specific OEM extensions
- Extends the existing RedfishUtils class and leverages its methods
* Removed extra password key
* Add timeout parameter
* Updates to DOCUMENTATION section
- Removed version_added from several parameters
- Added type to category parameter
* Add new Redfish facts module to handle Dell-specific OEM extensions
- Extends the existing RedfishUtils class and leverages its methods
* Add timeout parameter
* Removed version_added for timeout paramater
* Fix error with get_manager_nic_inventory function
- Function was not updated when code to handle multiple systems was added
* More elegant way to put self.manager_uri in a list
* Add latest updates from FTD Ansible downstream repository.
- add a better implementation of the upsert operation;
- add API version lookup functionality;
- add filter which remove duplicated references from the list of references;
- fix minor bugs.
* fix issues outlined by ansibot
* fix argument name for _check_enum_method
* Return UnlockKey
* Add changelog fragment
* Add method to check if a parameter exists in diffs
* Add method to get swarm unlock key
* Add option unlock_key
* Only return unlock key when created or changed
* Rename difference check
* Extend unlock key example
* Assert that unlock_key is a string
* Fix docker_swarm_info authors
* Don’t silence APIErrors
* Test unlock_key on unlocked swarm
* Catch APIError when retrieving unlock key
* Better return value description
* Lint
* Fix UnlockKey return value documentation
Co-Authored-By: hannseman <hannes@5monkeys.se>
* Get unlock key safely
Co-Authored-By: hannseman <hannes@5monkeys.se>
* Return None on empty UnlockKey
* Assert swarm_unlock_key is undefined if unqueried
* Add documentation about swarm_info unlock_key
* Add change log fragment for unlock_key option
* Revert "Add change log fragment for unlock_key option"
This reverts commit e3cb2325b5.
* Use generator expression instead
* Restart docker more decisively
* Use systemctl kill
Co-Authored-By: hannseman <hannes@5monkeys.se>
* Try to restart docker daemon
* [openssh_cert] cleanup the returned certificate info
- Drop the certificate path - it is already present in rc.filename.
- Drop the leading whitespace for all lines.
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* [openssh_cert] add support for a certificate serial number
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* [openssh_cert] fix lint error
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* [openssh_cert] drop explicit default value
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* [openssh_cert] enforce the specified or missing serial number
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* [openssh_cert] passing no explicit serial number ignores any present one
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* cloudstack: remove choice list for hypervisor param
* cloudstack: streamline network_type with returned value by the API
* cloudstack: remove E326
* add changelog fragment
* Add win_hosts module
added win_hosts module for easier manipulation of hosts entries in "%windir%\system32\drivers\etc\hosts" for windows systems
* Update win_hosts.py
* Add alias support to win_hosts module (#1)
* win_hosts supports aliases
added support for adding / removing aliases from a host entry, rather than adding a new entry
added ability for win_hosts to detect aliases:
`192.168.1.1 alias1 alias2 alias3`
```
win_hosts:
host_name: alias2
ip_address: 192.168.1.1
```
will result in `192.168.1.1 alias1 alias3`
also includes `replace` and `add` as options for `ip_action` (`replace` is default)
for example:
```
192.168.1.1 my_reused_alias
192.168.1.2 my_reused_alias
```
with
```
win_hosts:
host_name: my_reused_alias
ip_address: 192.168.1.3
ip_action: add
```
the result will be
```
192.168.1.1 my_reused_alias
192.168.1.2 my_reused_alias
```
but with `ip_action=replace` the result would be
```
192.168.1.3 my_reused_alias
```
* fixed metadata version and version added
* fix line endings
* upload fixed line endings
try to upload the file with the fixed line endings
* aliases and canonical names are separate entities. added IPv4 and IPv6 validation
* only makes changes if "check_mode" is false
* improved behavior for duplicate aliases/entries.
* adding tests
* missing aliases file
* fix trailing whitespace and uses explicit paths
* Tweak tests to copy and restore original hosts file
* win_nssm: rename cmdlets to use approved verbs, rename service name parameters
* win_nssm: improve code style and cmdlets ordering
* win_nssm: always escape all command line parameters with Argv-ToString
fix error when the service name contains quotes
* win_nssm: use Fail-Json instead of exceptions and remove global try/catch
* win_nssm: small refactoring, inline some functions
* win_nssm: refactoring - add a generic cmdlet to idempotently set any nssm service parameter
* win_nssm: refactoring - inline some functions
To make the code more malleable for future changes
* win_nssm: change application, stdout_file and stderr_file options type to path
* win_nssm: deprecates app_parameters, rename app_parameters_free_form to arguments, and add support for list of parameters
* win_nssm: add support of check mode
* win_nssm: add working_directory option
* win_nssm: add display_name and description options
* win_nssm: minor changes
* win_nssm: remove some sanity exclusions
* win_nssm: avoid using aliases and minor style fixes
* win_nssm: doc and ui improvements
* win_nssm: remove sanity exclusions
* win_nssm: minor revision
* win_nssm: deprecates dependencies, start_mode, user and password parameters and some choices of state in favor of win_service
* win_nssm: fix style
* win_nssm: add executable option to specify the location of the NSSM utility
* win_nssm: add missing parameter types
* win_nssm: add diff mode support
* win_nssm: avoid displaying depreciation warning if default value is assigned
* win_nssm: fix variable scope
* win_nssm: use the explicit -LiteralPath parameter name instead of -Path
* win_nssm: fix documentation
* win_nssm: add porting guide entries
* win_nssm: add changelog fragment
* Fix wrong example, remove strictness and fix tests
It was obvious that (because of an incorrect example) people were using
the **xml** module incorrectly, specifying the `attribute` parameter
where it was not supported (i.e. ignored).
While this functionality would have been useful, it currently returns as
if the information was requested from the parent, so we cannot simply
make it to what would be expected.
Therefor the real solution is to provide a warning when we find
incorrect use, and deprecate this use. Then later we could implement
this functionality correctly.
While troubleshooting this issue, I found that in some cases our
integration tests were not being run when we expected it.
This fixes#53459
* Change warning
* Fix weird sanity test error
* Add a comment to the deprecate-test
* Initial commit for static route module
- Create and query functionality in place today
* Enabled querying both all routes and single route
* Bug fixes and idempotency check
- Requires new idempotency code to validate, blocking on that
* Enabled test cases
* Documentation fixes
* Whitespace fix
* Major improvements based on Dag's commments
- Improved documentation and examples
- Fixed fixed IP assignments and reserved range parameters
- Improved integration tests
- Made check mode work
* Rename str to string in documentation
* Move back to str
* Fix indentation
* Fix documentation for example of fixed_ip_assignments
- Removed default=None for args
* Add support for notes
* Add test for notes
* Device notes changes
- Renamed from notes to note
- Modified tests to work
* Comment device test since it only works once
* Remove assertion stanza and move assertion to existing one
* Add version_added to note documentation
* Converted from tabs to spaces
* Added changelog fragment
* Remove changelog file since it's a feature
* Add changelog fragment
When creating an ElastiCache redis cluster/instance via this module using a list of security group names (i.e. "FooSG") with `security_group_ids`, the module will fail to create the redis cluster/instance.
When using the security group ID (i.e. "sg-XXXXXXXX"), the cluster is created successfully. Tested with Ansible v2.7.8.
+label: docsite_pr
* Add Chassis commands IndicatorLedOn, IndicatorLedOff, and IndicatorLedBlink
* Add manage_indicator_led function to redfish_utils
* Add Chassis command category with IndicatorLedOn/Off/Blink commands to redfish_command
* Add IndicatorLedBlink example to EXAMPLES docstring, and make the category == 'Chassis' section more generic for future development
* basic plugin loading working (with many hacks)
* task collections working
* play/block-level collection module/action working
* implement PEP302 loader
* implicit package support (no need for __init.py__ in collections)
* provides future options for secure loading of content that shouldn't execute inside controller (eg, actively ignore __init__.py on content/module paths)
* provide hook for synthetic collection setup (eg ansible.core pseudo-collection for specifying built-in plugins without legacy path, etc)
* synthetic package support
* ansible.core.plugins mapping works, others don't
* synthetic collections working for modules/actions
* fix direct-load legacy
* change base package name to ansible_collections
* note
* collection role loading
* expand paths from installed content root vars
* feature complete?
* rename ansible.core to ansible.builtin
* and various sanity fixes
* sanity tweaks
* unittest fixes
* less grabby error handler on has_plugin
* probably need to replace with a or harden callers
* fix win_ping test
* disable module test with explicit file extension; might be able to support in some scenarios, but can't see any other tests that verify that behavior...
* fix unicode conversion issues on py2
* attempt to keep things working-ish on py2.6
* python2.6 test fun round 2
* rename dirs/configs to "collections"
* add wrapper dir for content-adjacent
* fix pythoncheck to use localhost
* unicode tweaks, native/bytes string prefixing
* rename COLLECTION_PATHS to COLLECTIONS_PATHS
* switch to pathspec
* path handling cleanup
* change expensive `all` back to or chain
* unused import cleanup
* quotes tweak
* use wrapped iter/len in Jinja proxy
* var name expansion
* comment seemingly overcomplicated playbook_paths resolution
* drop unnecessary conditional nesting
* eliminate extraneous local
* zap superfluous validation function
* use slice for rolespec NS assembly
* misc naming/unicode fixes
* collection callback loader asks if valid FQ name instead of just '.'
* switch collection role resolution behavior to be internally `text` as much as possible
* misc fixmes
* to_native in exception constructor
* (slightly) detangle tuple accumulation mess in module_utils __init__ walker
* more misc fixmes
* tighten up action dispatch, add unqualified action test
* rename Collection mixin to CollectionSearch
* (attempt to) avoid potential confusion/conflict with builtin collections, etc
* stale fixmes
* tighten up pluginloader collections determination
* sanity test fixes
* ditch regex escape
* clarify comment
* update default collections paths config entry
* use PATH format instead of list
* skip integration tests on Python 2.6
ci_complete
Currently, if we try to stop or start a network two time in a row, the
second call will fail. With this patch:
- we don't recreate a network, if it exists
- we only stop a network if it's active, and so we avoid an exception
saying the network is not active
* test: mock libvirt
* add integration tests for virt_net
* test: enable virt_net test on RedHat 7 and 8
* ci: use the unsupported alias
* tests that require privileged mode are run in VM
* virt_net/create raise unexpected libvirt exception
* import mock from units.compat
* virt_net: do not call create() on "active" network
* virt_net func test: only clean up the libvirt packages
* test: virt_net: don't use assert_called()
* virt_net: add the destructive alias
* move the test in virt_net dir
* test/virt_net: clean up the network at the end
* Add a force_replace_host flag to win_domain_membership
Satisfies https://github.com/ansible/ansible/issues/53539
* Rework backticks
* Bump version_added
* Check for existence of current hostname as well; use LDAPFilter during search
* Rename $force_replace_host to $allow_existing_computer_account
* Added docs, porting guide and minor nit in code
* Catch all request timeouts for winrm connection
The current implementation only catches 'ConnectTimeout' exceptions.
Instead we should catch 'Timout' which also catches ReadTimeout
exceptions.
Improves on: #51744
Co-Authored-By: westphahl <westphahl@gmail.com>
* Changelog for winrm error handling improvement
* win_shell: Implement option 'profile', allowing the user to control powershell profile sourcing before running a command
* Set version_added to 2.8
* Make sure profile directory exists before writing profile file
* Changes to make tests immutable and align with ps args