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.
* issue:43021 add support for onyx version 3.6.6000
Signed-off-by: Samer Deeb <samerd@mellanox.com>
* issue:43021 add support for onyx version 3.6.6000
Signed-off-by: Samer Deeb <samerd@mellanox.com>
* 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
* Correct the default doc for attached in ec2_eni
Also corrected a typo in the summary
* Address ansible-test sanity error about E324
* Fix and remove the E325 suppression for ec2_eni
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.
when using only an activation key without any channels.
As already suggested by mattclay in
https://github.com/ansible/ansible/pull/25079
and also patch unit test for rhn_register and
add test case for activationkey only
Portions of the f5-sdk were removed as well as the netaddr library
and were replaced with libraries that are part of ansible. Additionally,
deprecated code has been removed.
* 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
* Don't use copy.deepcopy in high workload areas, use deepishcopy. ci_complete
* Add tests
* Add changelog fragment
* rename to naive_deepcopy and add extra docs
* Rename to module_response_deepcopy and move to vars/clean
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.
This commit introduces a new module called vultr_network_facts.
This module aims to return the list of networks avaiable in Vultr.
Sample available here:
```
"vultr_network_facts": [
{
"date_created": "2018-08-02 11:18:49",
"id": "net5b62e8991adfg",
"name": "mynet",
"region": "Amsterdam",
"v4_subnet": "192.168.42.0",
"v4_subnet_mask": 24
}
]
```
* 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
- support config operations for EXOS-based platforms
- add regex to detect command failure responses
- add exos action plugin for "backup" operation
- add unit tests for exos_command (currently 94% coverage of
exos_config.py)
* 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.
NOTE:
1. use os.open() with os.O_CREAT|os.O_EXCL to check existence
and create a lock file if not exists, it's an atomic operation
2. the fastest process will create the lock file and others will
wait until the lock file is removed
3. after the writer finished writing to the password file, all the reading
operations use built-in open so processes can read the file parallel
* Update cloudflare_dns account link
* Add SSHFP and TLSA records to cloudflare_dns module
These are record types which Cloudflare recently added support
for. They both go well together with DNSSEC.
Technically it's a bit of a simplification to use the hash_type
parameter for TLSA records. Yet, it fits with all the real world usage
I have seen, and it keeps the module from sprawling too much.
Related to #43803
* 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 use of simplejson throughout code base. Fixes#42761
* Address failing tests
* Remove simplejson from contrib and other outlying files
* Add changelog fragment for simplejson removal
* 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
Add exos_facts module. Known limitations at this time include:
- Interface MTU is not reported.
- Only primary interface IP is reported.
Add basic unit tests for the exos_facts module.
An EXOS CLI prompt can be prefixed with '! ' (shutting down), '* '
(running configuration does not match saved configuration), and
can include various status tokens within parentheses after these
prefixes. Update prompt regex to accept valid CLI prompts.
* 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)
Vultr API is being inconsisten in what it returns. An empty list when no
resources exists, but a dict of dict when they do. The case needs to be
handled so the module do not fail. An extra test has been added.
* 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.
Only print warning when ansible.cfg is actually skipped
* Also add unittests for the find_ini_config_file function
* Add documentation on world writable current working directory
config files can no longer be loaded from a world writable current
working directory but the end user is allowed to specify that
explicitly. Give appropriate warnings and information on how.
Fixes#42388
* Refactoring to persistence connection BGP, factory, reload, save, showrun modules
* Refactoring methods from Util to module file
* Removing BGP Utility methods
* Adding to errors that need to be ignored
According to the do_encrypt interface, encrypt arg should be the hash method name used for encrypting returning password. But in the doc and lookup code it's a boolean flag, correct it to string.
* 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
* refactored from procedural to OOP
* updated ongoing maintenance windows to PagerDuty REST API v2
* update create maintenance windows to PagerDuty REST API v2
* update absent maintenance windows to PagerDuty REST API v2
* update pager alert module to PagerDuty REST API v2
* removed basic HTTP authorization
updated parameter description and examples
* fix failed sanity checks
* revised documentation according to review
* make obsolete service key parameter an alias to a new integration key parameter
* 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.
* Implement initial RouterOS support
* Correct matchers for license prompts
* Documentation updates & mild refactor
* Remove one last Cisco function
* Sanity test fixes
* Move imports to the beginning
* Remove authorize property
* Handle ANSI codes
* Revert to_lines function
* CR fixes
* test(routeros): add unit tests
* Added another test (with ANSI colors and banner in fixture).
* Ignore CRLF line endings in system_package_print file
* fix: review by ganeshrn
* Changed Foreman timeout to be setable via a parameter
Added a Parameter to set the timout to wait for the started Foreman actions
by the user instead of using the hard coded 1000 Seconds
* katello module screamed for more docu :)
* fix docu + some ci findings
made docu better and moved chices in relations to other options to the description
* added a quote to description and removed wrong combination of param product
* Removed choices from params
also removed katello from a ignore file
* 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
* CNOS Vlag module is refactored to use persistence connection instead of paramiko.
* Changing interface and port channel modules to persistent connection and adding UT for them.
* Fixing pep8 issues
* Removing trailing new line
* Removing trailing new line
* Removing trailing new line
* Correcting indentation mistake
* Update cnos_vlag.py
* Removing commented examples
They are commented because those configurations are not meant for L2 ports
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>
* nxos cliconf plugin refactor
Fixes#39056
* Refactor nxos cliconf plugin as per new api definition
* Minor changes in ios, eos, vyos cliconf plugin
* Change nxos httpapi plugin edit_config method to be in sync with
nxos cliconf edit_config
* Fix CI failure
* Fix unit test failure and review comment
Now that we don't need to worry about python-2.4 and 2.5, we can make
some improvements to the way AnsiballZ handles modules.
* Change AnsiballZ wrapper to use import to invoke the module
We need the module to think of itself as a script because it could be
coded as:
main()
or as:
if __name__ == '__main__':
main()
Or even as:
if __name__ == '__main__':
random_function_name()
A script will invoke all of those. Prior to this change, we invoked
a second Python interpreter on the module so that it really was
a script. However, this means that we have to run python twice (once
for the AnsiballZ wrapper and once for the module). This change makes
the module think that it is a script (because __name__ in the module ==
'__main__') but it's actually being invoked by us importing the module
code.
There's three ways we've come up to do this.
* The most elegant is to use zipimporter and tell the import mechanism
that the module being loaded is __main__:
* 5959f11c9d/lib/ansible/executor/module_common.py (L175)
* zipimporter is nice because we do not have to extract the module from
the zip file and save it to the disk when we do that. The import
machinery does it all for us.
* The drawback is that modules do not have a __file__ which points
to a real file when they do this. Modules could be using __file__
to for a variety of reasons, most of those probably have
replacements (the most common one is to find a writable directory
for temporary files. AnsibleModule.tmpdir should be used instead)
We can monkeypatch __file__ in fom AnsibleModule initialization
but that's kind of gross. There's no way I can see to do this
from the wrapper.
* Next, there's imp.load_module():
* https://github.com/abadger/ansible/blob/340edf7489/lib/ansible/executor/module_common.py#L151
* imp has the nice property of allowing us to set __name__ to
__main__ without changing the name of the file itself
* We also don't have to do anything special to set __file__ for
backwards compatibility (although the reason for that is the
drawback):
* Its drawback is that it requires the file to exist on disk so we
have to explicitly extract it from the zipfile and save it to
a temporary file
* The last choice is to use exec to execute the module:
* https://github.com/abadger/ansible/blob/f47a4ccc76/lib/ansible/executor/module_common.py#L175
* The code we would have to maintain for this looks pretty clean.
In the wrapper we create a ModuleType, set __file__ on it, read
the module's contents in from the zip file and then exec it.
* Drawbacks: We still have to explicitly extract the file's contents
from the zip archive instead of letting python's import mechanism
handle it.
* Exec also has hidden performance issues and breaks certain
assumptions that modules could be making about their own code:
http://lucumr.pocoo.org/2011/2/1/exec-in-python/
Our plan is to use imp.load_module() for now, deprecate the use of
__file__ in modules, and switch to zipimport once the deprecation
period for __file__ is over (without monkeypatching a fake __file__ in
via AnsibleModule).
* Rename the name of the AnsiBallZ wrapped module
This makes it obvious that the wrapped module isn't the module file that
we distribute. It's part of trying to mitigate the fact that the module
is now named __main)).py in tracebacks.
* Shield all wrapper symbols inside of a function
With the new import code, all symbols in the wrapper become visible in
the module. To mitigate the chance of collisions, move most symbols
into a toplevel function. The only symbols left in the global namespace
are now _ANSIBALLZ_WRAPPER and _ansiballz_main.
revised porting guide entry
Integrate code coverage collection into AnsiballZ.
ci_coverage
ci_complete
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
d7df072b96 changed how we call
journal.send() from positional arguments to keyword arguments. So we
need to update the test to check for the arguments it was called with in
the keyword args, not in the positional args.
* 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
* Documentation change for resizefs
Changed documentation to match the default value of resizefs set in the code.
Added a note on the resizefs use on the example utilizing it.
* Remove test now it validates fine
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>