* When using ANSIBLE_JINJA2_NATIVE bypass our None filtering in _finalize. Fixes#41392
* Add tests for _finalize bypass
* Address python3 failures in tests
* pip tests: remove trailing spaces
* pip tests: use Jinja tests
* fixup! pip tests: remove trailing spaces
* pip tests: use 'command' instead of 'shell' module
* pip tests: remove unused variable
* pip tests: use a package with fewer dependencies
sampleproject has one dependency: 'peppercorn' and peppercorn doesn't
have any dependency.
* pip tests: check that 'name' param handles list
* pip: squash package parameters
Note that squashing will be removed in 2.11, new code should directly
use a list with the 'name' parameter.
* VMware: Allow user to select disk_mode
This fix allows user to select disk modes for given disk configuration
in the given VM.
Fixes: #37749
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Review comments
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Don't ignore a duplicate host for an already processed include, assume that the repetition indicates a new include. Fixes#40317
* Add intg tests to ensure duplicate items in loop are not deduped
* Add note about relative indexing
* Test case for missing permissions
* Update aws_s3 module to latest standards
* Use AnsibleAWSModule
* Handle BotoCoreErrors properly
* Test for BotoCoreErrors
* Check for XNotImplemented exceptions (#38569)
* Don't prematurely fail if user does not have s3:GetObject permission
* Allow S3 drop-ins to ignore put_object_acl and put_bucket_acl
* aws_eks: New module for managing AWS EKS
aws_eks module is used for creating and removing EKS clusters.
Includes full test suite and updates to IAM policies to enable it.
* Clean up all security groups
* appease shippable
* Rename aws_eks module to aws_eks_cluster
* Changed request() to run json.loads() instead of module doing it
- Removed json.loads() from modules
- Removed some unreliable integration tests
- Removed self.function setting in construct_path()
-
* PEP8 changes
* Remove debug line for push
* leave vmware_guest_powerstate tests enabled, but revert changes from: 66743f33
* leave VM poweroff tests enabled, but revert changes from: 87d6bdaf
* bumped 'vcenter-test-container' version to '1.3.0'
* updated test task names based on PR feedback
* Allow the use of 'aws:kms' as an encryption method
* Allow the use of a non standard KMS key
* Deduce whether AWS Signature Version 4 is required rather than specifying with a parameter
The compute policy was exceeding maximum size and contained
policies that already exist in ecs-policy.
Look up suitable AMIs rather than hardcode
We don't want to maintain multiple image IDs for multiple regions
so use ec2_ami_facts to set a suitable image ID
Improve exception handling
Fargate instances do not require memory and cpu descriptors. EC2 instances
do require descriptions. https://botocore.readthedocs.io/en/latest/reference/services/ecs.html#ECS.Client.describe_task_definition
Fargate requires that cpu and memory be defined at task definition level.
EC2 launch requires them to be defined at the container level.
Fargate requires the use of awsvpc for the networking_mode. Also updated,
the documentation regarding where and when memory/cpu needs to the assigned.
The task_definition variable for the awspvc configuration colided with
the ecs_service for the bridge network. This would cause the test to fail.
Add testing for fargate
Add examples for fargate and ec2
When using an empty string as the version argument, the module would
before attempt to run something akin to:
pip install module==""
This changes the behavior to:
pip install module
Fixes#41043
* Updating tower_job_template.py
* tower_job_template: Update parameter version_added to 2.7
* Ensure that unset credentials aren't passed
Passing empty strings for unset credentials causes ValueErrors as
the API expects an integer. Don't pass unset credentials
* tower_inventory_source: Add support for the inventory source via ansible-tower-cli.
* Add test coverage for tower_inventory_source.
* Update version_added to 2.7
* diff in as-path-set or prefix-set
* fix caveat diff can not have last line with comma in prefix-set/as-path/community-set
* Simplify fix to include indentation before parse
* remove debugger
* route-policy diffs
* fix iosxr_config crash issue
* new changes in iosxr_config after git add
* end-policy-map and end-class-map are properly indented so match misplaced children only when end-* is at the beigining also fix pep8
* Remaining config blocks of route-policy which needs exclusion from diff. added new tests
* pylint/pep8 warnings
* Review comments , sanity test fix
* shbang warning
* remove unused import
* Fix test-module failing to validate args
The test-module pass a wrong argument _ansible_tmp cause the validation failed.
Change the argument _ansible_tmp to _ansible_tmpdir to fix this.
* Add a integration test for test-module.
Prior to this change, we don't have a test for test-module.
This change ensure the correctness of test-module script.
* Support 'apply' to apply attributes to included tasks
* Cannot validate args for task_include
* Only allow apply on include_
* Re-enable arg validation, but only for include_tasks and import_tasks
* s/task/ir/
* Add tests for include_ apply
* Include context with AnsibleParserError
* Add docs for apply
* version_added
* Add free-form documentation back
* Add example of free-form with apply
* First pass at a src parameter that can be used in place of body. Supports binary files
* Add test for uri src body
* Bump version_added to 2.6
* Close the open file handle
* Add uri action plugin that handles src/remote_src
* Document remote_src
* Remove duplicate info about remote_src
* Bump version_added to 2.7
* Fixes ios_logging idempotency issues
* Added intergration tests & minor fixes
* Minor fixes in tests
* Minor fixes in tests #2
* eos_logging fixes after PR review
* Move k8s modules to dynamic backend
* update required openshift version
* update -> patch
* use new dynamic client exceptions
* style
* guard urllib3 import
* guard ansibleerror import
* give more information about error cause
* format in variable
* style
* rename tests
* Search for provided kind in a few more places to match old behavior, properly handle failure
* make common code use fail instead of fail_json, to work for lookup plugins as well
* update docs
* move openshift_raw tests into k8s tests
* fix typo
* Use diff of response and resource to determine change, don't do any checking client-side before making requests
* remove duplicate yaml blocks
* Update porting guide for k8s module
* remove invalid doc refs
* If fuzzy searching finds a resource, update resource_definition to match proper kind and version
* remote unsupported openshift_raw variables
* properly check environment variables when determining auth method:
* Remove 1.1.1.1 from *_config tests
* remove from *_smoke and *_system
* Miscellaneous other tests
* Remove from module documentation as well
* Remove from unit tests as well
* Remove accidental duplication from rebase
* Return the expected prompt character based on become status
* Update eos_banner tests for eapi
* Update eos_config tests for eapi
* Update eos_facts tests for eapi
* Update eos_interface tests for eapi
* Update eos_l3_interface tests for eapi
* Update eos_lldp tests for eapi
* Update eos_logging tests for eapi
* Update eos_smoke tests for eapi
* Update eos_system tests for eapi
* nxos_vlan fix
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
* uncomment mode test as nxapi now has get_capabilities
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
* Add nxos_install_os integration tests
* Update call to check timers
* Update check_ansible_timer method
* Modify network_cli integration tests
* Add timer check for nxos_install_os
* Add comments for clear_persistent_sockets
* Update connection info for tests
* More updates
* Restructure files for provider and non-provider testing
* Update env var name and add check for ISSU switchover
* Add support for `mysqldump`'s `--ignore_table` switch.
* Fix documentation and default linter warning re: default parameter
* Add number to replacement field in cmd string
* Bump version_added to 2.7
* Initial commit for meraki_admin module
* Initial commit for meraki_snmp module
* Update code to be operational for SNMP settings
- Add optional_ignore value to is_update_required for one-time fields
- Write documentation
- Perform checks and execute changes
* Minor fixes and test improvements
- Fix some documentation errors
- Implement and test for idempotency
* Removed meraki_admin which shouldn't be there, ansibot changes
* Rename params to be lower case
- Updated integration tests
- Changed CamelCase to lowercase and underscore
* Code cleanup changes based on comments from Dag.
* Port aws_ses_identity module to use AnsibleAWSModule
* Support Check Mode in aws_ses_identity
* Add tests for check mode
* Move feedback forwarding parameter check to before any changes are made.
* Fixed check_mode status to be the same as normal execution
* Now when setting the status to `disabled` in check_mode it correctly
returns the state changed and prints a warning like it does in normal
model. Before it always returned changed even if everything was set
correctly and a reboot was required.
* Add changelog entry
Co-authored by: Strahinja Kustudic <kustodian@gmail.com>
* Added interpreter parameter to the script module
* Let required and default parameters get documented implicitly for binary parameter
* Renamed interpreter parameter to executable
* The module now correctly sets the timezone in both the config file and
in /etc/localtime; while hwclock is set in both the config and
/etc/adjtime.
* Module checks if the timezone is actually set by checking
/etc/localtime. Before it only checked if it was set in the config file.
* Fixed module not setting the timezone on RedHat systems if
/etc/localtime was a symbolic link.
* Fixed module failures in case of missing config files or incorrect data
in them.
* Added a lot of integrations tests to cover most of these situations.
* cs_instance: implement host migration support
* fix build
* fail fast on update if user is not admin
* improve tests a bit
* expunge it
* fix typo
* disable temporarly verify for host on starting instance.
* Fix errors decrypted non-ascii vault vars
AnsibleVaultEncryptedUnicode was just using b"".decode()
instead of to_text() on the bytestrings returned from
vault.decrypt() and could cause errors on python2
if non-ascii since decode() defaults to ascii.
Use to_text() to default to decoding utf-8.
add intg and unit tests for value of vaulted vars
being non-ascii utf8
based on https://github.com/ansible/ansible/issues/37258Fixes#37258
* yamllint fixups
* Adding module for AWS Config service
* adding integration tests
* Split resource types into their own modules
* Properly use resource_prefix and retry on IAM "eventual consistency"
* Add config aggregator module
* AWS config aggregator integration test fixes
* AWS config recorder module
* Config aggregation auth rule
* Use resource_prefix in IAM role name
* Disable config tests
* Fix setting the cache when refresh_cache or --flush-cache are used
* Use jsonify function that handles datetime objects in jsonfile cache plugin
* Don't access self._options directly
* Add initial integration tests for aws_ec2 inventory plugin
* Add CI alias
* Fix and add a few more unit tests
* Add integration tests for constructed
* Fix typo
* Use inventory config templates
* Collect all instances that are not terminated by default
* Create separate playbook for setting up the VPC, subnet, security group, and finding an image for the host
Create a separate playbook for removing the resources
* Allow easier grouping by region and add an example
* use a unified json encode/decode that can handle unsafe and vault
* Refactor ec2_group
Replace nested for loops with list comprehensions
Purge rules before adding new ones in case sg has maximum permitted rules
* Add check mode tests for ec2_group
* add tests
* Remove dead code
* Fix integration test assertions for old boto versions
* Add waiter for security group that is autocreated
* Add support for in-account group rules
* Add common util to get AWS account ID
Fixes#31383
* Fix protocol number and add separate tests for egress rule handling
* Return egress rule treatment to be backwards compatible
* Remove functions that were obsoleted by `Rule` namedtuple
* IP tests
* Move description updates to a function
* Fix string formatting missing index
* Add tests for auto-creation of the same group in quick succession
* Resolve use of brand-new group in a rule without a description
* Clean up duplicated get-security-group function
* Add reverse cleanup in case of dependency issues
* Add crossaccount ELB group support
* Deal with non-STS calls to account API
* Add filtering of owner IDs that match the current account
* New module = AWS Glue connection
* Add a few initial integration tests
* Add alias for CI
* module rename
* finish module rename
* add loop when getting glue connection again so we dont get None
* Limit number of retries to get new glue connection info
* New ansible module netconf_rpc
* add integration test for module netconf_rpc
* pep8/meta-data corrections
* usage of jxmlease for all XML processing
separation of attributes "rpc" and "content"
* removed unused imports
improved error handling
* fixed pep8
* usage of ast.literal_eval instead of eval
added description to SROS integration test for cases commented out
* mismatch type between function arguments
* add testcase for prompt
* yamllint issues
* remove overwriting response in case of connectionError exception
* remove import of ConnectionError as it is not required
* add loadbalancer
* dict check nullable
* add default vallue when get list
* create backend addr pool
* fix the set
* fix to dict
* fix ideponement
* use param security group name when create
* nic can has no nsg
* add test
* fix
* fix
* fix
* add document
* add configuration
* fix
* fix
* remove all resources
* fix
* fix test
* add version added
* fix lint
* fix lint
* Fixes some NIC bugs (#39213)
* add loadbalancer
* dict check nullable
* add default vallue when get list
* create backend addr pool
* fix the set
* fix to dict
* fix ideponement
* use param security group name when create
* nic can has no nsg
* add test
* fix
* fix
* fix
* fix idemponet
* add document
* fix test
* add configuration
* fix
* fix
* remove all resources
* fix
* fix test
* add version added
* fix lint
* fix lint
* fix lint
* remove new feature and only submit bugfix
* remove useless test
* fix
* fix indent
* Update azure_rm_networkinterface.py
* fix comment
* support 3 types to specific name and resource group
* avoid test racing
* fix test
* add sample
* add resource id test
* win_updates: add scheduled tasks back in for older hosts
* Fixed up typo in category name error message
* Fixed up some minor issues after merge
* added changelog fragment
* Default to become but add override to use scheduled tasks
* Added basic unit tests for win_updates
* fix minor typos
* Return messages generated from edit_config to module
* This does not seem to work that way
* Change test IP addresses to not conflict with device config
* Set encrypted as default and fix empty password reporting changed
* Starting with Postgres 10 `UNENCRYPTED` passwords are removed and
because of that this module fails with the default `encrypted=no`.
Also encrypted passwords are suported since version 7.2
(https://www.postgresql.org/docs/7.2/static/sql-createuser.html) which
went EOL in 2007 and since 7.3 it is the default. Because of this it
makes a lot more sense to make `encrypted=yes` the default. This won't
break backward compatibility, the module would just update the user's
password in the DB in the hashed format and everything else will work
like before. It's also a security bad practice to store passwords in
plain text. fixes#25823
* There was also a bug with `encrypted=yes` and an empty password always
reported as changed.
* Improved documentation for `encrypted`/`password` parameters, and
removed some obsolete notes about passlib.
* Fix clearing user's password to work with all versions of Postgres
* Add tests for clearing the user password
* Fix documentation atfer rebase
* Add changelog fragment
* I seem to have forgotten the back half of tests
* Set http timeout from persistent_command_timeout
* Tweak URL generation and provide URL on error
* Push var_options to connection process
* Don't wait forever if coming from persistent
* Don't send the entire contents of variables to ansible-connection
* Fix all cases with pause and ctrl+c
- naked:
- pause:
- with prompt
- pause: prompt=hi
- time wait
- pause: seconds=60
- time wait with prompt
- pause: seconds=60 prompt=hi
Fixes#35372
* Use curses to control stdout
* Use curses to clear lines on interactive input
* Validate input for echo parameter and fail nicely if invalid
* Add integration tests for pause module using pexpect
* Use try except when trying to determine erase sequence to account for lack of TTY in containers in tests
* Improve output validation for regular paus test
* Accept two digit precision for pause length in test
* Check for seconds when seconds is specificed, minutes when minutes is specified
* Add test for no TTY mode
Co-authored by: Toshio Kuratomi <a.badger@gmail.com>
Co-authored by: Brian Coca <brian.coca+git@gmail.com>
* Add the ability to specify an install_dir to the gem module
* Add GEM_HOME when installing a non-global gem
* Add tests for custom gem path
* Fix sanity tests
* Add changelog entry
* Rebase and add tests for incorrect options
Co-authored by: Antoine Catton <devel@antoine.catton.fr>
* * Memset:
* module_utils and associated documentation.
* module to manage DNS zones.
* integration tests to run against Memset's API.
* * memset.py:
* remove import of requests from memset.py in favour of internal Ansible modules.
* import necessary Ansible modules for request and response handling.
* create a response object in order to retain a stable interface to memset_api_call from existing modules.
* rework memset_api_call to remove requests.
* memset_zone.py:
* improve short description to be more verbose.
* ensure all imports directly follow documentation.
* remove any reference to requests.
* correct keyerror carried over from elsewhere.
* remove dependency on requests from documentation string
* disable integration tests until we have a cleanup method available
* HTTPAPI connection
* Punt run_commands to cliconf or httpapi
* Fake enable_mode on eapi
* Pull changes to nxos
* Move load_config to edit_config for future-preparedness
* Don't fail on lldp disabled
* Re-enable check_rc on nxos' run_commands
* Reorganize nxos httpapi plugin for compatibility
* draft docs for connection: httpapi
* restores docs for connection:local for eapi
* Add _remote_is_local to httpapi
handle incorrect data type in list lookup plugin
Fixes#35481
test to ensure that loops properly handle incorrect datatypes
Signed-off-by: Adam Miller <admiller@redhat.com>
* - add tests for s3_lifecycle
- fix a bug comparing transitions with different storage_types
* make s3_lifecycle work with boto3
* add noncurrent version lifecycle rules
* Change behavior to behaviour
- use existing fact to get hash setting rather than shell task
- fix code highlighting syntax in playbooks_variables.rst
* Re-wrote intro section; this entire topic needs a clean-up/rewrite.
* Fix failing aws_ses_identity integration tests
Reduce boilerplate with yaml anchor
* remove unstable test alias
* Update feedback forwarding check to use desired state rather than
repeated API calls.
* uri: Add form-urlencoded support to body_format
This PR adds form-urlencoded support so the user does not need to take
care of correctly encode input and have the same convenience as using
JSON.
This fixes#37182
* Various fixes
* Undo documentation improvements
No longer my problem
* Fix the remaining review comments
* Allow negative values to expires to unexpire a user
Fixes#20096
(cherry picked from commit 34f8080a19)
(cherry picked from commit 54619f70f4)
(cherry picked from commit 8c2fae27d6)
(cherry picked from commit db1a32f8ca)
* tweaked and normalized
- also added tests, made checking resilient
Using Ubuntu 14.04, test fails because 'blkid' < 2.21 doesn't recognize
'ocfs2' filesystem smaller than 108Mo:
6baa150398
filesystem: fix MKFS_FORCE_FLAGS for ocfs2
mkfs.ocfs2 -F won't work because mkfs.ocfs2 asks for a confirmation:
$ mkfs.ocfs2 -F img
mkfs.ocfs2 1.6.4
Cluster stack: classic o2cb
Overwriting existing ocfs2 partition.
WARNING: Cluster check disabled.
Proceed (y/N):
The undocumented 'x' switch must be used too.
add new line and update choice documentation
adding description for ocfs2 support
use correct variable ansible_distribution to test ocfs2 with Debian
distribution
use ansible_os_family for Debian
increase ocfs2 fs size to 20M (minimal size 11 instead of 10M)
add ocfs2 support for module filesystem
Update setup.yml
delete trailing spaces
add ocsfs2 defaut var
Install ocfs2-tools for all linux
Testing ocfs2 on for Ubuntu - restrict blkid to be be done
* Add setup ignore_errors for nxos_config test
* Fix parse_fan_info for n3k
* Skip bidir tests for N3k
* Omit vni config for n3k
* Skip unsupported nxos_vrf_af test on N3K
* Add legacy N3K platform tag
* improved scaleset facts
* scaleset facts fix some errors
* adding version_added for format param
* trying to break lines
* fixed syntax
* small code restructuring
* fix syntax
* fixed now
* add new test to scaleset / scaleset facts
* make scaleset test more clear
* temporarily comment out...
* try to retrieve scaleset facts
* try to add postfix
* fixed mistake
* fixed problem when no loadbalancer attached
* fixed another bug
* fixed sanity and a few other
* fixed pep8
* another try
* changed ansible to curated
* updated tests
* updated example and a few other mods
* small fixes
* removed unnecessary pass
* removed some items from ignore.txt
* remove file added by mistake
* add aks module and integration tests
* linting
* update tests
* sanity check
* make some changes to AKS module
* make integration test work
* add fact
* add resource_group name
* add fact test
* fix test
* fix test
* linting
* changed line endings for facts
* output kubeconfig
* Update azure_rm_aks.py
* update integration test aliases
* update aliases
* add cloud_environment and auth_source to args
* Fix comments from Jborean93 (#3)
* update
* fix
* fix
* fix
* fix
* update doc
* fix
* Set src in the state functions rather than the toplevel
A good API should only require passing one version of a piece of data
around so do that for src
* Move the rewriting of path into additional_parameter_handling
When the path is a directory we can rewrite the path to be a file inside
of the directory
* Emit a warning when src is used with a state where it should be ignored
Fixes several bugs exposed in #34893
* Fixes relative path handling in copy so that it splits directories and
reconstructs the correct file path
* Return failed in the proper circumstances
* Initial commit
* Socket Timeout and dest file handler
* sftp handling
* module name change as per review
* multiple thread tmp file overwite problem
* Integration test suite for network_put
* add additional testcase for dest argument
* fix pylint/pep8/modules warnings
* add socket timeout for get_file
* network_get module
* pep8 issue on network_get
* Review comments
* New module for CRUD functionality of networks in a Meraki environment
- Relatively full integration test suite
- More functions to come
* Fix indent for PEP8.
- Look into why this didn't show on a local PEP8 test
* Dag requested changes.
- Removed a section in get_net as its backend isn't implemented
- Documentation modifications
* Improved integration testing and results
- Added get_org() function to return data for single org
- Added a lot of new integration tests
- Changed result now shows, still probably could be better
* Fix formatting errors for PEP8
* New module: ec2_vpc_vpn_facts
* Add integration tests for ec2_vpc_vpn_facts and the IAM permissions
* Add retry to VPC removal
* Use unique name for VGW
* Always clean up after tests and add retries
pip 10 gives exit code 1 for empty argument lists (pip < 10 gave exit 0)
see also https://github.com/pypa/pip/pull/4210
To still allow playbooks to pass when giving empty lists, don't call
pip in that case, but show a warning.
Check datatype of device instead of comparing them directly in
vmware_guest. Also, added testcases to check this behavior.
DPVG is not supported in current version vcsim
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* configurable list of facts modules
- allow for args dict for specific modules
- add way to pass parameters
- avoid facts poluting test
- move to 'facts gathered' flag
- add 'gathering' setting tests
- Works with the --remote option.
- Can be disabled with the --disable-httptester option.
- Change image with the --httptester option.
- Only load and run httptester for targets that require it.
* handle end-policy issue
* revert changes in iosxr cliconf
* fix trailing parents not included in difference
* Moving fix to platform specific fix
* pep 8 issues