updates to azure_rm_sqlfirewallrule
small fixes
move sql client to common
adding state
fixed sample
fixed sanity
fixed aliases
removed unnecessary object
removed unused resource_group
changed group to less crowdy
tags
no tags on firewall rule
* Add functions to retrieve the allowed and required parameters for boto3 client methods
* Add custom waiter for stopping an RDS DB instance
* Add rds_instance module
* Add rds_instance integration tests
* address requested changes from ryansb
* address requested changes from willthames
* address requested changes from dmsimard
* Fix final snapshots
Fix idempotence with already-deleting DB instances
Remove unused import from module_utils/aws/core.py
Consolidate function to get all boto3 client method parameters and the subset of required parameters
* Add some additional rds_instance integration tests
* Add some common functions to module_utils/aws/rds
* Move common code out of rds_instance
* Remove hardcoded engine choices and require the minimum boto3
* Document wait behavior
* Provide a list of valid engines in the error message if it is invalid
Add supported methods to whitelist
Remove AWSRetry around waiter
Wait for a less crazy amount of time
Remove unused variables
* Add a test for an invalid engine option
* pep8
* Missed adding a method to the whitelist
* Use retries
* Fix some little things
* Fix more things
* Improve error message
* Support creating cross-region read replicas
* Remove unused imports
* Add retry when getting RDS instance
* Soft-check required options so module fails properly when options are missing
* Fix mariadb parameter version
* Fix cross-region read_replica creation and tests
* fix modify tests
* Fix a modification test
* Fix typo
* Remove test for option_group_name that exists for this account but may not for others and added as a TODO to do properly
* win_wait_for_process: Add integration tests
* Disable reporting changes
* Added more tests checking PID
* Various improvements
This PR includes:
- Use Get-Process instead of CIM Win32_Process
- Rewrite of process filter logic (speedup)
- Fix error messages
- Fixes to documentation, examples and return output
* win_wait_for_process: Limit to PowerShell 4 and higher
* Improve RESULT documentation
* Last minute fixes for CI
* Catch Powershell exceptions
* Increase timeout to make tests more stable
* Make merge_type a list and apply merge_type in order
Allow use case of preferring strategic-merge and failing
back to merge, or just preferring a different merge type
* Improve k8s module test coverage
* initial source of the elb_target_facts module, which gathers all
registered ELBv2 target groups for a given instance id
* updating
* initial dump of tests
* updating docs, adding AWSRetry decorators
* updating tests
* More brush up, some refactoring
* updating for sanity tests
* removing extra space
* updating elb_target_facts to use a new name for the return value, not return a fact, and use instance variables for the AWS connections. updating tests to go along with that
* updating classes to be 'new-style' classes
- Fix comma separated list handling for package names
- Fix error message for unavailable/unknown package install attempt
- Fix pkg install result output generation
Signed-off-by: Adam Miller <admiller@redhat.com>
Email alerts can be enabled for an E-Series system to provide
information to interested users by email when a warning or critical
level event occurs on the system. This module will allow a system owner
to configure whether or not system alerts are enabled, and who will
receive them.
* New module for NTAP E-Series iSCSI Interfaces
Define a new module for configuring NetApp E-Series iSCSI interfaces.
* Improve netapp_e_iscsi_interface integration tests
Restructured integration test to set all iscsi ports to disabled, then
defines the ports either statically or with dhcp, next updates the ports
with the other definition type (static <-> dhcp), and lastly disables
all ports. Each netapp_eseries_iscsi_interface call is verified with the
array.
* Define NetApp E-Series ASUP module
ASUP, or Auto-Support, is a mechanism that allows NetApp support
to receive information on the status of E-Series storage-systems
in order to proactively resolve issues for customers. This module
gives customers the ability to tune ASUP settings to their liking,
including disabling the feature entirely.
* Improved testing for netapp_e_asup module
Added coverage and validation to asup integration and unit testing
* Working through tests and fixing dumb mistakes
* Fix sanity issues and tests. All G
* Correct type test for azure_rm_networkinterface
* azure_rm_networkinterface correct type comparison
* Post rebase cleanup
* Remove erroneous reference to dns_servers
There are multiple settings that are defined at a global level for
E-Series systems, but don't necessarily fit with anything else. This
module is intended to provide a place to encapsulate those.
* YUM4/DNF compatibility via yum action plugin
DNF does not natively support allow_downgrade as an option, instead
that is always the default (not configurable by the administrator)
so it had to be implemented
- Fixed group actions in check mode to report correct changed state
- Better error handling for depsolve and transaction errors in DNF
- Fixed group action idempotent transactions
- Add use_backend to yum module/action plugin
- Fix dnf handling of autoremove (didn't used to work nor had a
default value specified, now does work and matches default
behavior of yum)
- Enable installroot tests for yum4(dnf) integration testing, dnf
backend now supports that
- Switch from zip to bc for certain package install/remove test
cases in yum integration tests. The dnf depsolver downgrades
python when you uninstall zip which alters the test environment
and we have no control over that.
- Add changelog fragment
- Return a pkg_mgr fact if it was not previously set.
* Share the implementation of hashing for both vars_prompt and password_hash.
* vars_prompt with encrypt does not require passlib for the algorithms
supported by crypt.
* Additional checks ensure that there is always a result.
This works around issues in the crypt.crypt python function that returns
None for algorithms it does not know.
Some modules (like user module) interprets None as no password at all,
which is misleading.
* The password_hash filter supports all parameters of passlib.
This allows users to provide a rounds parameter, fixing #15326.
* password_hash is not restricted to the subset provided by crypt.crypt,
fixing one half of #17266.
* Updated documentation fixes other half of #17266.
* password_hash does not hard-code the salt-length, which fixes bcrypt
in connection with passlib.
bcrypt requires a salt with length 22, which fixes#25347
* Salts are only generated by ansible when using crypt.crypt.
Otherwise passlib generates them.
* Avoids deprecated functionality of passlib with newer library versions.
* When no rounds are specified for sha256/sha256_crypt and sha512/sha512_crypt
always uses the default values used by crypt, i.e. 5000 rounds.
Before when installed passlibs' defaults were used.
passlib changes its defaults with newer library versions, leading to non
idempotent behavior.
NOTE: This will lead to the recalculation of existing hashes generated
with passlib and without a rounds parameter.
Yet henceforth the hashes will remain the same.
No matter the installed passlib version.
Making these hashes idempotent.
Fixes#15326Fixes#17266Fixes#25347 except bcrypt still uses 2a, instead of the suggested 2b.
* random_salt is solely handled by encrypt.py.
There is no _random_salt function there anymore.
Also the test moved to test_encrypt.py.
* Uses pytest.skip when passlib is not available, instead of a silent return.
* More checks are executed when passlib is not available.
* Moves tests that require passlib into their own test-function.
* Uses the six library to reraise the exception.
* Fixes integration test.
When no rounds are provided the defaults of crypt are used.
In that case the rounds are not part of the resulting MCF output.
* including test case using environment variables as per issue #44163
* including missing environment variable in shared documentation fragement, related to issue #44163
* fixes parameters via environment variables, issue #44163
* Added nios_txt_record module
Whitespace cleanup and version fix
First stab at txt record integration test
Fix for CI version requirement
Added nios_txt_record module
Whitespace cleanup and version fix
First stab at txt record integration test
Fix for CI version requirement
force re-run
* added alias for cloud group1
* expend checksum format to <algorithm>:(<checksum>|<url>)
* continue to code at office
* ALPHA - expend checksum format to <algorithm>:(<checksum>|<url>)
* clean up tmpfile and comment
* try to add test code for 27617
* try to add test code for 27617
* try to add test code for 27617
* try to fix [Could not find or access 'testserver.py']
* fix test code [Could not find or access 'testserver.py']
* fix test code [add files dir]
* fix test code [files dir not exists]
* as [connection was closed before a valid response was received]
* [connection was closed before a valid response was received]
* [connection was closed before a valid response was received]
* add test item [sha1 and sha256]
* since [connection was closed before a valid response was received]
* fix [connection was closed before a valid response was received]
* fix test code typo
* add docs for #27617
* PR #43751 is minor change
* fix pep8 issue.
* fix test code style.
* fix unexpected quote
* Resolve issues in NetApp E-Series Host module
The E-Series host module had some bugs relating to the update/creation
of host definitions when iSCSI initiators when included in the
configuration. This patch resolves this and other minor issues with
correctly detecting updates.
There were also several minor issues found that were causing issues with
truly idepotent updates/changes to the host definition.
This patch also provides some unit tests and integration tests to help
catch future issues in these areas.
fixes#28272
* Improve NetApp E-Series Host module testing
The NetApp E-Series Host module integration test lacked feature test
verification to verify the changes made to the storage array.
The NetApp E-Series rest api was used to verify host create, update, and
remove changes made to the NetApp E-Series storage arrays.
* Update docs
* Add reboot action plugin
Refactor win_reboot so it is subclassed from reboot
* Use new connection methods
* Test fixes
* Use better uptime command for Linux
Use who -b to get the last time the system was booted rather than uptime, which changes every second.
* Use distribution specefic commands and flags
Query the managed node to determien its distribution, then set the appropriate command and flags.
* Tune debug messages a bit
* Update module docs with details about pre_reboot_delay
s docs
* Ensure that post_reboot_delay is a positive number
* Remove the stringification
* Add integration tests
* Make sure aliases are honored
* Handle systems that have an incorrect last boot time
SystemD and fakehw-clock do not properly set the
last boot time and instead always set it to epoch.
Use a different command if that is the case.
* Copyright and encoding fixes
* Minor fixes based on feedback
* Add exponential backoff to sucess check method
* Update integration test
Skip the integration test if it would try to reboot the control node. We need a new mechanism to account for this scenario in ansible-test, so tests must currently be run manually for this plugin.
* Update integration test
Skip the integration test if it would try to reboot the control node. We need a new mechanism to account for this scenario in ansible-test, so tests must currently be run manually for this plugin.
* Fail early with running with local connection
* Update docs based on feedback
* minor refactoring, state mgmt changes
The 'free' strategy still attempts to do all hosts per task before going to the next, it just doesn't wait for slow hosts,
This strategy processes each host as fast as possible to the end of the play before trying to process another host in the pool.
* Add (preview) diff mode support ec2_group
* Add diff mode to some ec2_group integration tests
* Remove unnecessary arguments and add comment to the module notes
* Add changelog
When creating a new account, check to see if the expiration parameter is negative and pass in the appropriate parameter. Since the negative integer passed into expires is converted to time.struct_time which in turn gets converted to a formatted time string when passed to the underlying command, a -1 or large negative number would result in passing a date before 1970-01-01 to the underlying command.
This had the opposite effect of creating an account with no expiration account resulting in a newly created account that was already expired, or just throwing an error on certain systems.
* gather_subset is a list of strings
When gather_subset is an integer, a message pointing out the problem, current tb error
is replaced by this one:
ERROR! the field 'gather_subset' should be a list of (<class 'str'>,), but the item '42' is a <class 'int'>
...
* gathering_facts test: ensure smart gathering is on
Extends `module_defaults` by adding a prefix to defaults `group/` which denotes a builtin list of modules. Initial groups are: `group/aws`, `group/azure`, and `group/gcp`
* add route module
* add test
* add table
* add route table
* fix dict
* fix
* fix
* route table accept no name
* add default
* fix
* fix
* fix
* fix pep
* support route table
* fix line ending
* fix pep
* fix
* fix
* set the default to 'None'
* make return value only id
* camel and snake
* set test alias
* change facts line ending
* change test
* fix
* add default
* fix
* fix line break
* remove unsafe args
* fix comment
* fix
* adding postgresql server facts
* updating postgresql server facts, minor changes
* changed return dict to list
* fixed test
* fixed several issues
* several updates
* fixed naming
* list -> complex
* try again
* fixed mistake
* added user_visible_state to the result
* added fully_qualified_domain_name
* fixed second test
* updates
* fixed test
* updated samples in return value
* wait for postgresql server to be actually ready
* another approach for test
* second server was not created
* fixing pr comments
* fix sanity
* removed forgotten ansible_facts
* added account_alias in the response of module aws_caller_facts
* added comment to explain list_account_aliases
* renamed caller_identity to caller_facts as the content is extended
* created changelog
* security-policy needs the iam:ListAccountAliases for this module to work
* test now checks for the added field account_alias
* gracefully handle missing iam:ListAccountAliases permission
* Added helper module for generating ACME challenge certificates.
* Soft-fail on missing cryptography. Also check version.
* Adding integration test.
* Move acme_challenge_cert_helper from web_infrastructure to crypto/acme.
* Adjusting to draft-05.
* The cryptography branch has already been merged.
* Use newer is_sequence function instead of MutableSequence. Fixes#44327
* Add changelog for #44331
* Update changelog fragment to describe the fix in more detail
Fixes#40650Fixes#40245Fixes#41541
* Refactor netconf_config module as per proposal #104
* Update netconf_config module metadata to core network supported
* Refactor local connection to use persistent connection framework
for backward compatibility
* Update netconf connection plugin configuration varaibles (Fixes#40245)
* Add support for optional lock feature to Fixes#41541
* Add integration test for netconf_config module
* Documentation update
* Move deprecated options in netconf_config module
* New boto3_facts module
boto3_facts aims to help users see whether their python and module
versions are as expected.
* Rename to `assert_python_requirements`
* Update integration tests
* Document options
* fix imports
* boilerplate
* fix docs
* reorder import
* Make distutils optional and fail gracefully when it is not available
* fix example doc
* fix docs on requirements_facts
One can install alternate packages managers on debuntu machines.
However, doing so doesn't mean you want to suddenly start using them.
Add in a check similar to the fedora yum/dnf check that sets apt as the
pkg_mgr if the ansible_os_family is Debian.
* Refactor yum and dnf, add feature parity
Signed-off-by: Adam Miller <admiller@redhat.com>
* remove unnecessary module_utils, move the classes into the module code
Signed-off-by: Adam Miller <admiller@redhat.com>
* remove yum -> yum4, out of scope
Signed-off-by: Adam Miller <admiller@redhat.com>
* use ABCMeta
Signed-off-by: Adam Miller <admiller@redhat.com>
* re-arrange run() caller vs callee
Signed-off-by: Adam Miller <admiller@redhat.com>
* make sanity checks happy
Signed-off-by: Adam Miller <admiller@redhat.com>
* fix yum unit tests
Signed-off-by: Adam Miller <admiller@redhat.com>
* remove unecessary debug statements, fix typo
Signed-off-by: Adam Miller <admiller@redhat.com>
* fix licensing and attribution in yumdnf module_util
Signed-off-by: Adam Miller <admiller@redhat.com>
* include fix from PR 40737
original commit 5cbda9658a
original Author: Strahinja Kustudic <kustodian@gmail.com>
yum will fail on 'No space left on device', fixes#32791 (#40737)
During the installing of packages if yum runs out of free disk space,
some post install scripts could fail (like e.g. when the kernel
package generates initramfs), but yum would still exit with a status
0. This is bad, especially for the kernel package, because it makes
it unable to boot. Because the yum module is usually used for
automation, which means the users cannot read every message yum
prints, it's better that the yum module fails if it detects that
there is no free space on the disk.
Signed-off-by: Adam Miller <admiller@redhat.com>
* Revert "fix licensing and attribution in yumdnf module_util"
This reverts commit 59e11de5a2.
* move fetch_rpm_from_url out of yumdnf module_util
Signed-off-by: Adam Miller <admiller@redhat.com>
* fix the move of fetch_rpm_from_url
Signed-off-by: Adam Miller <admiller@redhat.com>
Make git module support --separate-git-dir option. When git version is higher than 1.7.5, use built-in --separate-git-dir option during the clone. When lower, adjust the location of git dir manually after clone to achieve the same effect.
* Compress src interface into one key
* Modified regex to support varied interface types
* Fixed documentation
* Unpacking return values from splitting method
* Add backup option
* Only backup shadow file when the OS has one
* Only backup shadow file for SunOS
* Update docs on backup feature
* Add changelog fragment
* Add tests for shadow backup
* Remove backup option, make it automatic
Remove the option to enable/disable backups and make it automatic. Add note to docs describing this behavior.
Change tests to account for new module behavior.
Change section name in changelog fragment since minor_features is not a valid section.
* Testing commands over various nxapi levels of cipher and ssl strengths.
* Reworked nxos nxapi ssl/tlv transport testing
* Added additional nxos nxapi httpapi local transport test suite
* Added meta: end_play to nxos nxapi transports task to
prevent execution unless nxos_ssl is defined.
* Refactored nxos nxapi tls and cipher options testing
* Removed blank line
* Renamed variable ssl to the more appropriate ciphers
* After each transport perumation test reset nxapi on the switch to
ensure no previous configuration is still present on the next test.
* 43651: Removed unnecessary changes to nxos_nxapi & removed hard-coded
nxapi port numbers.
* pip: combine chdir and env only when env is set
This fixes an AttributeError when chdir without virtualenv is specified:
File "/tmp/ansible_2UAFsZ/ansible_module_pip.py", line 387, in main
env = os.path.join(chdir, env)
File "/usr/lib64/python2.7/posixpath.py", line 75, in join
if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'
* Add test for pip with chdir
Signed-off-by: Till Maas <opensource@till.name>
* Only template values in vars_prompt rather than all vars
This allows the use of variables in vars_prompt fields but allows variables entered in the prompt to affect play vars rather than throwing an undefined error.
Only post validate if there was a vars_prompt
* Add tests for vars_prompt
* Check the password format
Check the password format and notify user if they
input unencrypted password.
* Fix sanity error
* Add integration test
* Missed a task name
* Hard code the testing password
Since some testing platfrom has no passlib installed
* Add changelog fragment
* Rework some English sentences
* Fix a grammar mistake
* Fix cli_command junos test failure and update doc
* Fix cli_command module integration test failure
for junos
* Update cli_command module doc for prompt and
config command run scenario's
* Update cli_command module doc
* Collecting PEM -> DER conversions.
* Using cryptography instead of OpenSSL binary in some situations.
* Moving key-to-disk writing for key content to parse_account_key.
* Rename parse_account_key -> parse_key.
* Move OpenSSL specific code for key parsing and request signing into global functions.
* Also using cryptography for key parsing and request signing.
* Remove assert statements.
* Fixing handling of key contents for cryptography code path.
* Allow to disable the use of cryptography.
* Updating documentation.
* 1.5 seems to work as well (earlier versions don't have EC sign function). Making Python 2.x adjustments.
* Changing option to select_crypto_backend.
* Python 2.6 compatibility.
* Trying to test both backends separately for acme_account.
* Also testing both backends separately for acme_certificate and acme_certificate_revoke.
* Adding changelog entry which informs about select_crypto_backend option in case autodetect fails.
* Fixing YAML.
* Merge again trickily similar Accelerated networking and IP forwarding
* Add type to enable_ip_forwarding documentation
* Fix merge error
* auth to auto
* azure_rm_networkinterface: remove auth_source from tests
* azure_rm_networkinterface: remove spurious auth_source from test
* azure_rm_networkinterface: Revert formatting on test
* azure_rm_networkinterface: Correct indentation
* Remove wait_for & associated params
* Upgrade command dict to top-level, remove more wait_for accessories
* We don't need all this anymore
* Update docs
* Update tests to new argspec
* Be a little more explicit about sendonly
Also remove reference to the word provider.
* Add example of prompt and answer
* service tests: check that daemon is really running
(spoiler: it isn't)
* service tests: add PIDFile directive in systemd unit
* service tests: check 'changed' too
* service tests: fix indentation & use changed test
* service tests: #16694 has been fixed a long time ago
* service tests: refactor
- always execute cleaning tasks
- move tests tasks in a dedicated file
* service tests: add test for #42786
* service tests: display value of ansible_service_mgr
* service tests: allow to run tests twice in a row
stop & disable ansible test service
* service tests: 'pattern' value must be a substring
'pattern' parameter is poorly named
* service tests: check ansible_test service status
* service tests: test daemon must handle SIGHUP
because 'initctl reload' sends SIGHUP, otherwise test daemon stops when
receiving the signal
* service tests: remove upstart override file too
and check that files were removed using raw module and stat command
This functionality was not considered when the module was written, but
there's no reason why it shouldn't be supported.
We had to rework the query string construction and object filtering.
This new functionality allows to filter on arbitrary keys and supports
None values.
This PR fixes various issues with the existing framework, including
querying specific objects using construct_url_4 (i.e.
aci_epg_to_contract and aci_static_binding_to_epg)
* Added support for TLS-ALPN-01 verification.
* Unrelated commit to re-trigger tests.
* Added test for TLS-ALPN-01.
* Try to remove to_bytes in the hope that binary data survives in Python 2.
* Using Base64 encoding for TLS-ALPN-01 value.
* fixes issue 42420
* fixes issue 42420
* fix shippable docs error
* shippable fix and test case add
* shippable fix and test case add
* shippable fix and test case add
* shippable fix
* removing extra assert
* shippable fix
* new nios module support
* new nios module support
* new nios module support
* new nios module support
* new nios module support
* new nios module support
* new nios module support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* new nios module integration test support
* test/integration/targets/nios_naptr_record/tasks/nios_naptr_record_idempotence.yml
new nios module integration test support
* fix pep8 error
* fix pep8 error
* adding newline at end
* adding newline at end
* adding newline at end
* adding newline at end
* adding newline at end
* adding newline at end
* adding newline at end
* adding newline at end
* adding newline at end
* adding newline at end
* adding newline at end
* adding newline at end
* adding newline at end
* adding newline at end
* New module request: azure_rm_virtualmachine_facts #38081
* New module request: azure_rm_virtualmachine_facts #38081#38279 pep8 fixes
* New module request: azure_rm_virtualmachine_facts #38081#38279 validate-modules fixes
* New module request: azure_rm_virtualmachine_facts #38081#38279 serialize_vm
* New module request: azure_rm_virtualmachine_facts #38081#38279 get_item
* New module request: azure_rm_virtualmachine_facts #38081#38279 avoid get vm twice
* New module request: azure_rm_virtualmachine_facts #38081#38279 some jborean93 requests
* New module request: azure_rm_virtualmachine_facts #38081#38279 camel_dict_to_snake_dict
* New module request: azure_rm_virtualmachine_facts #38081#38279 integration test
* New module request: azure_rm_virtualmachine_facts #38081#38279 virtual network required
* New module request: azure_rm_virtualmachine_facts #38081#38279 consider additional vms present
* New module request: azure_rm_virtualmachine_facts #38081#38279 trailing comma
* New module request: azure_rm_virtualmachine_facts #38081#38279 remove from smoketest
* New module request: azure_rm_virtualmachine_facts #38081#38279 filtering by tag fix
* New module request: azure_rm_virtualmachine_facts #38081#38279 virtual network issues fix
* New module request: azure_rm_virtualmachine_facts #38081#38279 remove trailing comma
* adding curated format for vm
* New module request: azure_rm_virtualmachine_facts #38081#38279 rights to zim + lint fixes
* clean up
* updates to vm facts
* commented out failing thing
* fixed mistake
* New module request: azure_rm_virtualmachine_facts #38081
* New module request: azure_rm_virtualmachine_facts #38081#38279 pep8 fixes
* New module request: azure_rm_virtualmachine_facts #38081#38279 validate-modules fixes
* fixed test
* fixed test problem
* New module request: azure_rm_virtualmachine_facts #38081#38279 serialize_vm
* New module request: azure_rm_virtualmachine_facts #38081#38279 get_item
* New module request: azure_rm_virtualmachine_facts #38081#38279 avoid get vm twice
* New module request: azure_rm_virtualmachine_facts #38081#38279 some jborean93 requests
* New module request: azure_rm_virtualmachine_facts #38081#38279 camel_dict_to_snake_dict
* New module request: azure_rm_virtualmachine_facts #38081#38279 integration test
* New module request: azure_rm_virtualmachine_facts #38081#38279 virtual network required
* New module request: azure_rm_virtualmachine_facts #38081#38279 consider additional vms present
* New module request: azure_rm_virtualmachine_facts #38081#38279 trailing comma
* New module request: azure_rm_virtualmachine_facts #38081#38279 remove from smoketest
* New module request: azure_rm_virtualmachine_facts #38081#38279 filtering by tag fix
* New module request: azure_rm_virtualmachine_facts #38081#38279 virtual network issues fix
* New module request: azure_rm_virtualmachine_facts #38081#38279 remove trailing comma
* adding curated format for vm
* New module request: azure_rm_virtualmachine_facts #38081#38279 rights to zim + lint fixes
* clean up
* updates to vm facts
* commented out failing thing
* fixed mistake
* fixed test
* fixed test problem
* ldap_entry 'Tuple_to_LDAPMod(): expected a byte string in the list' issue
* Revert "ldap_entry 'Tuple_to_LDAPMod(): expected a byte string in the list' issue"
This reverts commit efe316c52e5a70fc1aa9f58eff3a9d5b2599763f.
* changed return value
* fixed test
* fixed test mistake
* one space too much
* removed change made by mistake
* virtual machine description
* remove example
* fixed yaml
* Enable setting setting cliconf plugin options
Fixes#43367
* Add support to set configuration options for implementation plugins (eg: cliconf)
from `ansible-connection`
* Fix CI failure
* Add Ansible.ModuleUtils.PrivilegeUtil and converted code to use it
* Changed namespace and class to be a better standard and fixed some typos
* Changes from review
* changes to avoid out of bound mem of server 2008
* changes to detect failure when setting a privileged not allowed
* Using ACME test container for acme_account integration test.
* Removing dependency on setup_openssl. Waiting for controller and Pebble.
* More tinkering.
* Reducing number of tries.
* One more try.
* Another try.
* Added acme_certificate tests.
* Removed double key.
* Added tests for acme_certificate_revoke.
* Making task names more meaningful (during certificate generation).
* Using newer test container which integrates letsencrypt/pebble#137. Adding test for revoking certificate by its private key.
* Using new version of Pebble which limits the random auth delay.
* Simplifying certificates for revocation tests.
* Reworking acme_certificate tests (there are now more, but they are faster).
* Test whether account_key_content works.
* Preparing TLS-ALPN-01 support.
* Using official Ansible image of testing container on quay.io.
* Bumping version.
* Bumping version of test container to 1.1.0.
* Adjusting to new CI group names.
* Pass ACME simulator IP as playbook variable.
* Let test plugin wait for controller and CA endpoints to become active.
* Refactor common setup parts of tests to setup_acme.
* _ -> dummy
* Moving common obtain-cert.yml to setup_acme.
* NXAPI ssl ciphers & protocols default values
* TLSv1, TLSv1.1, TLSv1.2 and weak cipher support
* NXOS NXAPI weak/strong cipher & TLSv 1.2, 1.1 & 1.0 support
* Version checking for strong/weak ciphers & TLS 1.2, 1.1 & 1.0 support
* Cleaned up erroneously committed changes.
* Specific NXOS platform checking for nxapi ssl ciphers & protocols
* Fixed ansibot reported errors.
* Resolved ansibot reported error.
* Added network_os_version to mocked up N7K unit test device_info
* Calling get_capabilities() once in main and passing results into methods.
* Removed raising exceptions when platform capabilities return None
per reviewers request. Skipping nxapi ssl options when capabilities
are None and generating a warning when these options are skipped
* Cleaned up explicit checks for None/not None
VSAN related facts (cluster_uuid) will be used in vmware_vsan_cluster
while adding new host in VSAN cluster.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Allow specifying the source and destination files' encodings in the template module
* Added output_encoding to the template module, default to utf-8
* Added documentation for the new variables
* Leveraged the encoding argument on to_text() and to_bytes() to keep the implementation as simple as possible
* Added integration tests with files in utf-8 and windows-1252 encodings, testing all combinations
* fix bad smell test by excluding windows-1252 files from the utf8 checks
* fix bad smell test by excluding valid files from the smart quote test
* Add parameter to keep elb rules
Does not purge elb rules. This is usefull if running the elb_application_lb
role and there is the desire to keep existing rules.
* Change variable name keep_rules to purge_rules
The descriptor purge has been used in the past.
* Changed default for purge_rules
Default is purge_rules. This is how the module has functioned previously. This change maintains
the previous behavior.
* Add integration test for purge_rules flag
* Change wording of test task
* Fix merge conflcit
* Changed default for purge_rules
Default is purge_rules. This is how the module has functioned previously. This change maintains
the previous behavior.
* merge conflcit
* Change wording of test task
* Add purge_rules option to test
* Change test description wording
* Expand purge_rules documentation
* Clarifies documentation for purge_rules option
This provides a more convenient way for testing (async) jobs.
When used with a non-async job it will report a warning so the user is
aware that he may be doing something incorrect.
Since the 'finished' result value is an integer (!), the test is turning
this in a proper boolean.
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.
* win_user: use different method to validate credentials that does not rely on SMB/RPC
* Use Add-Type as SetLastError on .net reflection not working on 2012 R2
* win_chocolatey: refactor module to fix bugs and add new features
* Fix some typos and only emit install warning not in check mode
* Fixes when testing out installing chocolatey from a server
* Added changelog fragment
* Properly handle default package manager vs apt
For distros where apt might be installed but is not the default
package manager for the distro, properly identify the default distro
package manager during fact finding and re-use fact finding from
DistributionFactCollector and instead of reimplementing small
portions of it in PkgMgrFactCollector
Add unit test to always check the apt + Fedora combination to test
the new code.
Fixes#34014
Signed-off-by: Adam Miller <admiller@redhat.com>
* remove q debugging output I accidentally left behind
Signed-off-by: Adam Miller <admiller@redhat.com>
* add os_family to the conditional so we're only hitting that code path when needed
Signed-off-by: Adam Miller <admiller@redhat.com>
* setup for a _check* pattern for general os_family group pkg_mgr checking
Signed-off-by: Adam Miller <admiller@redhat.com>
* use Mock.patch decorator for os.path.exists in TestPkgMgrFactsAptFedora
Signed-off-by: Adam Miller <admiller@redhat.com>
linked_clone requires snapshot_src parameter. This fix makes them required_together
and update documentation. Also, testcase is added.
Fixes: #42349
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Support setting persistent command timeout per task basis
Fixes#42200
* Add variable `ansible_command_timeout` to `persistent_command_timeout`
option for `network_cli` and `netconf` connection plugin so that the
command_timeout can be set per task basis while using `connection=network_cli`
or `connection=netconf`
eg:
```
- name: run copy command
ios_command:
commands:
- show version
vars:
ansible_command_timeout: 40
```
* Modify `ansible-connection` to read command_timeout value from
connection plugin options.
* Add `ansible_command_timeout` to `persistent_command_timeout`
option in `persistent` to support `connection=local` so that
it is backward compatibilty
* To support `connection=local` pass the timeout value as variables
from persistent connection to `ansible-connection` instead of sending
it in playcontext
* Fix CI failure
* Fix review comment
* Check get_option method works with inventory plugins
This use case is already tested by some cloud inventoty plugin but
these tests are slow and aren't always executed, hence this new quick
test.
* AnsiblePlugin: Fix typo in docstring
* ios_user module - add sshkey support
* ios_user - Add version_added to sshkey option
* ios_user - pep8 indentation fixes in unit tests
* ios_user - use b64decode method that works on python 2 and 3
* Only report change when home directory is different
Add tests with home: parameter
Have to skip macOS for now since there is a bug when specifying the home directory path for an existing user that results in a module failure. That needs to be fixed in a separate PR.
Ensure that FieldLevelEncryptionId is properly handled - passing it if
set, and keeping it if returned by GetDistribution
Update cloudfront_distribution tests to remove references to
test_identifier so test suite actually works
Fixes#40724
* ucs_storage_profile module and integration tests
* Remove space in doc link to fix docs-build issue.
* Added suboption documentation and argument spec supporting list suboptions.
* Various small edits
* implementing disable_excludes
* add check for yum version
* limit choices
* add testcases for disable_exclude
* fix formating
* add documentation
* syntax fix for test case
* fix indentation
* need to ignore errors when we want to do a test that fails
* test disable_excludes with zip and not sos
* add tests for yum < 3.4 not supported
* fix formating
* centos 6.1 does not support map
* drop unsupported selectattr
* cleanup testcases
* fix test cases beloging to wrong test scenarion (propper when)
* evaluate expression
* minor test fixes
* check output of msg
* win_chocolatey_source: add new module to manage Chocolatey sources
* Added examples and fix diff run
* Minor fixes from review
* When editing a source, recreate with the explicit options instead of using the existing source
* Fixed up copyright header in PowerShell file
* First pass at making 'private' work on include_role, imports are always public
* Prevent dupe task execution and overwriting handlers
* New functionality will use public instead of deprecated private
* Add tests for public exposure
* Validate vars before import/include to ensure they don't expose too early
* Add porting guide docs about public argument and change to import_role
* Add additional docs about public and vars exposure to module docs
* Insert role handlers at parse time, exposing them globally
* Make fetching old style facts optional
and try to fetch the old style facts only when
`ofacts` value is present in `gather_facts`
* Fix in junos_facts integration test
* Add the NIOS RECORD PTR Module
* FIX E241,E231, E105
* FIX module should not be executable
* FIX module RWX
* Remove change in nios_srv_record
* Remove change in nios_srv_record
* FIX test_nios_ptr_record_update_comment
* ADD: Integration and target tests for the NIOS PTR RECORD module.
* FIX module name in integrations tests
* Update integration
* Refactor nios_ptr_record module
* Refactor the nios_ptr_record_idempotence
* FIX name
* Smoketests for the NIOS modules does not take care of the PTR:RECORD object
* REM the default for view
* Add finals test, after adding the PR (https://github.com/ansible/nios-test-container/pull/1) in order to handle PTR:RECORD
* add the define nios specific constant for PTR:RECORD
* fix: documentation style
* add create an ipv6 ptr record
* rename class name, add ipv6 unittest
* win_reboot: fix 2.6 issues and better handle post reboot reboot
* changed winrm _reset to reset
* Add handler to reset calls when .reset() throws an AnsibleError on older hosts
* Moving back to _reset to get the issue fixed
The OVSDB schema consists of typed columns. The 'key' parameter is
required only for columns with type of a 'map'. This patch makes 'key'
an optional parameter to allow setting values for other column types
like int.
Fixes#42108
* allow user to pass list of resources in to definition parameter
* Add new validator for list|dict|string
* use string_types instead of string
* state/force information is lost after the first item in the list
* Add tests
* Appease ansibot
* ios_facts: Report file system space
Parse total and free space from dir output. For this, add a hash
filesystems_info containing the keys spacetotal_kb and spacefree_kb.
* ios_facts: Add unit test for file system space reporting
* ios_facts: Add integration test for file system space reporting
* Add support for disable_my_meraki parameter
- Meraki added support for the disabling access to Meraki websites on
devices. This module now supports this.
- I haven't tested this as it was developed on an iPad. It will work
before submitting PR.
- Rework of payload generation code is required or at least
recommended.
- Integration tests need to be developed.
* Added support for disableMyMerakiCom parameter
* - Remove proposed functions as it isn't required for updates
- Add integration tests
- Still pending a case response from Meraki since I can't seem to
set disableMyMerakiCom to false after it's true
* Fixed word wrap problem
* Add version_added to disable_my_meraki
* Initial commit of meraki_ssid module
- CRUD functionality for Meraki wireless SSIDs
- Much more testing is needed
- Module is not currently idempotent
* Improve integration tests
- Original integration tests didn't have any assertions in it
- Single bug fix in module found via integration test
* Added idempotency support
- Changes are only made when needed.
- Added integration test to check for idempotency.
- Relies on a forthcoming PR to make idempotency check a single pass.
* Improved documentation
* Initial commit for meraki_mr_l3_firewall module
- CRUD functionality for layer 3 firewall rules on the Meraki MR access points
- Complimentary integration test
- Need to add support for SSID lookup
* Added support for specifying SSID name and improved documentation
* Added examples to documentation
* Removed whitespace
* Enabled support for configuration template configuration
- get_nets() now pulls down templates and networks
- A few changes in VLAN and network to operate as a POC
* Ansibot changes
- Fix undefined variable
- Document net_id in meraki_vlan
* Fix indentation
- Before this, it allowed claiming devices into a network only
- Make integration tests a block
- Note, API doesn't allow unclaiming in an organization, only net
- Added an integration test for claiming into an org
- Requires unclaiming manually
- There is a bug in the API which isn't showing claimed devices
* Fix tmpdir on non root become
- also avoid exception if tmpdir and remote_tmp are None
- give 'None' on deescalation so tempfile will fallback to it's default behaviour
and use system dirs
- fix issue with bad tempdir (not existing/not createable/not writeable)
i.e nobody and ~/.ansible/tmp
- added tests for blockfile case
* Revert "Temporarily revert c119d54"
This reverts commit 5c614a59a6.
* changes based on PR feedback and changelog fragment
* changes based on the review
* Fix tmpdir when makedirs failed so we just use the system tmp
* Let missing remote_tmp fail
If remote_tmp is missing then there's something more basic wrong in the
communication from the controller to the module-side. It's better to
be alerted in this case than to silently ignore it.
jborean and I have independently checked what happens if the user sets
ansible_remote_tmp to empty string and !!null and both cases work fine.
(null is turned into a default value controller-side. empty string
triggers the warning because it is probably not a directory that the
become user is able to use).
* Update eos cliconf plugin methods
* Refactor eos cliconf plugin
* Changes in eos module_utils as per cliconf plugin refactor
* Fix unit test and sanity failures
* Fix review comment
* aws_eks_cluster: Improve output documentation
This data is already returned by the module, it just wasn't documented. These
fields are required for accessing the created Kubernetes API with e.g. the
k8s_raw module.
* aws_eks_cluster: Add wait functionality
This enables further cluster configuration once it's created and active.
20 minutes was chosen as an arbitrary default, so that if it takes longer than
the documented "usually less than 10 minutes" it's still likely to succeed.
* Correct security group name in aws_eks tests
* Improve teardown of aws_eks tests
Fix minor teardown issues. The `pause` step is a placeholder until
a waiter for `state: absent`
* Add execution_role_arn parameter
* Change ecs_taskdefinition to use AnsibleAWSmodule
Botocore version checking is becomming more common. Changing the ecs_taskdefinition
to use AnsibleAWSmodule allows more easily for this.
* Change launch type check to use botocore_at_least function
* Remove execution_role_arn param from params dict
* Change check to use parameter
* Fix typo
* Add test for old botocore version
* Add test for execution role parameter
* Remove iam_role_facts task
Task was unecessary. The same information could be gathered by registering
the iam_role task.
* Check for HTTP status code
- All requests now check returned status code
- Fail if status code isn’t what is expected
* Fix blank line error
* Change HTTP check logic and improve integration tests
- Set HTTP status code check so default path is accept
- Added create and delete network for integration test
- Remove a few comments to clean up code
* Revert "Account for empty string regexp in lineinfile (#41451)"
This reverts commit 4b5b4a760c.
* Use context managers for interacting with files
* Store line and regexp parameters in a variable
* Add warning when regexp is an empty string
* Remove '=' from error messages
* Update warning message and add changelog
* Add tests
* Improve warning message
Offer an equivalent regexp that won't trigger the warning.
Update tests to match new warning.
* Add porting guide entry for lineinfile change
* Fix bug with redundancy templates and add integration tests for redundancy templates.
* vlan_list absent state support and fix for vlans as strings in vlan_list
* Issue #39860: Add 'not_contains' method to parsing.py
* Issue #30860 Adds self.negate to Conditional class in lib/ansible/module_utils/network/common/parsing.py
* Issue #39860 Fix singleton-comparison issue per sanity tests
* Issue #39860 'test/integration/targets/nxos_command/tests/cli/not_comparison_operator.yaml' integration test
* Issue #39860 Add unit tests to '../../test/units/module_utils/network/common/test_parsing.py'
* Issue #39860 Fix singleton comparison issue
* Fix E302 expected 2 blank lines, found 1
* Issue #39860 Add license header to unit tests
* Issue #39860 Move integration test to 'test/integration/targets/nxos_command/tests/common/'; remove unnecessary comment from unit test
* Issue #39860 remove unnecessary comment from unit test
* refactor win_group_membership to use SIDs for comparisons instead of name parsing
* carry over previous doc cleanup changes
* remove trailing whitespace from docs
* If we evaluate task.loop/with_items when calculating delegate_to vars, cache the items. Fixes#28231
* Add comments about caching loop items
* Add test for delegate_to+loop+random
* Be more careful about where we update task.loop
* runas + async - get working on older hosts
* fixed up sanity issues
* Moved first task to end of test for CI race issues
* Minor change to async test to be more stable, change to runas become to not touch the disk
* moved async test back to normal spot
* Use context managers for interacting with files
* Account for empty string as regexp
Rather than explicitly testing for None, also test for an empty string which will evaluate to False. An empty string regexp matches every line, which ends up replacing the incorrect line.
* Store line parameter in a variable
* Add tests
If a line match is found in the file and no regexp is specified, insertbefore would improperly try to add a line if set to BOF.
Add tests for this scenario.
* fix: exclude using wildcards for tar archives
Fixes#37842, #22947
* fix: Remove quote() as it munges the exclude format
* test: Refactor to use single archive structure
A common structure archived by different methods should simplify some of
the feature tests.
* test: Use common archive layout to validate exclude feature
* test: Use the same exclude checks for zip/tar archives
* Initial commit for meraki_switchport module
- Query or modify swichport configurations
- Further optimizations are available
- Integration tests will require manual editing of file for others
* Remove blank lines
* Implement configuration template management
- Queries or removes templates
- Can bind or unbind templates to networks
- Module is idempotent only for binding and unbinding
- Meraki does not allow template creation via API
- Integration test is tedious b/c previous bullet point
- Fixed bug in construct_path() so it won't set self.function
* PEP8 changes
* Re-enable some integration tests, use variables, and fix broken code
* Initial commit of meraki_vlan module
- Create, delete, modify, and query VLANs within a network
- Support for all allowed objects in the VLAN data structure
- Meraki defaults networks to have VLANs disabled and there is no
way to use the API to enable VLAN support. It must be enabled
manually.
* Fix formatting error in documentation
* Formatting changes and added documentation
* PEP8 fix
* Initial commit for meraki_device module
- Allow claiming, removal, updating, and querying of devices
- Integration tests are included
- Integration tests are not complete because physical gear is required
- Integration tests also require Meraki subscriptions
* Added support for serial number query without network
* Added support for net_id and net_name
* Changes recommended by ansible-test for PEP8 and documentation
* Remove duplicate state in example
* Fix typo
* 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
* base64 filter: Added ability to specify encoding
* Added unicode chars for further testing
* Removed errors to keep previous behaviour in place
* Removed surrogate pairs due to issues loading YAML in CI
* Prevent using action/local_action on includes and imports. Fixes#28822
* Use ModuleArgsParser to determine action instead of disallowing action/local_action with import/include
* Add to_native
* switch back to block in task_ds, use ModuleArgsParse otherwise
* var should be task_ds
* Add test validating action+include_tasks
Fix ios integration test failures in CI. Since the packet transfer and receive rate
on the interface is not determined to remove the tx_rate and rx_rate test conditions
to prevent intermittent failure.
* create internal loadbalancer
* fix test
* remove duplicate test
* clean up
* fix doc
* lint
* add sku support
* update version
* change to the version the same as CLI
* add pip support sku
* fix lint
* fix test
* Update main.yml
* add changelog entry
* Pull the tests for state=link into their own file
* Pull tests for what happens when dest is a directory out
* Expand both of the above sets of tests
There was a traceback when setting permissions on a directory tree when
there were broken symlinks inside of the tree and follow=true. chmod -R
ignores broken symlinks inside of the tree so we've fixed the file
module to do the same.
Fixes#39456
* Fix for file module with symlinks to nonexistent target
When creating a symlink to a nonexistent target, creating the symlink
would work but subsequent runs of the task would fail because it was
trying to operate on the target instead of the symlink.
Fixes#39558
* Initial commit
Query an organization within Meraki. No support is in place for managing
or creating yet
* Change output_level method and make the state parameter required.
* Implemented listing all organizations
- Updated documentation
- Parse results and return all organizations
- Parse results and return specified organization
* Framework for creating an organization
- Documentation example for organization creation
- Framework exists for creating organizations, pending PR 36809
- Created functions for HTTP calls
- Renamed from dashboard.meraki.com to api.meraki.com
- Added required_if for state
* Remove absent state
- Meraki API does not support deleting an organization so absent is removed
- Updated documentation to call it state instead of status
* Small change to documentation
* Support all parameters associated to organization
- Added all parameters needed for all organization actions.
- None of the added ones work at this time.
- Added documentation for clone.
* Integration test for meraki_organization module
* Rename module to meraki for porting to module utility
* Meraki documentation fragment
- Created initial documentation fragment for Meraki modules
* Add meraki module utility to branch. Formerly was on a separate branch.
* CRU support for Meraki organization module
* CRU is supported for Meraki organizations
* There is no DELETE function for organizations in the API
* This code is very messy and needs cleanup
* Create and Update actions don't show status as updated, must fix
* Added Meraki module utility to module utility documentation list
* Added support for organization cloning
* Renamed use_ssl to use_https
* Removed define_method()
* Removed is_org()
* Added is_org_valid() which does all org sanity checks
* Fixes for ansibot
- Changed default of use_proxy from true to false
- Removed some commented out code
- Updated documentation
* Changes for ansibot
- Removed requirement for state parameter. I may readd this.
- Updated formatting
diff --git a/lib/ansible/module_utils/network/meraki/meraki.py b/lib/ansible/module_utils/network/meraki/meraki.py
index 3acd3d1038..395ac7c4b4 100644
--- a/lib/ansible/module_utils/network/meraki/meraki.py
+++ b/lib/ansible/module_utils/network/meraki/meraki.py
@@ -42,7 +42,7 @@ def meraki_argument_spec():
return dict(auth_key=dict(type='str', no_log=True, fallback=(env_fallback, ['MERAKI_KEY'])),
host=dict(type='str', default='api.meraki.com'),
name=dict(type='str'),
- state=dict(type='str', choices=['present', 'absent', 'query'], required=True),
+ state=dict(type='str', choices=['present', 'absent', 'query']),
use_proxy=dict(type='bool', default=False),
use_https=dict(type='bool', default=True),
validate_certs=dict(type='bool', default=True),
diff --git a/lib/ansible/modules/network/meraki/meraki_organization.py b/lib/ansible/modules/network/meraki/meraki_organization.py
index 923d969366..3789be91d6 100644
--- a/lib/ansible/modules/network/meraki/meraki_organization.py
+++ b/lib/ansible/modules/network/meraki/meraki_organization.py
@@ -20,11 +20,9 @@ short_description: Manage organizations in the Meraki cloud
version_added: "2.6"
description:
- Allows for creation, management, and visibility into organizations within Meraki
-
notes:
- More information about the Meraki API can be found at U(https://dashboard.meraki.com/api_docs).
- Some of the options are likely only used for developers within Meraki
-
options:
name:
description:
@@ -32,21 +30,18 @@ options:
- If C(clone) is specified, C(name) is the name of the new organization.
state:
description:
- - Create or query organizations
- choices: ['query', 'present']
+ - Create or modify an organization
+ choices: ['present', 'query']
clone:
description:
- Organization to clone to a new organization.
- type: string
org_name:
description:
- Name of organization.
- Used when C(name) should refer to another object.
- type: string
org_id:
description:
- ID of organization
-
author:
- Kevin Breit (@kbreit)
extends_documentation_fragment: meraki
@@ -86,7 +81,6 @@ RETURN = '''
response:
description: Data returned from Meraki dashboard.
type: dict
- state: query
returned: info
'''
@@ -103,6 +97,7 @@ def main():
argument_spec = meraki_argument_spec()
argument_spec.update(clone=dict(type='str'),
+ state=dict(type='str', choices=['present', 'query']),
)
@@ -125,11 +120,9 @@ def main():
meraki.function = 'organizations'
meraki.params['follow_redirects'] = 'all'
- meraki.required_if=[
- ['state', 'present', ['name']],
- ['clone', ['name']],
- # ['vpn_PublicIP', ['name']],
- ]
+ meraki.required_if = [['state', 'present', ['name']],
+ ['clone', ['name']],
+ ]
create_urls = {'organizations': '/organizations',
}
@@ -162,23 +155,16 @@ def main():
-
- # method = None
- # org_id = None
-
-
- # meraki.fail_json(msg=meraki.is_org_valid(meraki.get_orgs(), org_name='AnsibleTestOrg'))
-
if meraki.params['state'] == 'query':
- if meraki.params['name'] is None: # Query all organizations, no matter what
- orgs = meraki.get_orgs()
- meraki.result['organization'] = orgs
- elif meraki.params['name'] is not None: # Query by organization name
- module.warn('All matching organizations will be returned, even if there are duplicate named organizations')
- orgs = meraki.get_orgs()
- for o in orgs:
- if o['name'] == meraki.params['name']:
- meraki.result['organization'] = o
+ if meraki.params['name'] is None: # Query all organizations, no matter what
+ orgs = meraki.get_orgs()
+ meraki.result['organization'] = orgs
+ elif meraki.params['name'] is not None: # Query by organization name
+ module.warn('All matching organizations will be returned, even if there are duplicate named organizations')
+ orgs = meraki.get_orgs()
+ for o in orgs:
+ if o['name'] == meraki.params['name']:
+ meraki.result['organization'] = o
elif meraki.params['state'] == 'present':
if meraki.params['clone'] is not None: # Cloning
payload = {'name': meraki.params['name']}
@@ -193,7 +179,10 @@ def main():
payload = {'name': meraki.params['name'],
'id': meraki.params['org_id'],
}
- meraki.result['response'] = json.loads(meraki.request(meraki.construct_path('update', org_id=meraki.params['org_id']), payload=json.dumps(payload), method='PUT'))
+ meraki.result['response'] = json.loads(meraki.request(meraki.construct_path('update',
+ org_id=meraki.params['org_id']),
+ payload=json.dumps(payload),
+ method='PUT'))
diff --git a/lib/ansible/utils/module_docs_fragments/meraki.py b/lib/ansible/utils/module_docs_fragments/meraki.py
index e268d02e68..3569d83b99 100644
--- a/lib/ansible/utils/module_docs_fragments/meraki.py
+++ b/lib/ansible/utils/module_docs_fragments/meraki.py
@@ -35,6 +35,7 @@ options:
description:
- Set amount of debug output during module execution
choices: ['normal', 'debug']
+ default: 'normal'
timeout:
description:
- Time to timeout for HTTP requests.
diff --git a/test/integration/targets/meraki_organization/aliases b/test/integration/targets/meraki_organization/aliases
new file mode 100644
index 0000000000..ad7ccf7ada
--- /dev/null
+++ b/test/integration/targets/meraki_organization/aliases
@@ -0,0 +1 @@
+unsupported
* Formatting fix
* Minor updates due to testing
- Made state required again
- Improved formatting for happier PEP8
- request() now sets instance method
* Fix reporting of the result
* Enhance idempotency checks
- Remove merging functionality as the proposed should be used
- Do check and reverse check to look for differences
* Rewrote and added additional integration tests. This isn't done.
* Updated is_update_required method:
- Original and proposed data is passed to method
- Added ignored_keys list so it can be skipped if needed
* Changes per comments from dag
- Optionally assign function on class instantiation
- URLs now have {} for substitution method
- Move auth_key check to module utility
- Remove is_new and get_existing
- Minor changes to documentation
* Enhancements for future modules and organization
- Rewrote construct_path method for simplicity
- Increased support for network functionality to be committed
* Changes based on Dag feedback and to debug problems
* Minor fixes for validitation testing
* Small changes for dag and Ansibot
- Changed how auth_key is processed
- Removed some commented lines
- Updated documentation fragment, but that may get reverted
* Remove blank line and comment
* Improvements for testing and code simplification
- Added network integration tests
- Modified error handling in request()
- More testing to come on this
- Rewrote construct_path again. Very simple now.
* Remove trailing whitespace
* Small changes based on dag's response
* Removed certain sections from exit_json and fail_json as they're old
* ec2_vpc_route_table: Update matching_count parsing on find_subnets function and tests
* ec2_vpc_route_table: Update matching_count parsing on find_subnets function
* Stabilize ec2_vpc_vgw and ec2_vpc_vpn so tests for ec2_vpc_vpn_facts in PR 35983 can be run in CI
* Add updated placebo recordings
* ensure find_vgw uses the virtual gateway id if available
Add AWSRetry.jittered_backoff to attach_vpn_gateway to deal with errors when attaching a new VPC directly after detaching
Add integrations tests for ec2_vpc_vgw
* Sort VPN Gateways by ID
* vyos_interface require multiple network nodes to run
We don't have the ability to run these currently, so disable them.
The original logic was also incorrect, the tests don't pass on lab, DCI
nor single instance nodepool, so disable
https://github.com/ansible/ansible/issues/39667 tracks getting these
enabled again
* eth0 -> Gi0/0
* Correctly detect if we should run lldp
* Correctly detect if we should run lldp
* Add helpful failure message if target_type=ip is not supported
Create test case for target_type=ip not supported
* Update elb_target_group module to latest standards
Use AnsibleAWSModule
Improve exception handling
Improve connection handling
Improve naming of one of the cloudfront tasks
Change test_identifier back to resource_prefix now it's always
lower case.
More tests around using distribution_id and default_root_object
* Fix eos_vlan associated interface check
Fix eos_vlan associated interface check by comparing
the interface in want and have without converting the
interface name to lower
* Update eos_vlan docs
* Only change expiration date if it is different
Modify user_info() method to also return the password expiration.
Compare current and desired expiration times and only change if they are different.
* Improve formatting on user tests
* Add integration test for expiration
* Add changelog fragment
* Improve integration test
Skip macOS and use getent module for validating expiration date.
* Fix expiration change for FreeBSD
* Don't use datetime since the total_seconds method isn't available on CentOS 6
* Use better name for expiration index field
Use separate tasks for verifying expiration date on BSD
* Use calendar.timegm() rather than time.mktime()
calendar.timegm() is the inverse of time.gmtime() and returns a timestamp in UTC not localtime
Add tests that change the system timezone away from UTC
* Mark tests as destructive and use test for change status
* Fix account expiration for FreeBSD
Use DATE_FORMAT when setting expiration date on FreeBSD. Previously the argument passed to -e was an integer of days since epoch when the account will expire which was inserted directly into master.passwd. This value is interpreted as seconds since epoch by the system, meaning the account expiration was actually set to a few hours past epoch.
Greatly simply comparing desired and current expiration time by using the first three values of the struct_time tuple rather than doing a whole bunch of manipulations of the seconds since epoch.
This is a test in response to #27262 but I could not provoke the error
so it only shows that the current code is working with non-ascii
filenames in this case. It doesn't show whether there's some other bug
somewhere.
* task_executor.py: Raise 'conditional exception' in case of 'include_*'
Fixes#33632
Signed-off-by: Patrick Ringl <patrick_@freenet.de>
* Re-organize tests, add static include test with undefined var
* Remove unnecessary conditional
* Fixes for mode=preserve
* Document mode=preserve for template and copy
* Make mode=preserve work with remote_src for copy
* Make mode=preserve work for template
* Integration tests for copy & template mode=preserve
Fixes#39279
* Changed mode option in win_copy to hidden option as it doesn't reflect copy mode
* Fix#26755 by ensuring that the first nic in the nic list has primary set to True, and all other nics have primary set to False.
* Fix sanity issues and add test for two nics
* Fix typo in test
* fix nic list
* Ensure the niclist variable is used rather than a niclist string
* Add tests just for dual nic, reverting changes to single nic VM creation tests
* Correct idempotency test
Enable awsvpc network mode for ECS services and tasks and
their underlying task definitions
Improve test suite to thoroughly test the changes
Use runme.sh technique to run old and new versions of botocore to
ensure that the modules work with older botocore and older network modes
and fail gracefully if awsvpc network mode is used with older botocore
* 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
* psexec: new module to run commands on a remote Windows host without WinRM
* fix up sanity issue, create test firewall rule for SMB traffic
* Fixed up yaml linting issues, trying to fix on the fly firewall rule
* Added SMB exception to catch when cleaning up PAExec exe
* Don't load profile for Azure hosts when becoming another user
* Fixed up example to use correct option
* Reworded notes section of module docs
* Simplified module options around process integrity levels and the system account
* Improve ec2_ami tests
Ensure that ec2_ami_image_id fact gets set immediately after AMI
creation so that they get torn down even if tests fail
Use YAML anchor to simplify AWS credential passing
Use aws_connection_info to reduce AWS credential boilerplate
Improve exception handling when updating image attributes
Error messages weren't correctly formatted to show image ids.
* VMware: apply correct value for datacenter in TC
Signed-off-by: Tim Steinbach <tim@nequissimus.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Add yarn module based off of NPM module, adjust syntax for install cmd
* Update author list
* Add Return docbloc
* Remove extra var assignment
* Always return output without emojis, small changes for yarn 0.16.1
* Move import line, add ANSIBLE_METADATA, bump version_added
* Updating module format to meet newest lint requirements. Update options and example docs.
* Bring back RETURN block and main() execution.
* All trailing whitespace removed.
* Remove json try/except.
* Add initial pass at setting up Yarn integration tests.
* Add better handling for latest and removal states. Add tests for upgrading a single package.
* Fix issue where state=latest for installing all packages caused failure.
* Set yarn bin to latest version for tests. Fix sanity tests.
* Switch template task to copy task in yarn integration tests.
* Fix the function_name handling logic for lambda_policy
Switch the logic handling function_names that are ARNs
so that ARNs are correctly handled and detected
* Add tests for lambda_policy function_arn
Ensure that function_arn works.
Needs a reasonable ansible_lambda_role.
* Skip self._parent on dynamic, defer to grandparent for attr lookup
* Revert _inheritable
* Add tests for include inheritance from static blocks
Fixes#38037#36194
If user does not specify any network type then set network type
to dhcp. There are additional checks around 'ip', 'netmask' and
'type' in network spec.
Fixes: #38466
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Include change classification data in metadata.
* Add support for disabled tests.
* Add support for unstable tests.
* Add support for unsupported tests.
* Overhaul integration aliases sanity test.
* Update Shippable scripts to handle unstable tests.
* Mark unstable Azure tests.
* Mark unstable Windows tests.
* Mark disabled tests.
* Add include_import tests for many top level include_tasks
Rename a few test playbooks to make more sense
* Use fewer include_tasks due to memory limits in CI
* get_url should accept headers as a dict, instead of only a complicated string
* update headers description text
* Add headers string and dict tests for get_url
* Add intg test for string header format parsing error
* Adjust deprecation version ahead 1 release, add the version dict format was added in to description
* Handle duplicate headers, and make it easier for users to use cookies, by providing a pre-built string
* Ensure proper cookie ordering, make key plural
* Add note about cookie sort order
* Add tests for duplicate headers and cookies_string
* Extend tests, normalize headers between py2 and py3
* Add some notes in test code
* Don't use AttributeError, use six.PY3. Use better names.
* Error if a module is found to shadow a reserved keyword
* Add test for shadowed module
* Bring in functools.wraps for the decorator
* Drop the decorator, make _find_plugin the real function, find_plugin now holds the shadow logic
* Swap order of functions for bottom to top execution order
* Only error for modules
* Add test for loading a lookup plugin that shadows a keyword
Currently, when ones run the module in check_mode it tries to retrieve
values from the actual certificate generated in the generate() function.
Since in check_mode we call dump() without calling generate(), self.cert
is None, leading to self.cert.get_notBefore(), self.cert.get_notAfter()
and self.cert.get_serial_number() raising an error.
> NoneType' object has no attribute 'get_notBefore'
The solution is to have two way to handle dump() method, whether its run
in check_mode=True or check_mode=False leading to different way the
information is retrieved.
* Required changes to support redirects on HTTP 307/308
This ensures HTTP 307 and 308 will redirect the request to the new
location without modification.
* Fix the unused newheaders reference
* Be more compliant
* Add integration tests for follow_redirects=all
* Improve other tests for new behaviour
* Make follow_redirects values more strict
* added eos_smoke tests
* removed left over file
* added note to uncomment broken eapi test when #36919 is fixed
* uncommented fixed test, added unbecome test
* skip become tests when connection=local
* Added module win_pester and relatives integration tests
* Corrected issues as stated by ansible-test
* Added defaults variable in integration tests
* Added task to install Pester if needed in the integration test
* Corrected error in win_psmodule task
* Added Pester installation with Chocolatey when Powershell version < 5
* Get facts...
* Disabled invoke-pester output
* Added pester_result type
* Added jhawkesworth changes proposal
* Corrected documentation linting
* Corrected linting
* Added dagwieers recommendations
* Added dagwieers recommendations
* Corrected linting errors and task error in integration test
* Corrected error in integration test
* Added dagwieers recommendations
* Corrected requirements in the DOCUMENTATION block
* tolerate windows line endings when loading windows module utils. Helpful for old custom windows modules.
* add test modules to demonstrate win line ending module load behaviour.
* attempt to fix sanity check failures
* pep8 fix
* explict skip of test modules from shebang check (core modules must still have expected unix style line endings)
* switch to rstrip() following core team meeting feedback
* Add aws_ses_identity_policy module for managing SES sending policies
* Add option to AnsibleAWSModule for applying a retry decorator to all calls.
* Add per-callsite opt in to retry behaviours in AnsibleAWSModule
* Update aws_ses_identity_policy module to opt in to retries at all callsites.
* Add test for aws_ses_identity_policy module with inline policy.
* Remove implicit retrys on boto resources since they're not working yet.
* Mark UCS integration tests as unsupported.
* Mark various connection tests as unsupported.
* Mark win_domain_group test as unsupported.
* Mark java_cert test as unsupported.
* Mark synchronize-buildah test as unsupported.
* Mark various AWS tests as unsupported.
* Mark azure_rm_acs test as unsupported.
* Mark GCP tests as unsupported.
* stabilize ec2_vpc_subnet module
* Add waiters for ec2_vpc_subnet
Clean up integration tests
* Reenable CI for stabilized ec2_vpc_subnet tests
* rename waiters
* Use module_json_aws where applicable
Handle WaiterError first if waiting failed
* Fix traceback when tagging with keys/values that look like booleans
* Fix check mode with tags
* Add integration tests for tags that look like booleans and check mode
* Add waiter for deleting subnet
* Sleep a few seconds after using aws command line
* Use AnsibleAWSModule to simplify AWS connection
* Add Exception handling, pagination, retries and backoff
* Allow events to be switched off
* Allow details to be obtained without having to specify services
This is required if we want to ensure that #36809 doesn't cause any
important behavioral changes.
This PR changes the uri module to support follow_redirects=urllib2
It also adds a better error message when the connection closes before
any data was returned.
* Fix apt tests
* Enable the test in CI
* Additional fixes not discovered locally
* Don't break mysql tests and fix for 14.04 upgrade
* Remove not needed when cond
* Add shebang to fix-udev script
* Remove workaround in favor of rebuilding containers
* Remove leftover script
SGs created when a VPC ID was not specified would not necessarily
get the default egress rule, even when no explicit egress rules
were set.
Add some checks for egress rules in results from existing tests
* Fix 'New Vault password' on vault 'edit'
ffe0ddea96 introduce a
change on 'ansible-vault edit' that tried to check
for --encrypt-vault-id in that mode. But '--encrypt-vault-id'
is not intended for 'edit' since the 'edit' should always
reuse the vault secret that was used to decrypt the text.
Change cli to not check for --encrypt-vault-id on 'edit'.
VaultLib.decrypt_and_get_vault_id() was change to return
the vault secret used to decrypt (in addition to vault_id
and the plaintext).
VaultEditor.edit_file() will now use 'vault_secret_used'
as returned from decrypt_and_get_vault_id() so that
an edited file always gets reencrypted with the same
secret, regardless of any vault id configuration or
cli options.
Fixes#35834
Fixes#37208
If check_mode is enabled instead of committing th config need to
discard all the chnages to cnadidate db
In case of cli to discard changes issue `rollback 0` command
and for netconf execute `discard-changes` rpc call
* Add tests using a variable in tasks_from field
Related to #32503
* Do not test using hostvars with import_role
hostvars cannot be used with import_role — use include_role instead
* template: Add integration tests for `lstrip_blocks'
Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>
* template: Fix passing `trim_blocks' inline
Fix passing `trim_blocks' option to the template module as inline
argument. Previously passing the `trim_blocks' option inline instead of
using the YAML dictionary format resulted in it always being set to
`True', even if `trim_blocks=False' was used.
Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>
* template: Add option to `lstrip_blocks'
Add option to set `lstrip_blocks' when using the template module to
render Jinja templates. The Jinja documentation suggests that
`trim_blocks' and `lstrip_blocks' is a great combination and the
template module already provides an option for `trim_blocks'.
Note that although `trim_blocks' in Ansible is enabled by default since
version 2.4, in order to avoid breaking things keep `lstrip_blocks'
disabled by default. Maybe in a future version it could be enabled by
default.
This seems to address issue #10725 in a more appropriate way than the
suggested.
Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>
* template: Add integration tests for `trim_blocks'
Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>
* template: Check Jinja2 support for `lstrip_blocks'
Since the `lstrip_blocks' option was added in Jinja2 version 2.7, raise
an exception when `lstrip_blocks' is set but Jinja2 does not support it.
Check support for `lstrip_blocks' option by checking `jinja2.defaults'
for `LSTRIP_BLOCKS' and do not use `jinja2.__version__' because the
latter is set to `unknown' in some cases, perhaps due to bug in
`pkg_resources' in Python 2.6.6.
Also update option description to state that Jinja2 version >=2.7 is
required.
Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>
* Fix loading of filter and test plugins
Filter and test plugins are different than other plugins in that they
can have many plugins in a single file. Therefore they need to operate
a little differently. They need to have all of the potential files
returned. Then the caller takes care of passing those onto jinja2 in
order for jinja2 to make use of them.
This problem was (most recently) introduced with f921369445
This commit also restructures how we deduplicate plugins to take paths
into account. If we want to start scoping which set of modules are
loaded (due to roles, for instance) we'll need to hang on to the path
information.
* add integration test for override
* Fix style checks for bcoca code
* Implement jinja2 plugin loader as a subclass
Having a subclass allows us to customize the overriding of jinja
plugins. We can then move common parts of common code into the Loader.
* [cloud] ec2_vpc_route_table: ignore routes without DestinationCidrBlock
Add module warnings rather than silently skipping
* Permit warnings for routes tables containing vpc endpoints to be turned off
* Add tests to ensure a VPC endpoint associated with a route table does not result in a traceback
* adding possibility to specify resource group for referred virtual network
* fixed sanity issues
* removed trailing whitespace
* added test
* fixed documentation
* try to fix unstable test
* Tidied up the description of virtual_network_resource_group
* adding possibility of disabling public ip address
* fixed indent
* fixed whitespace
* fixed mistake
* try to create test with vm without public ip address
* try to fix test
* another attempt for test
* fixing test
* create vm with no ip with different name and delete it immediately
* a few additional fixes
* another attempt to pass test
* must be deleted
* simplified no ip test
* reorganised tests
* Wrapped choice in C()
* fixed issue when public ip address should not be created
* adding test for public ip address
* fixed samples
* another fix to sample formatting
* fixed test
* fix test
* fixed test
* another attempt to fix test
* maybe it works now
* still wrong
* improved check per customer request
* removed stupid semicolon
* updated test to match main scenario
* changed ip configurations to list
* another attempt
* add additional test coverage for tower modules
* add test coverage for the tower_credential module
* add test coverage for the tower_user module
* fix a bug in py3 for tower_credential when ssh_key_data is specified
* add test coverage for tower_host, tower_label, and tower_project
* add test coverage for tower_inventory and tower_job_template
* add more test coverage for tower modules
- tower_job_launch
- tower_job_list
- tower_job_wait
- tower_job_cancel
* add a check mode/version assertion for tower module integration tests
* add test coverage for the tower_role module
* add test coverage for the tower_group module
* add more integration test edge cases for various tower modules
* give the job_wait module more time before failing
* randomize passwords in the tower_user and tower_group tests
* Check that connection error msg are not unsafe
* Connection error messages are unsafe: wrap them
For example, in case of error, docker connection plugin returns exception
message containing Go template. These messages weren't tagged as unsafe
and were consequently rendered:
The conditional check 'result is failed' failed. The error was:
{
'msg': u'Docker version check ([\'/usr/bin/docker\', \'version\', \'--format\', "\'{{.Server.Version}}\'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied\n',
'failed': True
}:
template error while templating string: unexpected '.'.
String: Docker version check (['/usr/bin/docker', 'version', '--format', "'{{.Server.Version}}'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied
* eos can not check config without config session support
* add testcase for check_mode without config session
* fix eos eapi to read use_session env var
Fixes#36979
If `abort` is not issued in the top level session prompt
the existing session goes to pending state.
The fix is to come out of config mode by issuing `end` command
and again to same config session and execute `abort` which
`abort` is issued at the top level session prompt.
Fixes#35993 - Changes to update_size in commit eb4cc31 made it so
the group dict passed into update_size was not modified. As a result,
the 'replace' call does not see an updated min_size like it previously
did and doesn't pause to wait for any new instances to spin up. Instead,
it moves straight into terminating old instances. Fix is to add batch_size
to min_size when calling wait_for_new_inst.
Fixes#28087 - Make replace_all_instances and replace_instances behave
exactly the same by setting replace_instances = current list of instances
when replace_all_instances used. Root cause of issue was that without lc_check
terminate_batch will terminate all instances passed to it and after updating
the asg size we were querying the asg again for the list of instances - so terminate batch
saw the list including new ones just spun up.
When creating new asg with replace_all_instances: yes and lc_check: false
the instances that are initially created are then subsequently replaced.
This change makes it so replace only occurs if the asg already existed.
Add integration tests for #28087 and #35993.
* Remove default admin_distance and fix the idempotence thereof
Fixes#33290
* Fix tests and use yaml anchors to shorten tests
* Add test for undefined admin_distance
* Read config from `show run` if `show ip static route` fails
* Restore flags to ios.get_config & use get_config where appropriate
* win_lineinfile: fix#33858. Removed conversion from \r\n
* win_lineinfile: added test for #33858
* win_lineinfile: added documentation and more tests for change
* win_lineinfile: fixed wrong hash in testing
This fix adds datastore cluster details about datastore in returning
facts. Updated documentation and tests.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Decouple config and state check in {network_os }_vlan and { network_os }_vrf modules
Fixes#35567Fixes#34754
`interfaces` option is used for configuration as well as operational state
check. If interface is configured to given vlan or vrf but if
operational state of interface is disabled it results in module failure.
Fix is to decouple same option usage for config and state.
With this fix `interfaces` is used as config option and a new
option named `associated_interfaces` will be used for intent check
for assigned interfaces.
* Fix CI failures
* Fix review comment
* Fixed integration test failure