* updates all vyos modules to use socket connection
* adds vyos local action handler
* adds exec_command() to vyos
* updates vyos_config local action
* update unit test cases
* add base class for testing vyos modules
* updates all ios modules to support persistent socket
* adds ios action plugin to connect to device
* adds exec_command() to ios shared module
* fixes ios_config and ios_template local action
* update all unit test cases
* adds base test module for ios module testing
* initial commit of cloudfront_facts.py
* modification as per review from @georgepsarakis
* fixed shippable build error
* fixed shippable build error
* removed wildcard imports and replaced with specific imports from ansible.module_utils.ec2 as advised by @georgepsarakis
* renamed all instances of cloud_front_origin_access_identity to origin_access_identity as advised by @georgepsarakis
* show facts based on alias and distribution id for easy referencing as advised by @ryansb. have done for both distribution and distribution_config
* fixed incorrect logic for default list_distributions, fixed list_distributions_by_web_acl - wasn't passing web_acl_id, fixed list_invalidations keyword args missing DistributionId
* fixed last fact added clobbering all previous facts for an alias or an id
* removed list_ prefix from list keys
* removed unnecessary boto fields. made list_distributions and list_streaming_distributions dictionaries with id/alias as key. fixed list_invalidations.
* initial commit of cloudfront_facts summary
* checks for empty list returned from boto, standardised list naming
* neatened up parameters
* added summary documentation
* refactoring of functions for modularity
* refactoring, neatening code, fix for if cname not present, added try-catch blocks
* more refactoring, cleaning
* more cleaning, allowed streaming distributions to be found by domain name alias
* removed unnecessary line
* fixed tabs
* fixed indentation
* removed trailing whitespace
* removed more whitespace
* more refactoring, modified where invalidations dict is set
* added ETag to summary
* refactored summary list
* moved list out of for loop
* trailing white space
* reverted line lengthening as advised by @willthames
* modified exceptions to multi line as advised by @willthames
* reverted variable spacing to be more pythonic'
* reverted spacing in YAML as advised by @ryansb
* reverted line spacing for parameters for correct blame attribution as advised by @ryansb
* removed white space
* more white space
* reverted line spacings for parameters as advised by @ryansb
* removed spaces between parameters as advised by @ryansb
* Avoid having module documentation links to itself
A lot of modules use M(own_module) in their documentation causing a link
in the documentation to itself.
* Make note more clear now
Add nsupdate module to manage DNS records on a DNS server
This uses dnspython library
It's greatly inspired by https://github.com/mskarbek/ansible-nsupdate with some rework, better feedbacks and documentation addition
Signed-off-by: nerzhul <loic.blot@unix-experience.fr>
* Make access_token type str, remove alias, and make validate_certs default value true
* Remove extra white space and add end of file newline
* Remove comma
* Try removing that whitespace again
* new module for private cert generation
* - changes based on the reviewer's comments
* - changes based on the reviewer's comments
* extra documentation per request
>>> timeit.timeit("uuid.uuid4()", setup="import uuid")
9.518647909164429
>>> timeit.timeit("get_unique_id()", setup="from __main__ import get_unique_id")
0.40436601638793945
This will mainly be beneficial when a very large inventory is being
used, however it may also help with some very large playbooks.
* Removing cmp to be compatible with Python3
* fix syntax
* Added an overlooked return
* Fixing making things overly complicated
* Simplifying since tags will always be hashable. Don't need to use cmp at all.
For F5 modules, the options that are commonly specified can
also be specified in the environment variables. This patch
adds the doc fragments that describe which env var goes
with which module option.
* Add swupd plugin
Add support for ClearLinux update manager (swupd)
Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
* swupd: Document RETURN values
Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
* swupd: Add a meaningful description for failures
Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
* swupd: Clarify documentation
Provide more information about the options supported by the module
since some concepts are new for people not used to clearlinux/swupd
Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
* Add NetApp SolidFire volume access group module
* Minor fixes
* Make requested changes
* Set supports_check_mode to True
* Add Ansible metadata
* Make requested changes
* Minor fix to documentation
* Add a surrogate_then_replace error strategy to keep to_bytes from tracebacking by default
* Port all code that explicitly used surrogate_or_replace to surrogate_then_replace
The default Package Manager for Solaris 11 has been set to the module pkg, but there is no such module. Instead pkg5 exists and will be used from now on.
* Initial version of aos_ip_pool module
* Add examples for IP Pool
* Break down ip_pool into smaller function
* Refactor do_load_resource
* Add get_display_name_from_file
* Add ‘src’ as an option to load ip pool from JSON file
* Rename directory network/apstra to network/aos
* Remove exception handling temporary
* Remove all ‘Exception as XX’ to be python 2.4 compatible
* Replace ‘== False’ with ‘is False’ for PEP8 Test
* Update documentation to be Yaml compatible
* Lisg all method imported from module_utils.aos
* Refactor to align with collection.find() changes
* Update examples by @gundalow’s recommendations
* Update Documentation per @gundalow’s recommendations
* Change the license per @gundalow recommendation
* Add exception handling for get_aos_session
* Change Auth format and add check_aos_version() to check minimum version
* Add a check for minimum version
* Refactor ‘src’ into ‘content’ to allow more options
Remove get_display_name_from_file in aos.py
Add content_to_dict in aos.py
* Fix variable name in do_load_resource
* Add mention of aos.py in module_utilities doc
* Add try/except for import yaml
* Add try/Except around main block of code and function
* Refactor to auto detect content_format, update doc accordingly
* Change create_new_ip_pool inputs
* Remove unused import
* Remove in_use as it’s never used
* Fix doc format
* Add version number in requirement doc
* Adding environment variable support for lambda.py in response to feature idea #20479.
Plus a 1-character bug fix.
* fix yaml syntax
* Fixing option name, adding alias, and fixing a line to allow the user to delete environment variables by setting an empty dict.
* Fix NetApp doc_fragment
* Add NetApp SolidFire Snapshot schedule manager module
* Minor fixes
* Change supports_check_mode to True
* Fix PEP8 issue
* Make requested changes
* Change 'pause' to 'paused'
* Add schedule ID as a returned parameter
* Make requested changes
* replaces persistent connection digest with _create_control_path()
* adds _ansible_socket to _legal_inputs in basic.py
* adds connection_user to play_context
* maps remote_user to connection_user when connection is local
* maps ansible_socket in task_vars to module_args _ansible_socket if exists
* Windows: Add Warn() and Deprecate() mechanisms
Similar to what already exists for python modules.
* Turn deprecations from list of strings, to list of dicts
Since #20884 the internal representations of deprecation messages is
changed from a list of strings to a list of dicts.
* Rename to Add-Warning() and Add-DeprecationWarning()
Implemented as discussed.
* Refactor dimensiondata_network to use shared base class for common functionality.
* Experiment: remove the assignments in the "except ImportError:" block that keep PyCharm happy. If this fixes the build, then I reckon there's a bug in the validate-modules script (https://github.com/ansible/ansible/blob/devel/test/sanity/validate-modules/validate-modules#L322).
* Remove unused imports.
* Changes based on feedback from @gundalow for ansible/ansible#21043.
- Use no_log=True for mcp_password parameter.
- Collapse module parameter definitions.
* Use shared definitions and doc fragments for common module arguments (ansible/ansible#21043).
* Make default network plan "ESSENTIALS", rather than "ADVANCED" (this is consistent with our other tooling).
Tidy up module parameter documentation.
* Simplify dimensiondata module documentation fragments (didn't know you could include multiple fragments).
* Change 'verify_ssl_cert' module parameter to 'validate_certs'.
* fix#19487
* add 'version_added'
* Check for version compatibility, Ignore keys if incompatible
* add comment about version support
* remove 'type' as requested
* fix merge error
* Don't check for var._obj in template._clean_data
AnsibleUnsafe or other unsafe vars used to have a
'_obj' slot but no longer do. This was causing attribute
errors if a object was 'unsafe' but not a string.
Add tests for AnsibleUnsafe, lookups, and AnsibleContext
* Fix 'yum skips updates' bug
When the 'yum check-update' output is parsed, the regex used
to stitch wrapped lines together would fail on the first package.
It would fail because there is an empty line before the first
package, and this triggered the regex. To avoid a more complicated
regex, preprocess the check-update output to strip out any
empty lines.
The regex is also updated to include a group on the non whitespace
match to be used in the sub.
Add test cases based on info provided in the bug reports.
Fixes#20608
In 159aa26b36
the result of _get_serialized_branches when no hosts were matched
changed from [[]] to []. Thus, the v2_playbook_on_no_hosts_matched
callback would not fire. Change the check so we get the error message
again. Fixes#17706
* known_hosts: support --diff
* known_hosts: support --diff also without --check
* Add unit tests and fix incorrect diff in one corner case
Tests are good!
* Refactor for readability
* Python 3 compat
* More Python 3 compat
* Add an integration test for known_hosts
* Handle ssh-keygen -HF returning non-zero exit code
AFAICT this is a bug in ssh-keygen in some newer OpenSSH versions
(>= 6.4 probably; see commit dd9d5cc670):
when you invoke ssh-keygen with -H and -F <host> options, it always
returns exit code 1. This is because in ssh-keygen.c there's a function
do_known_hosts() which calls
exit (find_host && !ctx.found_key);
at the end, and find_host is 1 (because we passed -F on the command line),
but ctx.found_key is always 0. Why is found_key always 0? Because the
callback passed to hostkeys_foreach(), which is known_hosts_hash(),
never bothers to set found_key to 1.
* This test does not need root
* Avoid ssh-ed25519 keys in sample known_hosts file
Older versions of OpenSSH do not like them and ssh-keygen -HF
aborts with an error when it sees such keys:
line 5 invalid key: example.net...
/root/ansible_testing/known_hosts is not a valid known_hosts file.
* Fix Python 3 errors
Specifically, the default mode of tempfile.NamedTemporaryFile is 'w+b',
which means Python 3 wants us to write bytes objects to it -- but the
keys we have are all unicode strings.
* Avi Networks Ansible modules.
Avi Version: 16.3.4
* Fixed Review comments
1. Changed description to be full sentences
2. Fixed Pep8 warnings.
3. Fixed comments and descriptions.
* 1. Fixed descriptions and messages as per review comments.
2. Added descriptions for the missing parameters.
* Fixed the shippable break due to the incorrect description format
* Removed the extra modules so that there is a single module for the first commit
* Updated license to BSD based on review comments
* updated comments based on review feedback
* Refactored code to handle POST and PUT scenarios where playbook does not need to check whether object is present.
Moved ansible helper utilities to module_utils as now roles can be patched with module_utils as well.
* fixed pep8 warnings
commit fails for devices with no candidate config, such as when configuraion is written to running-config store. Commit is set to True in main's call of netconf_edit_config. The simple edit is to add the additional logic around sending the commit. Otherwise you could change commit could be set to (if ":candidate" in m.server_capabilities) in the call of netconf_edit_config. Either way would work. I'll defer for the decision of which.
* cloudstack: cs_portforward: implement vpc support
* cloudstack: cs_portforward: add vpc and network to returns
* cloudstack: cs_portforward: networkid must not be used for rule listing
* cloudstack: fail for get_network when vpc but no network name
This seem to be a global pattern for get_network, we want to enforce a
network name to be set if a vpn param is given.
This is used for cs_portforward.
* cloudstack: cs_portforward: doc: fix defaults for vpc, network
Fixes#20754.
Details: UbuntuSourcesList.add_source() had a quick check for PPAs being
already present in the source lists. The check was looking for the PPAs
URL to be present in self.repo_urls, which should contain all valid and
enabled repositories.
The enabled check in repo_urls was incorrect. It was checking the tuple's
2nd item (which means "valid") and ignoring the 3rd item (which means
"enabled").
self.files contains tuples (line_number, valid, enabled, source_line,
comment_text). Ideally it would be using named tuples instead of
indexing, to avoid bugs like that, but Python 2.4 didn't have named
tuples, so we can't do that (yet).
* Make unused redhat_subscriptions do something
rhsm_baseurl/server_insecure were module params that were
never used previously. Hook them up for register options.
* pep8/style cleanups
* Set a module scope SUBMAN_CMD before we ref it as a global
* move ansible imports to top, remove '*' imports
* remove redhat_subscriptions from pep8 legacy
* Reminder that lookup(‘file’) can be used
Sometimes the block of text does not easily fit into a playbook, so this acts as a reminder (or a prompt for anyone who hasn't used this before) that the content could be stored in an separate file.
I've also included `backup: yes` as I think this is a good example of where a backup might be needed.
* Correct the not so "smart quotes"
* Update blockinfile.py
Replace – with an an ASCII -
- centralized skipping
- also fixed module name broken by previous refactor
- let action modules handle async processing
- moved async into base action class's module exec
- action plugins can now run final action as async
- actually skip copy if base skips
- fixed normal for new paths
- ensure internal stat is never async
- default poll to 10 as per docs
- added hint for callback fix on poll
- restructured late tmp, now a pipeline query
- moving action handler to connection as networking does
- fixed network assumption invocation is always passed
- centralized key cleanup, normalized internal var
- _supress_tmpdir_delete now in _ansible_xxx and gets removed from results
- delay internal key removal till after we use em
- nicer tmp removing, using existing methods
- moved cleanup tmp flag to mking tmp func
* Add Check Mode capability to kernel_blacklist module
* Add suggested changes from @tmshn
* Pass a bool into `Blacklist` that'll just be `module.check_mode`
* Move detection and creation of a file to a separate function within `Blacklist`
* If there's no file on the system and we are running under `Check Mode`, set `self.filename` to `os.devnull` AND mark a change, as the module would have created an empty file.
* Whenever a `self.filename` is being opened in a mode where changes can be made, replace with an if statement that checks `self.checkmode` and if true then open up `os.devnull` instead
* Move gather_facts action outside of vmware_guest module
* Move facts gathering method to vmware.py library
* vmware_guest use some vmware.py library methods
* vmware.py lib: fix some PEP 8 issues
* Move snapshot actions to vmware_guest_snapshot
* Move common snapshot facts to vmware.py library
* the `only_update` param description was kinda vague:
* either install if not installed
* or upgrade if installed
* or both!?
* as a result, remove the "install" statement from this sentence
Resolves:
Related:
Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
If same config hierarchy is set and deleted in one playbook
for delete statement add support to check if the config is present
on device or in the playbook. If it is present add delete statement in
updated config list.
* added docs for vault and made trigger shorter: !vault
* added single var valuting
* Update playbooks_vault.rst
Edit pass for spelling and grammar. Ship it!
* Update playbooks_vault.rst
Typo fixes.
At the moment, this change will use EPoll on Linux, KQueue on *BSDs,
etc, so it should alleviate problems with too many open file
descriptors.
* Bundle a copy of selectors2 so that we have the selectors API everywhere.
* Add licensing information to selectors2 file so it's clear what the
licensing terms and conditions are.
* Exclude the bundled copy of selectors2 from our boilerplate code-smell test
* Rewrite ssh_run tests to attempt to work around problem with mocking
select on shippable
Fixes#14143
* returns support for prompt/response over cli
* now sends native dict instead of str command
* fixes issue with run_commands() in ios to jsonify request
* updates unit test cases
* Make the module_utils path configurable
* Add a config value to define the path site module_utils files
* Handle module_utils that do not have source as an error
* Make an integration test for module_utils envvar working
* Add documentation for the ANSIBLE_MODULE_UTILS config option/envvar
* Add it to the sample ansible.cfg
* Add it to intro_configuration.
* Also modify intro_configuration to place envvars on equal footing with
the config options (will need to document the envvar names in the
future)
* Also add the ANSIBLE_LIBRARY use case from
https://github.com/ansible/ansible/issues/15432 so we can close out
that bug.
* Check for the prompt as a substring of the output
sudo sometimes spits out warnings to stdout before getting to the
password prompt. Account for that when trying to match a password
prompt.
Fixes#20858
We need to use ssh_executable instead of hardcoding ssh in the command
we run but we need to use "ssh" when we lookup the value of the
{command}_extra_args variable. Do this by leaving binary as "ssh" and
only expanding when we place it into b_command.
Fixes#20862
* cloud: ovirt: add snapshots module
* Move imports in ovirt_snapshots module to match style & pass CI
* Move ovirt_snapshot_facts imports to comply w/ CI
* Update validate-modules
* Validates ANSIBLE_METADATA
* Ensures imports happen after documentation vars
* Some pep8 cleanup
* Clean up some left over unneeded code
* Update modules for new module guidelines and validate-modules checks
* Update imports for ec2_vpc_route_table and ec2_vpc_nat_gateway
* cloud: ovirt: add function to get id by name
* cloud: ovirt: add instance type parameter
* cloud: ovirt: use param method instead of module.params
* cloud: ovirt: use 'and' at begging of next line
* cloud: ovirt: add description parameter to vms module
* cloud: ovirt: add comment parameter to vms module
* cloud: ovirt: add timezone parameter to vms module
* cloud: ovirt: add serial_policy parameter to vms module
* Rename vyos2 over vyos
* Update vyos_config to LocalAnsibleModule
Change result key 'updates' -> 'commands'
vyos_config is supported by core
* vyos_config tests
* Enable bracket config use
* Sanitize config before use
Boolean options that default as `None` but are set to `False` by the user were ignored on update. This change checks to distinguish None & False so that options like multi_az can be turned off during an update.
* Modifying how optional parameters are handled in rds.py. Fixes#20370
Allowing options to be set to false/no. Previously ignored unless set to true/yes.
Added a conditional for invalid parameters since the default is false instead of null for some options (e.g. force_failover, apply_immediately, upgrade).
* Making requested revision.
* win_shortcut: Add missing $check_mode definition
For some reason this entry was missing, possible a merge-conflict gone
wrong :-(
* Added integration tests and bugfix
Add missing changes.
Those "unused" doc fragments are still referenced
lib/ansible/modules/network/eos/eos_config.py:extends_documentation_fragment: eapi
lib/ansible/modules/network/eos/eos_facts.py:extends_documentation_fragment: eos
This reverts commit 246cd041d8.
* Disassociate subnets from route tables before deletion
If a route table still has subnets associated with it, it will fail
to delete:
```
"msg": "The routeTable 'rtb-abcd1234' has dependencies and cannot be deleted."
```
Avoid this by disassociating subnets before route table deletion
* Fix ec2_vpc_route_table flake8 complaints
* Check if EIP exists before deleting it
After deleting the NAT gateway, the EIP sometimes seems to
cease to exist afterwards. Check if it exists before deleting it.
Otherwise you get:
```
Failed to release EIP eipalloc-abdc1234: An error occurred (InvalidAllocationID.NotFound) \
when calling the ReleaseAddress operation: The allocation ID 'eipalloc-abcd1234' does not \
exist", "success": false}
```
* Fix flake8 errors with ec2_vpc_nat_gateway
* A method to validate and alter the ssh control path automatically.
* First tries %C to use the shortened hash
* On further failure, it removes section by section from the original path
* Fix hostname
* Implement bcoca's suggested changes
* Remove unused option
* Remove unused class var
* Use to_string to avoid unicode error
* Switch from to_text to to_bytes
* Update the example config for the new controlpath feature
* [GCE] External IP Address Module.
This module allows users to create and delete External IP Addresses. Both Regional and Global Addresses are supported.
* Removed whitespace causing pep8 issue
* added ec2_vpc_igw_facts module
* added cr at end of file
* corrected import json in wrong location
* corrected version added
* added snake_case conversion
* updated documentation and fixed for python 3'
* ec2_vpc_igw_facts: simplify logic
Make module arguments more 'Ansiblish'
Remove unnecessary intermediate variables in results generation
Use `ansible_dict_to_boto3_filter_list` rather than duplicating logic
Use `check_mode` rather than pass a `dryrun` argument
Update for flake8 improvements
* updated documentation
* # This is a combination of 6 commits.
# The first commit's message is:
new module to import software or configuration file onto firewall
# This is the 2nd commit message:
changes based on the review comments; remove unecessary if statements; change returned value docstring
# This is the 3rd commit message:
empty checkin to trigger ANSIBLEbot
# This is the 4th commit message:
added additional exception handling
# This is the 5th commit message:
- added new module info to the changelog as requested
# This is the 6th commit message:
removed blank space as tox checks were failing
* new module to import software or configuration file onto firewall
* Support logical or condition in required_if
Add logical 'or' condition support in 'required_if'
for requirements.
* If requirements is a list all parameters within it should
be present.
* If requirements is a set atleast one parameter should
be present
* Fix review comment
* Remove monkeypatching of rhn config in rhn_register
rhn_register.Rhn() was doing some complicated monkeypatching of
the up2date_client.config.Config() class to add a default config
value. Since that was only used in one place, remove the monkeypatch
and handle the single default case.
That case was 'server_url' option, so replace it with a Rhn.server_url
property. Also handle the error case when no server url is provided.
* refactoring
* flatten some indention levels
* add 'enable_eus' to module doc
* set enable_eus var and use it directly
* style/pep8/etc cleanups
* some import cleanups
types was unused, os/re were from module_utils * import
* remove * import from module_utils.redhat
* remove * imports from module_utils.base
* remove unused Rhn._subscribe method
* cleanup pep8 style stuff
* remove a unused default mutable arg from Rhn.subscribe
Rhn.subscribe() only gets called in one place, and thats
with channels from module_params which default to [] and
are typed as a list.
Update exception handling, remove use of iteritems
Update for better flake8 compliance
Use ansible_dict_to_boto3_filter_list rather than
duplicating its implementation
This version just gets the relevant paths from PluginLoader and then
uses the existing imp.find_plugin() calls in the AnsiballZ code to load
the proper module_utils.
Modify PluginLoader to optionally omit subdirectories (module_utils
needs to operate on top level dirs, not on subdirs because it has
a hierarchical namespace whereas all other plugins use a flat
namespace).
Rename snippet* variables to module_utils*
Add a small number of unittests for recursive_finder
Add a larger number of integration tests to demonstrate that
module_utils is working.
Whitelist module-style shebang in test target library dirs
Prefix module_data variable with b_ to be clear that it holds bytes data
added better way of adding warnings to return data
backwards compatible if warnings key already exists
added deprecations made iface more generic
changed to enforce type per item
added logging of warnings/deprecations
also display deprecations by default
Prescribing types is not necessary as the underlying shade library
does not do so, and the Neutron API will inform us if a disallowed
or non existent type is used.
Fixes#20830
* Add support for additional properties when creating new VMs.
All vmadm(1M) options except those specific to SDC(-docker)
are now supported.
* Mark password options as no_log
Change-Id: I9dfd80e7ba5ecfc8f45ecfbe9ec098e66647e9a4
* Set ansible_os_family to 'ClearLinux'
* Set ansible_distribution to 'ClearLinux'
* Add swupd.py plugin
Fixes#20824
Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
This prevents an exception from occurring when an image has no name. While images normally have names it is possible, at least on older versions of Docker, for an image to "lose" its name during a failed `docker rm`.
* Fix service's exec_command() for python3
exec_command() was mixing text and bytes in several places on python3.
Made changes so that we explicitly convert between the two.
Fixes#20818
* Also handle basestring and shlex.split in a python2/python3 compatible fashion
* Cleanup fork
* Add bigmon_policy module
* Remove docker files from commit, fix formatting, add CHANGELOG.md entry
* Put change in CHANGELOG.md in alph order and add the alias to access_token doc
* Fix access_token type, drop the alias, and fix doc
* Capitalize letter, delete redundant notes, make validates_certs True by default
* Add validate_certs to example
* Try fixing trailing space
* Try adding a trailing space
* Try removing trailing space at end of file
* Add newline at end of file and fix trailing space
* provides declarative resource for configuring eos system parameters
* supports network_cli connection plugin only
* adds unit tests for module using mock interfaces
* adds send_config function to handle pushing configuration commands
* adds support for handling multiline banner commands
* adds env var check to enable or disable config sessions
The following changes have been made:
- Added check-mode support
- Added parameter type support
- Replace PSObject by a normal dictionary
- Improve idempotency (only when $dest is provided it is not idempotent (yet)
I intended to update the documentation, but it appears the website docs
are behind the actual documentation (as the website doesn't show the
default values for booleans).
So I ended up adding the missing -type "path" and use the default $null
value for undefined parameters.
The following playbook:
```yaml
- hosts: localhost
tasks:
- file:
path: /tmp/non-existing-foo-bar
state: absent
recurse: yes
```
causes this error:
```
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "recurse option requires state to be 'directory'", "path": "/tmp/non-existing-foo-bar", "state": "absent"}
```
The included fix ensures that when recurse is added, we no longer assume
it is a file, but accept that it is a directory.
- Harmonize the name $params like most modules
- Use `return` consistently for return values (easier to read)
- Implement Get-AnsibleParam internally using -type "bool"
- Use a dictionary for $result
* update eos_config to use eapi exclusively and remove cli transport
* add unit test cases for eos_config
* updates action plugin to handle both eapi and network_cli connections
* Added support for a gce_snapshot module for managing snapshots in the Google Cloud Platform
* Fixed using sys.exit in favor of fail_json. Followed the pattern in gce_pd
* Fixed using sys.exit in favor of fail_json. Followed the pattern in gce_pd
* Fixed an issue when dealing with multiple disks. Added a bit more documentation explaining the disks argument
* Corrected a typo in the multi-disk snapshot example
* Updated module to return list of changed snapshots instead of just a message. Added a RETURN block
* include source file in error message
* win_copy: Fix for idempotency
This patch fixes an idempotency issue with win_copy. Without this patch
files would always be considered changed (unless the copy operation failed).
It also fixes the resulting output cfr. what was deocumented.
Small improvements:
- Remove obsolete comments
- Use $check_mode instead of my own $_ansible_check_mode
- Renamed "default" window style to "normal" (as is used by Windows
documentation)
- A fix for check-mode support (when state=absent)
* eos module now uses network_cli connection plugin
* adds unit tests for eos module
* eapi support now provided by eapi module
* updates doc fragment for eapi common properties
* Fixed issue in gce_net with firewall rules that have protocols that do not have ports.
* Fixed elif in gce_net to include check of the ports variable.
* Google Cloud Pubsub Module
The Google Cloud Pubsub module allows the Ansible user to:
* Create/Delete Topics
* Create/Delete Subscriptions
* Change subscription from pull to push (and configure endpoint)
* Publish messages to a topic
* Pull messages from a Subscription
An accessory module, gcpubsub_facts, has been added to list topics and subscriptions.
* Added docs for state field to DOCUMENTATION and RETURN blocks.
`force` option is not unique for non-activationkey registrations and it should
be parsed separately; it is possible to register host with activation key and
force such process.
* redhat_subscription: enforce the need for org_id when AK is used
also update the documentation to reflect that
Fixes: #20542
* redhat_subscription: check for existence of subscription-manager
After merging the latest update, these were the few remaining
differences with upstream.
(Plus the previous proposed fast match based on unique VM name which is
not longer needed)
- get rid of changed, rc, stderr, stdout juggling
- use get_bin_path() to get 'imgadm' path
- move actual implementation to Imgadm class
- fix 'changed' for imported images
Without this patch, the os_keystone_domain module is not idempotent if
the description is empty because the description parameter is None in
ansible, but the keystone client returns an empty unicode string.
Following the example of other OpenStack modules, this patch fixes the
issue by checking whether the module parameter is None before going on
to check its value.
Instead of populating the platform comment in the default
meta/main.yml with a dict of platforms fetch from the
galaxy REST API, this removes the API call and adds a
commented out example platforms list to the default meta/main.yml
Fixes#18103
The following changes have been made:
- Added check-mode support
- Added diff support
- Corrected HCCC to HKCC (according to windows documentation)
- Updated documentation, and examples
- Added -aliases support to module_utils/powershell.ps1
- Renamed `key > value > data` to `path > name > data`
- Re-indented code and consistency changes
- Added support for expandstring type
This fixes#20595
when using "state: link", and particularly when using
"force: yes".
Symbolic link resolution can be expensive. In our case,
the symbolic links are legacy links to automounts, and
the "file" task was causing all of the legacy links to
be traversed and mounted on every host every time the
task executed, even when the links were correct and there
was nothing to do.
This change avoids the system calls that perform the
symbolic link resolution by taking advantage of the short
circuit behaviur of the boolean "and" operator. The code
behaviour is unchanged except that it no longer performs
unnecessary system calls.
As it turns out, this change is not sufficient to fully
solve the symbolic link resolution problem, as the "file"
module still performs a stat() at the end of execution to
provide the caller with information about the file.
However, this change is very simple, it will eliminate
unnecessary system calls in a number of use cases, and it
gets the "file" module closer to the desired end result.
* update instance image with Debian 8 Jessie
* debian-7 is marked as "DEPRECATED" in Google Compute Engine Images
* as a result, by default use `debian-8` Jessie
Resolves:
Related:
Signed-off-by: Daniel Andrei Minca <danielandrei.minca@gameloft.com>
* update docs regarding latest stable default image
* after speaking with @gundalow, we decided it's better for the users to
know that the default image will follow latest stable debian by GCE
Resolves: #20558
Related:
Signed-off-by: Daniel Andrei Minca <danielandrei.minca@gameloft.com>
self.instance may be overwritten before the user data comparsion which result in a false positive changed state.
With this commit, we make sure we have the userdata when we need to.
* new AWS module for ec2 VPC vgw facts
* fixed documentation as suggested by reviewers
* changed iteritems to items for py 3
* improvements to bring in line with #19787
* corrected documentation
* updated doco and exception path
* win_psexec: execute cmds on remote systems as any user
This module uses the versatile psexec tool to run any command remotely
as any user (incl. domain users).
* Add missing documentation
Now that this module is deemed acceptable for inclusion,
the documentation is an essential part.
* win_psexec: Small cosmetic changes
* win_psexec: add more options (priority, elevated, ...)
* Fixes after more testing
* Renamed 'cmd' to 'psexec_command' + more
- Also replaced PSObject() with a hash table
- Made $chdir of type "path"
- Renamed $args to $extra_args
* Various improvements
- Switched to using booleans for most parameters
- Added type 'bool' to boolean parameters
- Added 'interactive' parameter
- Added 'wait' parameter
- Added an interactive example
* Added -type "bool" support to Get-AnsibleParam
* Fix deadlock
* When using `wait:no` return code is PID of process
The same ssh key may be registered with different names. Before we only looked at the names and marked as changed when names differ. However internally cloudstack seems to ignore the change, if the fingerprints are identical.
As a result we also have to compare the fingerprints and only mark the keys as changed if the fingerprints differ.
* Fix git remote url change detection.
When comparing paths, unfrackgitpath must be called on both sides
of the comparison. Otherwise comparisons involving symlinks will
return incorrect results.
* Re-enable git test on OS X.
* Return None from unfrackgitpath when path is None.
Per official docker document, it support setting `--log-driver=none` to
disable any logging for the container. So let's add it to this module.
Fixes#5337
Per a change in jinja2 2.9, local variables no longer are prefixed
with l_, so this updates AnsibleJ2Vars to pull in all locals (while
excluding some) regardless of name.
Fixes#20063
(cherry picked from commit 4d49b317929b86e1fc1b0cbace825ff73b372dc7)
After much plumbing through the source code, python-gitlab and the Gitlab API I found out why I cannot update my ssh keys through this module - because it expects the user to have admin rights on the server. This could be made clearer in the requirements because the Gitlab API allows one to change his/her own profile, it's just that the module or the underlying library doesn't cover this use case.
* Add jinja2 groupby filter override to cast namedtuple to tuple. Fixes#20098
* Address some of the requested changes
* Quoting
* Print the python path and version
* Be less explicitly verbose, rely on implicit verbosity
* Deprecate ec2_vpc module
The deprecation of ec2_vpc module has been discussed for
2 years and is causing duplication of effort as changes
are implemented for ec2_vpc rather than for the newer
alternatives
* Improve module deprecation documentation
Update the developing modules documentation with the latest
instructions on how to deprecate a module.
* Windows: Fix documentation strings to be raw strings
Especially when using Windows paths they easily get confused as escaped
sequences or unicode characters. So by default use raw strings
This fixes#20295
* Fixed as hinted by @abadger
And some trailing whitespace fixes.
Rather than trying to enumerate tasks or track an ever changing cur_role
flag in PlayIterator, this change simply sets a flag on the last block in
the list of blocks returned by Role.compile(). The PlayIterator then checks
for that flag when the cur_block number is incremented, and marks the role
as complete if the given host had any tasks run in that role.
Fixes#20224
* New module for managing VMs and zones on SmartOS.
Currently allows for creating new instances and state changes.
Updating existing VMs is not supported yet
* Fix identation in DOCUMENTATION
* Add RETURN block
* Apply flake8 recommendations and split up main() into separate functions.
* Be more about the states this module accepts and trim the exposed list
* Be more verbose about states and the implications
* Fail with a more descriptive error messages than just 'stderr'
* Valid all UUIDs before exiting
* Incorporate feedback from bcoca
* Print field name that contains invalid uuid, not the value
* More changes as suggested by bcoca:
- drop save_payload completel
- make 'name' the options with an 'alias' alias
- use get_bin_path() for locating 'vmadm'
* Doc fixes
Change-Id: Ia23704c99d24b7782d8884fd22e11af61cef724c
* More fixes suggested by jtyr
Change-Id: Ia3e65277bf5a499651c70b096e2988d7cc9eceb5
* Drop local changed variable
Change-Id: Ia8beaa615ba4a47004d7af791c28a5a5855bcf61
* Use correct ANSIBLE_METADATA format
Change-Id: I51ded34e543005933c7c739501388e24e5f80c1d
* Re-indent RETURN
Change-Id: I0c266d7a83517be54fc6242dfb0496a0a480f628
* Fix documentation formatting for options and fix an unused variable
* Move imports to their original location again
* Fail if there's invalid json returned instead of trying to continue
* Betterer error handling for json.loads()
This patch add additional filtering of VNIC profiles by the cluster
parameter. It is a must, because there could be same names of the
VNIC profiles in system, as every datacenter can have VNIC profile
same name, which can be in other datacenter.
This patch fixes issue #20246
* Fixes: #3217 - Add a new parameter for the kms_key_id to the ec2_vol module.
* Fixes: #3217 - Correcting comment string as requested.
* Fixes: #3217 - Adding boto version when kms_key_id is used. Also re-adding accidentally removed comment line.
* Cleanup of EBS volume key pull request