The accumulated collected_facts was being update
with new facts _after_ filtering them. So only
facts that pass the filter would ever be passed
to other fact collectors.
For 'filter=ansible_service_mgr', even though it requires
the platform and distribution facts and even collects them,
they would get filtered out and never passed to the other
collectors that need them (service_mgr for ex).
Fix is just to add the unfiltered facts to collected_facts.
Adds unit tests for fact filter and collected_facts.
Fixes#32286
The search string used to look for Clear Linux
was changed in 45a9f96774 to
be more specific, but was too specific. Now finding
a substring match for 'Clear Linux' in /usr/lib/os-release
is enough to consider a match.
Since the details of the full name in os-release varies
('Clear Linux Software for Intel Architecture',
'Clear Linux OS for Intel Architecture', etc) the
search string match was failing and would fall back to the
'first word in the release file' method resulting in
ansible_distribution='NAME="Clear'
Also add a meta fact indicating which search string
was matched.
Test case info from:
https://github.com/ansible/ansible/issues/31501#issuecomment-340861535Fixes#31501
Extract vault related bits of DataLoader._get_file_contents to DataLoader._decrypt_if_vault_data
When loading vault password files, detect if they are vault encrypted, and if so, try to decrypt with any already known vault secrets.
This implements the 'Allow vault password files to be vault encrypted' (#31002) feature card from
the 2.5.0 project at https://github.com/ansible/ansible/projects/9Fixes#31002
People expect to be able to upload files to s3 using standard
locations for files.
Providing an action plugin that effectively rewrites the `src`
key to the result of finding such a file is a great help.
Tests added, and IAM permissions corrected
* First pass at include_role tests
* Reorganize test structure
Do all import and include tests in a single target.
* Build out more tests and test with linear and free strategy for each type
* import_role tests
* Set target host for play test
* Basic import_playbook tests
* Basic import/include_tasks tests
* Add recursion test
* import_playbook tests
* Add import_playbook group_vars test
Issue #33177
* Additional group_var tests for import_playbook
* Enable recursion test
* More work on import_tasks
* Run all tests via run.sh, improve conditional tests, add never tag
Add never tag to certain failining tests and explicitly skip it for now until #34104 is merged. Some tasks need to remain commented out because they cause the entire play to fail and aren't skippable by tags because they are syntax and/or variable checks.
Improve test for whether or not a role was run based on a conditional. Since the [import|include]_role does not register a variable, use a variable that is set inside a role as a canary test for whether or not the role was run.
* Use a fail task rather than trigger a failure via bogus command
This should resolve the "unstable" test results.
* Import tag tests
Fix bug it tests where validate tasks weren't run on tag tests.
Add tests for task import/include with tags.
* Remove test for playbook group_var inheritance
* npm module compatible with npm5
Uses the `--long` flag in `npm list` to get the `missing` key back.
* npm: add integration tests
* npm: test the module with npm 4 as well
* Remove debug tasks, use variables
* Use tests instead of filters
* Adds xcambar as a maintainer of the npm module
* win_iis_webbinding: Fix bug with ipaddress * returning multiple bindings
instead of only the ones defined as *. Address possible future issues around
hostheader * by just disallowing it. Resolves 25473. Added new test for
this case.
Removed all validation for https binding collisions due to difficulty in
validating all cases in which they could or could not collide. As a
result, also removed return values relating to certificate data.
Updated testing and docs appropriately
* win_iis_webbinding: added break to remove binding loops
* Moved the encryption to its own action method.
* removed silly default value for encryption type.
* Code formatting issues from pull request ANSIBOT.
* changed version_added to "2.5"
because of new new options available
* changed version_added to "2.5"
because of new new options available
* changed version_added to "2.5"
because of new new options available
* compare arg+aliases between docs and argument_spec
* Add some special handling for the network modules provider options that also appear in the top level arg spec
* Fix error code for bigip_hostname
* Address merge conflicts due to changes in f5 modules
* Update validate-modules ignore based off a clean execution
* Address merge conflicts
* Address renamed module
* Address recent changes to modules
* Add ignore for ucs_ip_pool
* Update aci modules to get more reliable documentation comparison, but not mutating the module_utils aci_argument_spec
* Update ignore.txt after recent aci updates
* Add extra guard to ensure we handle provider special only for network modules
* Address additional changes to modules
* added cloudfont.py, modified cloudfront_facts.py class name and fixed a minor bug
* Improvements to cloudfront_distribution
* Reduce the scope of the cloudfront_distribution module
* Remove presigning
* Remove streaming distribution functionality
* Add full test suite for cloudfront distribution
* Meet Ansible AWS guidelines
* Make requested changes
Fix tests
Use built-in waiter
Update copyright
* Adds custom_data parameter to azure virtual machine resource
Invoke custom_data in an integration test: This invocation of
custom_data should not cause any side effects.
* Bugfix: String encoding now works in both python2 and 3
* Fix pep8 violations
* Use nginx to serve a text file created via custom_data and verify that
that custom_data is working
* fix up azure_rm_virtualmachine custom_data
* tweaks #25924
* simplify string encoding fun
* don't rely on external packages
* Remove nxos_nxapi config test as config param is deprecated and removed
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
* fix nxos_nxapi disable test
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
There are changes that the merge config can fail, but the module
will still report success. This adds a blob of code to start
collecting those failures and bubbling up a module failure
accordingly.
* adding azure_rm_mysqldatabase
* updates to azure_rm_mysqldatabase
* updates to azure_rm_mysqldatabase
* updates to azure_rm_mysqldatabase
* updates to azure_rm_mysqldatabase
* updates to azure_rm_mysqldatabase
* updates to azure_rm_mysqldatabase
* Updated docs around force_update
* adding azure_rm_postgresqldatabase
* updates to azure_rm_postgresqldatabase
* updates to azure_rm_postgresqldatabase
* updates to azure_rm_postgresqldatabase
* updates to azure_rm_postgresqldatabase
* updates to azure_rm_postgresqldatabase
* updates to azure_rm_postgresqldatabase
* Updated docs around force_update
* first dirty container instance
* added my name ;-)
* more updates
* more updates
* removed unnecessary stuff
* container instance updates
* several fixes
* undo changes in common
* removed unnecessary references, fixed delete
* added / updated parameters
* updated samples & comments
* updated docs, comments, samples and added registry credentials
* added ip address and port
* query existing container instance (but result not used yet)
* some major changes to the module
* more fixes
* added requirement for containerinstance module
* adding integration test
* fixes for pull request
* updated version
* updated version to 2.5
* updated version
* updated integration.cloud.azure.txt as requested by test framework
* removed due to merge reasons
* updated requirements-azure.txt
* undone azure-rm-common
* lf
* properly update test requirements
* first dirty container instance
* container instance updates
* several fixes
* review related updates
* review related fixes
* undo changes in common
* added / updated parameters
* query existing container instance (but result not used yet)
* updated version to 2.5
* updated version
* removed due to merge reasons
* updated requirements-azure.txt
* undone azure-rm-common
* properly update test requirements
* minor fix - sanity
* fix one issue after rebasing
* removed files accidentally added while rebasing
* removed checking for changes
* several fixes
* fixed sanity
* updates as requested by reviewers
* removed ci as it doesn't work
* reenabled ci
* renamed container instance, removed required: false
* removed default: null
* final updates according to the review
* one more fix
* first dirty container instance
* added my name ;-)
* more updates
* more updates
* removed unnecessary stuff
* container instance updates
* several fixes
* undo changes in common
* removed unnecessary references, fixed delete
* added / updated parameters
* updated samples & comments
* updated docs, comments, samples and added registry credentials
* added ip address and port
* query existing container instance (but result not used yet)
* some major changes to the module
* more fixes
* adding integration test
* fixes for pull request
* updated version
* updated version to 2.5
* updated version
* updated integration.cloud.azure.txt as requested by test framework
* removed due to merge reasons
* updated requirements-azure.txt
* undone azure-rm-common
* lf
* properly update test requirements
* review related updates
* first dirty container instance
* container instance updates
* several fixes
* review related fixes
* undo changes in common
* added / updated parameters
* query existing container instance (but result not used yet)
* updated version to 2.5
* updated version
* removed due to merge reasons
* updated requirements-azure.txt
* undone azure-rm-common
* properly update test requirements
* minor fix - sanity
* fix one issue after rebasing
* removed files accidentally added while rebasing
* removed checking for changes
* several fixes
* fixed sanity
* updates as requested by reviewers
* removed ci as it doesn't work
* reenabled ci
* renamed container instance, removed required: false
* removed default: null
* final updates according to the review
* one more fix
* changed location as default from resource group can't handle containers
* updates to container instance
* fixed mistakes during merge
* one more fix
* another mistake
* container instance fixes
* several fixes to container instance
* return value fix
* minor update
* just one api version right now
* fixed api version
* container instance does not suppurt api version
* removed unnecessary try blocks
* removed tags related things
* fixed pep8
* final fixes?
* final updates to the module
* more fixes
* Fix ec2_vpc_net tags
PR #33105 broke the tags returned by ec2_vpc_net - it was returning the raw boto3 list instead of a dict as expected.
* Add a test for tags
* IP address pool module and integration tests
* Examples corrected and imports moved to beginning of module.
* Revert ucsmsdk import lines to avoid import sanity test failures.
* Add comment around imports for ucsmsdk.
Fixes # 34917
* Remove spaces from in between interface name
* Convert interface name to lower case as interface name
is case insensitive wrt configuring on remote device.
* allow shells to have per host options, remote_tmp
added language to shell
removed module lang setting from general as plugins have it now
use get to avoid bad powershell plugin
more resilient tmp discovery, fall back to `pwd`
add shell to docs
fixed options for when frags are only options
added shell set ops in t_e and fixed option frags
normalize tmp dir usag4e
- pass tmpdir/tmp/temp options as env var to commands, making it default for tempfile
- adjusted ansiballz tmpdir
- default local tempfile usage to the configured local tmp
- set env temp in action
add options to powershell
shift temporary to internal envvar/params
ensure tempdir is set if we pass var
ensure basic and url use expected tempdir
ensure localhost uses local tmp
give /var/tmp priority, less perms issues
more consistent tempfile mgmt for ansiballz
made async_dir configurable
better action handling, allow for finally rm tmp
fixed tmp issue and no more tempdir in ballz
hostvarize world readable and admin users
always set shell tempdir
added comment to discourage use of exception/flow control
* Mostly revert expand_user as it's not quite working.
This was an additional feature anyhow.
Kept the use of pwd as a fallback but moved it to a second ssh
connection. This is not optimal but getting that to work in a single
ssh connection was part of the problem holding this up.
(cherry picked from commit 395b714120522f15e4c90a346f5e8e8d79213aca)
* fixed script and other action plugins
ensure tmpdir deletion
allow for connections that don't support new options (legacy, 3rd party)
fixed tests
* Cache tasks as they are queued instead of en masse
This also moves the task caching from the PlayIterator to the
StrategyBase class, where it makes more sense (and makes it easier
to not have to change the strategy class methods leading to an API
change).
Fixes#31673
* Cleaning up unit tests due to 502ca780
* Add validation for the next to last line of a module
* Fix last error code
* Reduce to a single conditional
* Fix conditionals
* Move the final warnings statement to main() in mysql_replication
* acl test: don't use restricted key
Fix this warning: [WARNING]: Removed restricted key from module data: ansible_user = ansible_user
* acl test: allow to execute twice in a row
* updates to azure_rm_sqlserver_facts
* updates to azure_rm_sqlserver_facts
* updates to azure_rm_sqlserver_facts
* updates to azure_rm_sqlserver_facts
* updates to azure_rm_sqlserver_facts
* updates to azure_rm_sqlserver_facts
* updates to azure_rm_sqlserver_facts
* updates to azure_rm_sqlserver_facts
* updates to azure_rm_sqlserver_facts
* updates to azure_rm_sqlserver_facts
This patch is primarily a refactor to make the validate-modules arg-spec
no longer generate a traceback. It additionally includes removal of deprecated
code in the virtual server module.
The main patch is to remove the traceback generating code. There are
other small fixes that were made in addition to doing that.
* Removed re-def of cleanup_tokens.
* Changed parameter args to be keywords.
* Changed imports to include new module_util locations.
* Imports also include developing (sideband) module_util locations.
* Changed to using F5Client and plain AnsibleModule to prevent tracebacks caused by missing libraries.
* Removed init and update methods from most Parameter classes (optimization) as its now included in module_utils.
* Changed module and module param references to take into account the new self.module arg.
* Minor bug fixes made during this refactor.
The main purpose of this patch is to do the refactor that
supports replacing tracebacks with fail_json. Additionally, the
following was done.
* Removed re-def of cleanup_tokens.
* Changed parameter args to be keywords.
* Changed imports to include new module_util locations.
* Imports also include developing (sideband) module_util locations.
* Changed to using F5Client and plain AnsibleModule to prevent tracebacks caused by missing libraries.
* Removed init and update methods from most Parameter classes (optimization) as its now included in module_utils.
* Changed module and module param references to take into account the new self.module arg.
* Minor bug fixes made during this refactor.
Primarily, this patch contains refactors to remove tracebacks that
are generated when libraries are missing. There is also,
* Removed re-def of cleanup_tokens.
* Changed parameter args to be keywords.
* Changed imports to include new module_util locations.
* Imports also include developing (sideband) module_util locations.
* Changed to using F5Client and plain AnsibleModule to prevent tracebacks caused by missing libraries.
* Removed init and update methods from most Parameter classes (optimization) as its now included in module_utils.
* Changed module and module param references to take into account the new self.module arg. Minor bug fixes made during this refactor.
This patch was primarily an effort to reduce traceback errors for
work that sivel was doing. Part of (and in some cases in addition to)
that, the following was done.
* Removed re-def of cleanup_tokens.
* Changed parameter args to be keywords.
* Changed imports to include new module_util locations.
* Imports also include developing (sideband) module_util locations.
* Changed to using F5Client and plain AnsibleModule to prevent tracebacks caused by missing libraries.
* Removed init and update methods from most Parameter classes (optimization) as its now included in module_utils.
* Changed module and module param references to take into account the new self.module arg.
* Minor bug fixes made during this refactor.
* Fix junos_netconf integration test failure
Set ansible_connection to netconf for junos_command module
in junos_netconf integration test
* Fix review comments
* fix broken import
* ansible.module_utils.ec2.HAS_BOTO is already used
* wait_timeout parameter: use 'int' type
* wait is always True there
* doc: use formatting function
This patchset updates module integration testing to
validate the changes in PR #5454
This patchset instructs apache2_module to disable all
mpm modules, enable mpm_event, then disable mpm_event
and enable mpm_worker.
This patchset instructs apache2_module to disable all
mpm modules with `ignore_configcheck` set to False
and then disable all mpm modules with `ignore_configcheck`
set to True.
SuSe family of distributions do not ship apache2 with
mpm modules other than prefork. mpm_event and mpm_worker
checks are skipped for SuSe family of distributions.
Fixes: #5328
* Update validate-modules arg_spec introspection to be faster, by only mocking the imports we explicitly list
* The use of types.MethodType in redhat_subscription wasn't py3 compatible, use partial instead
* Remove argument_spec import hacks, make them errors, we can ignore them with ansible-test
* Enable the --arg-spec flag for validate-modules
* aci_vlan_pool_encap_block: New module to manage VLAN encap blocks
This module is a simplified version of the aci_encap_pool_range module.
* PEP8 fixes (closer to the original)
* Add integration tests
* Mellanox OS name change: MLNXOS changed to ONYX
Signed-off-by: Samer Deeb <samerd@mellanox.com>
* Fix alphabetical order of modules metadata
Signed-off-by: Samer Deeb <samerd@mellanox.com>
* aci_vlan_pool: Module to manage VLAN pools
This is a simplified version of the aci_encap_pool module.
* Add integration tests, based on aci_encap_pool
* Add new module for managing ospf protocol on mlnxos devices
Signed-off-by: Samer Deeb <samerd@mellanox.com>
* Fix test name, and documentation.
Signed-off-by: Samer Deeb <samerd@mellanox.com>
* filesystem: list used tools
* filesystem: btrfs and reiserfs don't support resizing
* filesystem: list supported filesystems
use formatting functions and 'filesystem' instead of 'file system'
* filesystem: PEP8
* filesystem: remove useless calls to module.boolean
* filesystem: fail when the requested action isn't implemented
* filesystem: resizefs: list supported FS rather than unsupported
* filesystem: refactor
* filesystem: add integration tests
* filesystem: allow to use image file with 'dev' param
* filesystem: test resizefs (ext2/3/4 filesystems only)
* filesystem: Btrfs, handle older version than v0.20-rc1
* filesystem: use loop keyword (integration tests)
* filesystem: new test, check when another filesystem already exists
* filesystem: add myself as a maintainer
* filesystem: fix tests as filters
This adds a new module called 'vmware_host_config_facts' which
gathers facts about advanced configuration informantion about ESXi host or all
ESXi hosts from given cluster.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* converted win_updates to an action plugin for automatic reboots
* do not set final result when running under async
* Updated documentation around win_updates with async and become
In the ec2_asg integration tests there are a couple places where
parameters are specified twice (as bot `tag.Name` and `name:`) and
others where those parameters aren't needed for the state requested.
* adding azure_rm_postgresqlserver
* removed semicolon placed by mistake
* updates to azure_rm_postgresqlserver
* updates to azure_rm_postgresqlserver
* updates to azure_rm_postgresqlserver
* updates to azure_rm_postgresqlserver
* updates to azure_rm_postgresqlserver
* updates to azure_rm_postgresqlserver
* updates to azure_rm_postgresqlserver
* updates to azure_rm_postgresqlserver
* Updated dependencies
* Allow protection of certain keys during camel_to_snake
Create an `ignore_list` parameter that preserves the case
of the contents of certain dictionaries. Most valuable
for `tags` but other uses might arise.
* Port ec2_vpc_route_table to boto3
Update tests to reflect fixes in boto3.
* Add RETURN documentation to ec2_vpc_route_table
* Update DOCUMENTATION to be valid yaml
* Add check mode tests
* Add aws_s3 integration tests for multipart GET operations
* Make multipart test platform-specific
* Use YAML anchors to simplify passing credentials
* Run tests on Linux and MacOSX
* Provide a way to explicitly invoke the debugger with in the debug strategy
* Merge the debugger strategy into StrategyBase
* Fix some logic, pin to a single result
* Make redo also continue
* Make sure that if the debug closure doesn't need to process the result, that we still return it
* Fix failing tests for the strategy
* Clean up messages from debugger and exit code to match bin/ansible
* Move the FieldAttribute higher, to apply at different levels
* make debugger a string, expand logic
* Better host state rollbacks
* More explicit debugger prompt
* ENABLE_TASK_DEBUGGER should be boolean, and better docs
* No bare except, add pprint, alias h, vars to task_vars
* _validate_debugger can ignore non-string, that can be caught later
* Address issue if there were no previous tasks/state, and use the correct key
* Update docs for changes to the debugger
* Guard against a stat going negative through use of decrement
* Add a few notes about using the debugger on the free strategy
* Add changelog entry for task debugger
* Add a few versionadded indicators and a note about vars -> task_vars