Fixes a bug where parse_distribution_file_ClearLinux() was called on CoreOS (and probably many other distros) and it returned True since it successfully parses the distribution file. Since this file exists on many Linux distributions and they are a very similar format, add an additional check to make sure it is Clear Linux.
Change the order in which distribution files are processed so NA is last. This prevents a match on CoreOS hosts since they also have /etc/os-release and the called matching function for NA is very general and will match CoreOS.
* Add changelog
* Add unit tests
Only add tests for Clear Linux parsing since that was the cause of this issue.
* Add support for Windows hosts in the SSH connection plugin
* fix Python 2.6 unit test and sanity issues
* fix up connection tests in CI, disable SCP for now
* ensure we don't pollute the existing environment during the test
* Add connection_windows_ssh to classifier
* use test dir for inventory file
* Required powershell as default shell and fix tests
* Remove exlicit become_methods on connection
* clarify console encoding comment
* ignore recent SCP errors in integration tests
* Add cmd shell type and added more tests
* Fix some doc issues
* revises windows faq
* add anchors for windows links
* revises windows setup page
* Update changelogs/fragments/windows-ssh.yaml
Co-Authored-By: jborean93 <jborean93@gmail.com>
* initial commit
* fixed the linting and requests error
* updated test file setup
* updated code as per feedback
* updated test import
* updated test import with unittest
* updated validate certs for https
* updated after pep8 test
* removed under-construction remark
* Initial commit
* removed type for tests
* removed types and added ssl compatibility
* applied return type
* applied return type as dict instead of obj
* applied types in eact field
* tested with a playbook
* modified owner
* added unit test
* following pep8 guidelines
* added mock and unittest separately
* Sanity check using pep8
* added full path on patch
* ios_logging: fix the error checking the existence of "host" destinations (IOS 12)
In the "have" list, records of type "host" do not contain the key "size",
although in the list "want" it is always there. Because of this, the module
assumes that the "host" type destinations is not configured and does it again.
This does not change the configuration on the device, but is redundant and
the status of the task will always be "changed". This patch fixes it.
* ios_logging: fixes#53227
* ios_logging: minor changes in string matching
* Replace InventoryFileCacheModule with a better developer-interface
Use new interface for inventory plugins with backwards compatibility
Auto-update the backing cache-plugin if the cache has changed after parsing the inventory plugin
* Update CacheModules to use the config system and add a deprecation warning if they are being imported directly rather than using cache_loader
* Fix foreman inventory caching
* Add tests
* Add integration test to check that fact caching works normally with cache plugins using ansible.constants and inventory caching provides a helpful error for non-compatible cache plugins
* Add some developer documentation for inventory and cache plugins
* Add user documentation for inventory caching
* Add deprecation docs
* Apply suggestions from docs review
* Add changelog
* make add_group return proper name
* ensure central transform/check
* added 'silent' option to avoid spamming current users
those already using the plugins were used to the transformations, so no need to alert them
* centralized valid var names
* dont display dupes
* comment on regex
* added regex tests
ini and script will now warn about deprecation
* more complete errormsg
* Rename method and make private
* Use is_iterable, combine transformations
* Remove unused return_values from network modules
* Improve docstrings in new functions
* Add new PASS_VAR
* Add unit tests for list_no_log_values
* Fix unit tests for Python 2.6
Refinements:
- return legal_inputs and update class properties
- remove redundant arguments from method and handle in caller
- add better exception types to method
* Add unit tests for handle_aliases
* uri/win_uri: Make method a free text field
Since various interfaces introduce their own HTTP method (e.g. like
PROPFIND, LIST or TRACE) it's better to leave this up to the user.
* Fix HTTP method check in module_utils urls
* Add integration test for method UNKNOWN
* Clarify the change as requested during review
* Python interpreter discovery
* No longer blindly default to only `/usr/bin/python`
* `ansible_python_interpreter` defaults to `auto_legacy`, which will discover the platform Python interpreter on some platforms (but still favor `/usr/bin/python` if present for backward compatibility). Use `auto` to always use the discovered interpreter, append `_silent` to either value to suppress warnings.
* includes new doc utility method `get_versioned_doclink` to generate a major.minor versioned doclink against docs.ansible.com (or some other config-overridden URL)
* docs revisions for python interpreter discovery
(cherry picked from commit 5b53c0012ab7212304c28fdd24cb33fd8ff755c2)
* verify output on some distros, cleanup
* Added storage modules and unit tests
Removed unnecessary file
Fixing pep8 issues
Adding reusable documentation to the data fragment file
Fixing issues reported by module validation in documentation
Fixed issues: 10549, 10553
Fixed unit tests
Added future imports and removed license from init py file
Resolved import issue reported by ansible sanity test
Fixed unit tests
Adding CPG management module
Fixing sanity test issues
Resolving line ending issues
Resolved import issue reported by ansible sanity test
Correcting the error message when resource is more than 31 char
Update hpe3par_cpg.py
Fix for defect 10556: Unable to modify volume. Persona not set
Fix for defect 10556: Unable to modify volume. Persona not set
Fixing pep8 changes
Fixed pep8 issues
Added more pep8 related fixes
Added more pep8 related fixes
Fixed rebase issue in cps test
Adding GPL3.0+ License (#7)
* Update hpe3par.py
* Update hpe3par_cpg.py
* Update hpe3par_cpg.py
Adding GPLV3+ only license
Fix anity test
Addressing review comments
Fixing undefined variable error
Addressed review comments and added more unit tests (#8)
Added maintainers
Fixed sanity test
Update test_hpe3par_cpg.py
Renamed the module as per the review comments (#9)
* Added maintainers
* Renaming the module to remove the vendor name from the module
* remove pep8 related issues
Modify the requirements to add version of 3par sdk
Review address (#10)
* Unit is no longer a different paramter in the task
* Fixing unit tests
* Taking into account the default values
Fixing issue with default values
fixing unit test
Adding more flexibility and checks to the size and it's units
Fixed pylint extra line issue
Fixing conflicts in BOTMETA.yml
Made changes according to the review comments
Updating ansible version
Refactored the code to move reusable method to module utils
Modified the GPLv3+ license text according to the review comments. Modified the module utils license to BSD
Corrected the BOTMETA entry. Fixed the pep8 issues
Fixing entries in BOTMETA.yml
Removed ansible version, renamed the version to address the name review comments
Reverting name change for module to revert test failures
Set size and raid type and now reuqired together based on the review comment
Fixed unit tests
Removing default value as raid and set size are now required together
Renaming the modules to ss_3par_*
Resolving the pep8 issues
Added storage modules and unit tests
Removed unnecessary file
Fixing pep8 issues
Adding reusable documentation to the data fragment file
Fixing issues reported by module validation in documentation
Fixed issues: 10549, 10553
Fixed unit tests
Added future imports and removed license from init py file
Resolved import issue reported by ansible sanity test
Fixed unit tests
Adding CPG management module
Fixing sanity test issues
Resolving line ending issues
Resolved import issue reported by ansible sanity test
Correcting the error message when resource is more than 31 char
Update hpe3par_cpg.py
Fix for defect 10556: Unable to modify volume. Persona not set
Fix for defect 10556: Unable to modify volume. Persona not set
Fixing pep8 changes
Fixed pep8 issues
Added more pep8 related fixes
Added more pep8 related fixes
Fixed rebase issue in cps test
Adding GPL3.0+ License (#7)
* Update hpe3par.py
* Update hpe3par_cpg.py
* Update hpe3par_cpg.py
Adding GPLV3+ only license
Fix anity test
Addressing review comments
Fixing undefined variable error
Addressed review comments and added more unit tests (#8)
Added maintainers
Fixed sanity test
Update test_hpe3par_cpg.py
Renamed the module as per the review comments (#9)
* Added maintainers
* Renaming the module to remove the vendor name from the module
* remove pep8 related issues
Modify the requirements to add version of 3par sdk
Review address (#10)
* Unit is no longer a different paramter in the task
* Fixing unit tests
* Taking into account the default values
Fixing issue with default values
fixing unit test
Adding more flexibility and checks to the size and it's units
Fixed pylint extra line issue
Fixing conflicts in BOTMETA.yml
Made changes according to the review comments
Updating ansible version
Refactored the code to move reusable method to module utils
Modified the GPLv3+ license text according to the review comments. Modified the module utils license to BSD
Corrected the BOTMETA entry. Fixed the pep8 issues
Removed ansible version, renamed the version to address the name review comments
Reverting name change for module to revert test failures
Set size and raid type and now reuqired together based on the review comment
Fixed unit tests
Removing default value as raid and set size are now required together
Renaming the modules to ss_3par_*
Resolving the pep8 issues
Update lib/ansible/modules/storage/hpe3par/ss_3par_cpg.py
Co-Authored-By: farhan7500 <farhan7500@gmail.com>
Update lib/ansible/modules/storage/hpe3par/ss_3par_cpg.py
Co-Authored-By: farhan7500 <farhan7500@gmail.com>
Fixed rebase issue
Fixed rebase issuein BOTMETA.yml
* Modified the documentation based on the review comments
* Fixed the pep8 sanity issue
* Moved the doc fragment file based on latest changes
* Reverting inadvertent rebase changes
* Fixed inadvertent change during rebase
* added validate_certs paramter to allow for ignoring of SSL certificates
* formatting
* updated NSO unit tests with validate_certs variable
* fixed NSO tests
* Add laps_password lookup for retrieving a Windows LAPS Password
* Remove python-ldap from requirements and fix doc typos
* enable unit tests without ldap dependency
* use config options for lookup plugin
* Update docs and tests based on further distro testing
* changes to clusteR
* changes to clusteR
* Revert "changes to clusteR"
This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.
* Revert "changes to clusteR"
This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.
* new module na_ontap_vscan_on_access_policy
* update author
* remove blank trys'
* switch to int
This PR includes:
- Adding parameter types
- Fix validate-modules issue
- Improve parameter types and resulting changes
This PR needs to be verified and tested by maintainer(s).
* changes to clusteR
* Revert "changes to clusteR"
This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.
* Add vscan on demand task
* fix author line
* changes to clusteR
* Revert "changes to clusteR"
This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.
* allow for more than 1 time to be set
* move file to correct directory
* Ansibot fixes
* changes to clusteR
* Revert "changes to clusteR"
This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.
* Rewrite of user roles
* Rewrite of user roles
* Fix author tag
* update
* fix author
* Revert "changes to clusteR"
This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.
* New module Flexcache
* update documentation string, and copyright date
* fix issues
* Revert "Revert "changes to clusteR""
This reverts commit 4dab6f7607.
- xenserver module_util: fixed a bug in gather_vm_params function where
an exception was generated if XenServer product_version_text_short
parameter contained non numeric characters, e.g. "7.1 CU1" on
XenServer version 7.1 with Cummulative Update 1. Code was changed
to use product_version parameter instead which is all numeric.
- xenserver module_util: get_xenserver_version function is changed
to return a list of integers for major, minor and update version
instead of list of strings.
- xenserver module_util: unit tests are updated according to changes.
- xenserver module_util: removed unused imports.
* Add support for elements validation in argspec
Fixes#48473
* Add support to validate the elements value in argspec
when type is `list`
* Fix unit test failures
* Add unit test for elements validation
* Fix CI failures
* Fix review comments
* Fix unit test and CI failures after rebase
* Facts parsing for cmdline can now handle multiple values for a single key.
* Unit tests for cmdline fact parsing
* Review comments
Fixes: #22766
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* First pass at allowing unix socket with urls/uri. See #42341
* Only insert handler as needed
* Fix and add tests
* Add HTTPS functionality for unix sockets
* Additional test fixes
* Create context manager for monkey patching HTTPConnection.connect, de-dupe code, raise better errors
* doc
* Add a few more tests
* Fix __call__
* Remove unused import
* Patch HTTPConnection.connect with the functionality we want, instead of duplicating code and disabling
* Fix var name
* Remove unused var
* Add changelog fragment
* Update uri docs
* Fix rebase indentation issue
* Refactored code
* Added support for Cumulus Linux 2.5.4
* Added support for Cumulus Linux 3.7.3
* Test added
Fixes: #29969
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* New LUKS devices management module
- new module that uses cryptsetup (LUKS) functions for management
of encrypted devices
- unit tests included
* New LUKS devices management module
- modified interface by removing 'open' option and moving its functionality
into 'state' option
* Introduce new "required_by' argument_spec option
This PR introduces a new **required_by** argument_spec option which allows you to say *"if parameter A is set, parameter B and C are required as well"*.
- The difference with **required_if** is that it can only add dependencies if a parameter is set to a specific value, not when it is just defined.
- The difference with **required_together** is that it has a commutative property, so: *"Parameter A and B are required together, if one of them has been defined"*.
As an example, we need this for the complex options that the xml module provides. One of the issues we often see is that users are not using the correct combination of options, and then are surprised that the module does not perform the requested action(s).
This would be solved by adding the correct dependencies, and mutual exclusives. For us this is important to get this shipped together with the new xml module in Ansible v2.4. (This is related to bugfix https://github.com/ansible/ansible/pull/28657)
```python
module = AnsibleModule(
argument_spec=dict(
path=dict(type='path', aliases=['dest', 'file']),
xmlstring=dict(type='str'),
xpath=dict(type='str'),
namespaces=dict(type='dict', default={}),
state=dict(type='str', default='present', choices=['absent',
'present'], aliases=['ensure']),
value=dict(type='raw'),
attribute=dict(type='raw'),
add_children=dict(type='list'),
set_children=dict(type='list'),
count=dict(type='bool', default=False),
print_match=dict(type='bool', default=False),
pretty_print=dict(type='bool', default=False),
content=dict(type='str', choices=['attribute', 'text']),
input_type=dict(type='str', default='yaml', choices=['xml',
'yaml']),
backup=dict(type='bool', default=False),
),
supports_check_mode=True,
required_by=dict(
add_children=['xpath'],
attribute=['value', 'xpath'],
content=['xpath'],
set_children=['xpath'],
value=['xpath'],
),
required_if=[
['count', True, ['xpath']],
['print_match', True, ['xpath']],
],
required_one_of=[
['path', 'xmlstring'],
['add_children', 'content', 'count', 'pretty_print', 'print_match', 'set_children', 'value'],
],
mutually_exclusive=[
['add_children', 'content', 'count', 'print_match','set_children', 'value'],
['path', 'xmlstring'],
],
)
```
* Rebase and fix conflict
* Add modules that use required_by functionality
* Update required_by schema
* Fix rebase issue
* identity: Add GSSAPI suport for FreeIPA authentication
This enables the usage of GSSAPI for authentication, instead of having
to pass the username and password as part of the playbook run.
If there is GSSAPI support, this makes the password optional, and will
be able to use the KRB5_CLIENT_KTNAME or the KRB5CCNAME environment
variables; which are standard when using kerberos authentication.
Note that this depends on the urllib_gssapi library, and will only
enable this if that library is available.
* identity: Add documentation for GSSAPI authentication for FreeIPA
This documentation describes how to use GSSAPI authentication with the
IPA identity modules.
* identity: Add changelog for GSSAPI support for IPA
This adds the changelog entry for the GSSAPI authentication feature for
the IPA identity module.
* Initial commit for xenserver_guest_facts module
* New module: xenserver_guest_facts. Returns facts of XenServer VMs. Module is fully documented.
* Added unit tests for the module
* Moved FakeXenAPI import to a dedicated fixture, other fixes
* Removed unused imports, minor fixes to unit test code