* [WIP] become plugins
Move from hardcoded method to plugins for ease of use, expansion and overrides
- load into connection as it is going to be the main consumer
- play_context will also use to keep backwards compat API
- ensure shell is used to construct commands when needed
- migrate settings remove from base config in favor of plugin specific configs
- cleanup ansible-doc
- add become plugin docs
- remove deprecated sudo/su code and keywords
- adjust become options for cli
- set plugin options from context
- ensure config defs are avaialbe before instance
- refactored getting the shell plugin, fixed tests
- changed into regex as they were string matching, which does not work with random string generation
- explicitly set flags for play context tests
- moved plugin loading up front
- now loads for basedir also
- allow pyc/o for non m modules
- fixes to tests and some plugins
- migrate to play objects fro play_context
- simiplify gathering
- added utf8 headers
- moved option setting
- add fail msg to dzdo
- use tuple for multiple options on fail/missing
- fix relative plugin paths
- shift from play context to play
- all tasks already inherit this from play directly
- remove obsolete 'set play'
- correct environment handling
- add wrap_exe option to pfexec
- fix runas to noop
- fixed setting play context
- added password configs
- removed required false
- remove from doc building till they are ready
future development:
- deal with 'enable' and 'runas' which are not 'command wrappers' but 'state flags' and currently hardcoded in diff subsystems
* cleanup
remove callers to removed func
removed --sudo cli doc refs
remove runas become_exe
ensure keyerorr on plugin
also fix backwards compat, missing method is attributeerror, not ansible error
get remote_user consistently
ignore missing system_tmpdirs on plugin load
correct config precedence
add deprecation
fix networking imports
backwards compat for plugins using BECOME_METHODS
* Port become_plugins to context.CLIARGS
This is a work in progress:
* Stop passing options around everywhere as we can use context.CLIARGS
instead
* Refactor make_become_commands as asked for by alikins
* Typo in comment fix
* Stop loading values from the cli in more than one place
Both play and play_context were saving default values from the cli
arguments directly. This changes things so that the default values are
loaded into the play and then play_context takes them from there.
* Rename BECOME_PLUGIN_PATH to DEFAULT_BECOME_PLUGIN_PATH
As alikins said, all other plugin paths are named
DEFAULT_plugintype_PLUGIN_PATH. If we're going to rename these, that
should be done all at one time rather than piecemeal.
* One to throw away
This is a set of hacks to get setting FieldAttribute defaults to command
line args to work. It's not fully done yet.
After talking it over with sivel and jimi-c this should be done by
fixing FieldAttributeBase and _get_parent_attribute() calls to do the
right thing when there is a non-None default.
What we want to be able to do ideally is something like this:
class Base(FieldAttributeBase):
_check_mode = FieldAttribute([..] default=lambda: context.CLIARGS['check'])
class Play(Base):
# lambda so that we have a chance to parse the command line args
# before we get here. In the future we might be able to restructure
# this so that the cli parsing code runs before these classes are
# defined.
class Task(Base):
pass
And still have a playbook like this function:
---
- hosts:
tasks:
- command: whoami
check_mode: True
(The check_mode test that is added as a separate commit in this PR will
let you test variations on this case).
There's a few separate reasons that the code doesn't let us do this or
a non-ugly workaround for this as written right now. The fix that
jimi-c, sivel, and I talked about may let us do this or it may still
require a workaround (but less ugly) (having one class that has the
FieldAttributes with default values and one class that inherits from
that but just overrides the FieldAttributes which now have defaults)
* Revert "One to throw away"
This reverts commit 23aa883cbed11429ef1be2a2d0ed18f83a3b8064.
* Set FieldAttr defaults directly from CLIARGS
* Remove dead code
* Move timeout directly to PlayContext, it's never needed on Play
* just for backwards compat, add a static version of BECOME_METHODS to constants
* Make the become attr on the connection public, since it's used outside of the connection
* Logic fix
* Nuke connection testing if it supports specific become methods
* Remove unused vars
* Address rebase issues
* Fix path encoding issue
* Remove unused import
* Various cleanups
* Restore network_cli check in _low_level_execute_command
* type improvements for cliargs_deferred_get and swap shallowcopy to default to False
* minor cleanups
* Allow the su plugin to work, since it doesn't define a prompt the same way
* Fix up ksu become plugin
* Only set prompt if build_become_command was called
* Add helper to assist connection plugins in knowing they need to wait for a prompt
* Fix tests and code expectations
* Doc updates
* Various additional minor cleanups
* Make doas functional
* Don't change connection signature, load become plugin from TaskExecutor
* Remove unused imports
* Add comment about setting the become plugin on the playcontext
* Fix up tests for recent changes
* Support 'Password:' natively for the doas plugin
* Make default prompts raw
* wording cleanups. ci_complete
* Remove unrelated changes
* Address spelling mistake
* Restore removed test, and udpate to use new functionality
* Add changelog fragment
* Don't hard fail in set_attributes_from_cli on missing CLI keys
* Remove unrelated change to loader
* Remove internal deprecated FieldAttributes now
* Emit deprecation warnings now
* standardize user/password connection vars
* docs: use ansible_user and ansible_password
* docs: var precedence for connection vars
* docs: ansible_become_pass -> ansible_become_password etc
* k8s*: add a reference to k8s_auth in all the modules' descriptions
* k8s_auth: new k8s module for handling auth
* k8s_auth: ignore E203
Can't use module_utils.urls, since that lacks user CA support, which is
a critical feature of what this module does.
* Enable 'changed' var with ufw check mode
* Fix from comment of the PR + Unit Test
* Fix on ufw module after the second review
- delete rules change works in check mode
- simplify execute def & use it on every call process
- improved regexp
- rename vars defaults to current_default_values
* Add ignore error to execute() and use it in get_current_rules()
* Update after third code review (introduce change in changed status)
* Adjust tests and fix some problems (#1)
* 'active' also appears in 'inactive'.
* 'reject' is also a valid option here.
* For example for reloaded, changed will be set back to False here.
* Improve and adjust tests.
* Fix after merging integration test
* handle "disabled" on default routed
* Add /var/lib/ufw/.. rules files
* add unit test
* Fix pep8 formatting error
* Separate ipv6 and ipv4 rules process from checkmode
* fix non-ascii error on ci
* Some change after review
* Add unit test with sub network mask
* rename is_match function by is_starting
* add changelog fragment
* gitlab_hook: renaming module name
* gitlab_hook: rename module in documentation
* gitlab_hook: remove plural in docs and code
* gitlab_hook: fix unit test functions
* Create new documentation pages for httpapi and cliconf
* Add new documentation to plugins toctree and Makefile
* Add DOCUMENTATION to cliconf
* Apply suggestions from code review
* Move docker_ module_utils into subpackage.
* Remove docker_ prefix from module_utils.docker modules.
* Adding jurisdiction for module_utils/docker to $team_docker.
* Making docker* unit tests community supported.
* Linting.
* Python < 2.6 is not supported.
* Refactoring docker-py version comments. Moving them to doc fragments. Cleaning up some indentations.
This module manages the mirroring sessions, and the necessary port settings.
* Correct Documentation and CS
* PEP8, YAML, Documentation Error Fix
* Added empty return statement
Co-Authored-By: gyorgypeter <32464524+gyorgypeter@users.noreply.github.com>
While creating new VM, don't assume the VMDKs are present,
create them as we attache the disk to VM.
Possible regression fix for introduced via #45953
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Fixes: #51675
the sample for 'Fetch all deployments' is "{{ lookup('k8s', kind='Deployment', namespace='testing') }}" but it should be "{{ lookup('k8s', kind='Deployment') }}"
Previously it was assumed that the Amazon system-release
number was the final value of the string. This isn't always
the case. Some releases have the name at the end.
Amazon Linux release 2
Amazon Linux release 2 (Karoo)
Fix by instead looking for a number in the string.
Fixes#48823
Check the path /run/ostree-booted which I'm told by upstream that it
will always be present when a host system is Fedora/RHEL/CentOS
Atomic/CoreOS vs "traditional" distro instance to detect the
non-traditional instance and ensure pkg_mgr selection is correct
Signed-off-by: Adam Miller <admiller@redhat.com>
* gitlab_group: refactor module
* gitlab_user: refactor module
* gitlab_group, gitlab_user; pylint
* gitlab_project: refactor module
* gitlab_group, gitlab_project, gitlab_user: Enchance modules
- Add generic loop to update object
- Enchance return messages
- PyLint
* gitlab_runner: refactor module
* gitlab_hooks: refactor module
* gitlab_deploy_key: refactor module
* gitlab_group: enchance module and documentation
- Enchange function arguments
- Add check_mode break
- Rewrite module documentation
* gitlab_hook: enchance module and documentation
- Rewrite documentation
- Enchance function parameters
- Rename functions
* gitlab_project: enchance module and documentation
- Rewrite documentation
- Enchance function parameters
- Add try/except on project creation
* gitlab_runner: enchance module and documentation
- Rewrite documentation
- Fix Copyright
- Enchance function arguments
- Add check_mode break
- Add missing function: deletion
* gitlab_user: enchance module and documentation
- Rewrite documentation
- Enchance function parameters
- Add check_mode break
- Add try/except on user creation
* gitlab_deploy_key, gitlab_group, gitlab_hooks, gitlab_project,
gitlab_runner, gitlab_user: Fix residual bugs
- Fix Copyright
- Fix result messages
- Add missing check_mode break
* gitlab_deploy_key, gitlab_group, gitlab_hooks, gitlab_project, gitlab_runner, gitlab_user: pylint
* gitlab_runner: Add substitution function for 'cmp' in python3
* unit-test: remove deprecated gitlab module tests
- gitlab_deploy_key
- gitlab_hooks
- gitlab_project
Actually, they can't be reused because of the modification of the way that the module communicate with the Gitlab instance. It doesn't make direct call to the API, now it use a python library that do the job. So using a pytest mocker to test the module won't work.
* gitlab_deploy_key, gitlab_group, gitlab_hooks, gitlab_project, gitlab_runner, gitlab_user: add copyright
* gitlab_deploy_key, gitlab_group, gitlab_hooks, gitlab_project, gitlab_runner, gitlab_user: Support old parameters format
* module_utils Gitlab: Edit copyright
* gitlab_deploy_key, gitlab_group, gitlab_hooks, gitlab_project,
gitlab_runner, gitlab_user: Unifying module inputs
- Rename verify_ssl into validate_certs to match standards
- Remove unused alias parameters
- Unify parameters type and requirement
- Reorder list order
* gitlab_deploy_key, gitlab_group, gitlab_hooks, gitlab_project, gitlab_runner, gitlab_user: Unifying module outputs
- Use standard output parameter "msg" instead of "return"
- Use snail_case for return values instead of camelCase
* validate-module: remove sanity ignore
* BOTMETA: remove gitlab_* test
- This tests need to be completely rewriten because of the refactoring
of these modules
- TodoList Community Wiki was updated
* gitlab_user: Fix group identifier
* gitlab_project: Fix when group was empty
* gitlab_deploy_key: edit return msg
* module_utils gitlab: fall back to user namespace is project not found
* gitlab modules: Add units tests
* unit test: gitlab module fake current user
* gitlab_user: fix access_level verification
* gitlab unit tests: use decoration instead of with statement
* unit tests: gitlab module skip python 2.6
* unit tests: gitlab module skip library import if python 2.6
* gitlab unit tests: use builtin unittest class
* gitlab unit tests: use custom test class
* unit test: gitlab module lint
* unit tests: move gitlab utils
* unit test: gitlab fix imports
* gitlab_module: edit requirement
python-gitlab library require python >= 2.7
* gitlab_module: add myself as author
* gitlab_modules: add python encoding tag
* gitlab_modules: keep consistency between variable name "validate_certs"
* gitlab_modules: enchance documentation
* gitlab_runner: fix syntax error in documentation
* gitlab_module: use basic_auth module_utils and add deprecation warning
* gitlab_module: documentation corrections
* gitlab_module: python lint
* gitlab_module: deprecate options and aliases for ansible 2.10
* gitlab_group: don't use 'local_action' is documentation example
* gitlab_module: correct return messages
* gitlab_module: use module_util 'missing_required_lib' when python library is missing
* gitlab_module: fix typo in function name.
* gitlab_modules: unify return msg on check_mode
* gitlab_modules: don't use deprecated options in examples
* Update yaml.py exmaple to include A colon
took me some time to find that out, you can have a single host under a group without the A colon, but if you add another host also w/o A colon, they will be parsed as a single line.
* Update yaml.py
* use list instead of tuple and remove md5 on ValueError
Signed-off-by: michael.sgarbossa <msgarbossa@cvs.com>
* convert algorithms to list and add comment
Signed-off-by: michael.sgarbossa <msgarbossa@cvs.com>
* only convert to list if algorithms is not None
Signed-off-by: michael.sgarbossa <msgarbossa@cvs.com>
* new fragment for PR 51357
Signed-off-by: michael.sgarbossa <msgarbossa@cvs.com>
* fix lint: remove blank line
Fixes: #51534
* set valid_until equal to current time + spot_wait_timeout
* add setting ValidUntil to value
* add changelog fragment
* fix shebang issue
* PR Candidate for FortiManager Connection Plugin, plus associated Utilities.
* Update fortimanager.py
Adding additional comments
* Committing changes for PR as requested by Ansible Staff
* Minor doc change to kick off new shippable test. Unrelated code (not our stuff) caused a failure on the last test.
* Removed generic methods for get/set/etc. Moved a copy of FMGRLockCTX into the plugin for portability, and to left the original in the mod_utils/fortimanager.py as deprecated code for pre-2.7 customers still running on pyFMG and not the plugin.
Tested all playbooks and all modules, and all appears well.
* adding cosmos db account module
* fixes
* fixed issues
* cosmos db account test fixes
* updating cosmosdb
* fixed required
* version from autogereneator
* several upgrades
* idempotency changes
* idempotency improvements
* updated cosmos db module with new idempotency check
* and idempotency check shall fail now....
* try to fail it again
* now should really fail
* one more
* introducing comparison template
* fixes + sorting of arrays
* updated comparisons
* don't compare if parameter is none
* one more test
* fixed compare
* fixed idempotency?
* more logging
* fix comparison rules
* make smaller change
* actually compare multiple write locations
* just change failover
* remove debugging stuff
* one more fix
* fixed remaining sanity test
* updating comparison stuff
* fix pep8
* fix pep8
* will pep8 finally work?
* one more fix
* cosmos db updates
* updating cosmos db account
* fixed pep8
* fix type
* fixed indent
* fixed problem with python 3
* another fix for python 3
* bool type here
* cosmos db fixes
* fix
* fix
* fix
* fixed syntax
When using `nat_destination` parameter of `os_floating_ip` module, dot
syntax (`addr.addr`) is used to access a value in a dictionary,
resulting in the module crashing with this error:
AttributeError: 'dict' object has no attribute 'addr'
This is now fixed, when using correct syntax (`addr['addr']`), the
module seems to work fine.
Fixes#51443
Warnings get printed at the end of loops, which means that if you're
running validation against a bunch of resources, the warning message
gets printed after a number of potentially unrelated resources.
Adding extra info about the resource failing validation will help
find the validation issues.
* Windows facts for ansible_winlicense_edition, ansible_winlicense_channel, ansible_winlicense_status added
* bugfix, replaced = with :
* changed facts to ansible_os_license_* in win_product_facts.ps1
Shortened the short_description in win_product_facts.py
removed errant - options: {} from win_product_facts.py
* Code optimisations and changed return code to $null from NA when unknown license information returned from CIM SoftwareLicensingProduct class.
* code optimisation
Check if user specified category exists in environment,
before assigning it to the tag creation operation.
Fixes: #51381
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* uri: fix TypeError when file can't be saved
Fix the following exception (and others):
Traceback (most recent call last):
File "/home/lilou/debug_dir/__main__.py", line 604, in <module>
main()
File "/home/lilou/debug_dir/__main__.py", line 554, in main
write_file(module, url, dest, content, resp)
File "/home/lilou/debug_dir/__main__.py", line 320, in write_file
module.fail_json(msg="Destination dir '%s' not writable" % os.path.dirname(dest), **resp)
TypeError: fail_json() got multiple values for keyword argument 'msg'
I would rather remove **resp from returned values but this module is
flagged as stableinterface.
* Static imports are more straight forward and preferred unless dynamic inclusion is required.
* * docker_node: New module for operations on Docker Swarm node
* Shared code for Docker Swarm modules
* * docker_node: Removed the attribute `force` as it is not used for any operation
* docker_node_facts: Update module to use client class AnsibleDockerSwarmClient instead of AnsibleDockerClient
* docker_node_facts: List of nodes can be provided as input, inspect all registered nodes or manager host itself
* docker_node: Update in method name called from AnsibleDockerSwarmClient
* docker_node: Additional method to shared module to get formatted output list of registered nodes
* docker_node: Additional method to shared module to get formatted output list of registered nodes
* docker_node: removed state list (featue moved to docker_swarm_facts)
* docker_node: Node labels manipulation (remove, replace, merge)
* module_utils/docker_swarm: Updated output for nodes list - adding swarm leader flag
* docker_node_facts: update in input and return values, update in documentation section
* docker_node: Updated operations on labels, tracking if change is required
* docker_node: Updated documentation, parameter 'hostname' is now required
docker_node_facts: Updated documentation
* * Failing Ansible tasl if not run on swarm manager - code cleanup
* * docker_node: Remove the 'action' list from output
* * docker_node: variable name change to be align with Python best practice, BOTMETA.yml update
* * module_utils/docker_swarm.py: fix for incorrect fail() action
* docker_node: documentation and code small updates
* * docker_node: revised labels manipulation
* docker_node_facts: Reverting to repository version, moving this change to separate PR
* * docker_node: Documentation update
* * docker_node: Update to node availability and role modification
* * docker_node: Update to check_mode handling
* * docker_node: Code cleanup
* docker_node_facts: Code cleanup
* docker_node_facts: Adding back the module with only update to use AnsibleDockerSwarmClient instead of AnsibleDockerClient
docker_node: cosmetic code changes
BOTMETA: updated on $team_docker
* docker_node: BOTMETA update
* Added support for defining the ServerSelection attribute of the update searcher session, which allows specifying non-default update server sources. This is useful if targeted systems have Windows Updates defaulted to WSUS or SCCM sources and we want to instead force searches to the online Windows Update catalog.
* fixed documentation formatting
* fixed documentation, added version_added info
* changed server_selection to a string value and refined documentation
* simplified parameter validation & result output, enhanced logging detail & documentation
* new module: aix_devices AIX devices management
This module discovery, defines, removes and modifies attributes of AIX
devices.
* Added hide attributes that can be used for aliases
Added hid attributes that can be used to manage aliases on en
interfaces.
* After tests: docs and attributes tests
Fixed attributes tests and doc explaining how to use
attributes with comma.
* Fixed grammar on module description
Fixed grammar on module description
* Included test/legacy/aix_devices.yml for tests
As discussed on IRC ansible-devel channes, was include the
legacy tests for further manual tests.
* Added 'attributes' as dictionary
Added 'attributes' as a dictionary makes the configuration
simple.
* Changed the added version from 2.5 to 2.7
Fixed the shippable error from 2.5 to 2.7
```
2018-06-01 08:28:02 ERROR: Found 1 validate-modules issue(s) which
need to be resolved:
2018-06-01 08:28:02 ERROR:
lib/ansible/modules/system/aix_devices.py:0:0: E307 version_added
should be 2.7. Currently 2.5 (75%)
```
* Various changes
* Revert
* Changed the tests to integration dir
* Implement 'available' state
'available' state is the AIX state used, that works same as 'present'
* The states were changed to AIX expressions and kept Ansible states.
Makes sense keep the states names to AIX and use the Ansible 'standards'
states.
'available' is 'present'
'removed' is 'absent'
It makes easy to AIX sysadmins use the module, however it keep the
Ansible meanings.
* Fixed choices according with latest patchset (commit)
* A few doc changes
Nothing material
* new module: AIX Volume Group creating, resizing, removing
It is a module to manage Volume Groups to AIX Logical Volume
Manager. With this module is able to create, reisize and
remove a Volume Group.
* fixed suggestion for standards and PEP8
fixed suggestion on PR according with standards and PEP8
* Removed blank space in the end of line.
Removed blank space in the end of line.
* Improved validations, functions, pep8
- fixed pep8 and non-written conventions;
- fixed RETURN doc indentation for msg;
- fixed and improved the physical volume verification;
- pp_size, when not specified, is followed from AIX side;
- included volume group verification in the top;
- included state varyon and varyoff to be easy in playbooks;
- removed check_mode
* Implemented back module.check_module, pep8, return
Implemented back the module.check_module to permit be used.
Some corrections regarding module.exit_json() and
module.fail_json().
Some pep8 and non-written conventions
* removed exit_json() from functions and pep8
- ordered option parameters and pep8 compliance
- removed exit_json() from functions and moved to main()
* pep8, two spaces before function
pep8, two spaces before function
* changed single/double quotes
changed single/double quotes to non-written convention.
* removed command options parameters as global vars.
Commands options parameters was moved as global variables
to inside create_vg().
* include state to return.
included the state to return.
* no-underscore-variable applied to the code
no-underscore-variable was applied to the code
* Fixed version and doc
Fixed version and documentation sanity
* Fixed documentation for E325, E326
Fixed documentation for E325, E326 to force option
* Fixed E319 for return doc.
* Various improvements and cosmetic changes
* Fix whitespace issue
* Allow session_role to be set for PostgreSQL
By implementing session_role it becomes possible to run the specific
PostgreSQL commands as a different role.
The usecase that is immediately served by this, is the one that one
ansible playbook can be shared by multiple users, which all have
their
own PostgreSQL login_user. They do not need to share login
credentials,
as they can share the role within the PostgreSQL database.
The following example may give some insight:
$ psql -U jdoe -X -d postgres
postgres=> CREATE DATABASE abc;
ERROR: permission denied to create database
postgres=> set role postgres;
SET
postgres=# CREATE DATABASE abc;
CREATE DATABASE
fixes#43592
* Tests for session_role in PostgreSQL
* Bump version_added for session_role feature
* Remove explicit encrypted parameter from tests
* * docker_host_facts: Getting docker host info
* * docker_host_facts: Getting lists of containers, volumes, images and networks as in respective CLI commands
* * docker_host_facts: Adding filters, documentation update
* docker_host_facts: Code cleanup
* docker_host_facts: Adding verbose output option. Documentation update.
* docker_host_facts: Improving author information for ansibot
* docker_host_facts: documentation and small code updates, for `docker_disk_usage` returned type is always dict now
Added support for username and password authentication in hashi_vault
lookup plugin.
Fixes: #38878
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* ios_ntp module
* add execute_module for config func
* fix units test
* test empty list
* update example
* change want logic to follow have - removed try/except
* update commands list for config test
* add idempotent test case
* add more test
* identity: Autodetect FreeIPA server with DNS
This adds the ability for the freeIPA related modules to be able to
auto-detect the IPA server through DNS.
This takes advantage of the fact that a lot of FreeIPA deployments
configure their hosts to use IPA as the nameserver.
This check is only used if we didn't set neither the ipa_host parameter,
nor the environment variable IPA_HOST.
* identity: Specify docs for DNS discovery of ipa_host
These docs specify that it can now default to DNS if the 'ipa-ca' entry
is available.
* Add coherency between check and normal mode see issue #24633
* Add changelog fragment for the PR
* Make change following PR comment
* Remove trailing whitespace
* changes to clusteR
* Revert "changes to clusteR"
This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.
* na ontap vscan scanner pool
* Update author
* add pure state functionality for win_group_membership
* fixing typos in docs
* fix syntax for adding removed array depending on state
* remove trailing whitespace from docs
* fix issue in testing pure (again)
* adding note for pure being added in Ansible 2.8
* add new module for webapp slot
* fix lint and resolve comments
* fix lint
* fix lint
* fix lint
* fix name in test
* add variable
* fix test parameter
* fix test frameworks
* fix test
* remove delete due to swap not finish
* resolve comments
* fix lint
* fix typo
* Always check envvars when auth parameter is not provided
This will make it so that all code using the get_api_client
method will make use of the environment variables, instead of
silently ignoring them if default values haven't been set. This
affects at least the k8s lookup plugin.
* Add changelog
* move extravars and option vars loading into VM
also safedir setting, all these are intrinsic to VM
avoid uneeded and inefectual shallow copy
remove setters/getters as VM now does most of the work in init
updated and added tests
* feedback + fixes
* keep extra_vars property for vars_prompt
* pass values not objects
* win_stat: Rewrite using AnsibleModule
Simple rewrite using AnsibleModule.
* Remove custom deprecate block
Since we already have the `removed_in_version` option set, this is not
really needed. However the error message was a bit more specific.
* Fix typo
* Fixes after review
* Fixes to get tests working
* remove bare var handling in conditionals
this makes top level and multilevel vars (dicts keys) behave the same
it will require adding |bool for 'string comparissons' in indirect templates
- added new tests to ensure uniform handling
- switched to 'is' testing for status
- changed warning to 'conditional' as 'when:' is not only place it gets triggered
* updated to include toggle and deprecation
* fix deprecated
* updated tests to handle toggle
* fixed typo and added note about the future
* New module to manage OVH's failover IPs.
* Fixed quote_plus import for python 3 and remove 3 seconds sleep
* Fixed author format
* Added parameters for not waiting completion, or waiting previous task
* Update junos_config.py
The current junos_config module documentation only lists "merge","override" and "replace" as update parameter choices. Looking into junos_python.py "update" is another option which is really helpful and in my opinion the most needed option.
'''
update=dict(default='merge', choices=['merge', 'override', 'replace', 'update'])
'''
+label: docsite_pr
* Fixup Update junos_config.py
The current junos_config module documentation only lists "merge","override" and "replace" as update parameter choices. Looking into junos_python.py "update" is another option which is really helpful and in my opinion the most needed option.
'''
update=dict(default='merge', choices=['merge', 'override', 'replace', 'update'])
'''
Co-Authored-By: crab86 <sgesenhoff@gmail.com>
* document how state=file works
this seems to have been lost in previous updates to docs
* Update lib/ansible/modules/files/file.py
Co-Authored-By: bcoca <bcoca@users.noreply.github.com>
* Add windows module win_rds_settings
* Add windows module win_rds_rap
* Add windows module win_rds_cap
* Add tests for module win_rds_settings
* Add tests for module win_rds_rap
* Add tests for module win_rds_cap
* Validate user and computer groups in module win_rds_cap
* Validate user groups in module win_rds_rap
* Support additional formats (UPN, Down-Level Login Name, SID and Login Name) for user and computer group names in module win_rds_cap
* Support additional formats (UPN, Down-Level Login Name, SID and Login Name) for user group names in module win_rds_rap
* Validate computer group parameter and support additional formats (UPN, Down-Level Login Name, SID and Login Name) in module win_rds_rap
* Validate allowed ports parameter in module win_rds_rap
* Ensure user group list is not empty in module win_rds_rap
* Remove unwanted value in result object
* Ensure user group list is not empty in module win_rds_cap
* Ensure order parameter value never exceed the number of existing CAPs in module win_rds_cap
* Add diff mode support to win_rds_cap
* Add diff mode support to win_rds_rap
* Add diff mode support to win_rds_settings
* Add SSL bridging and messaging policy settings to module win_rds_settings
* Fix copyright
[skip ci]
* Add missing trailing dots in documentation
[skip ci]
* Fix incorrect variable passed to Fail-Json
* Minor changes and doc update
* Avoid using Powershell aliases
* Use WMI instead of PSProvider to handle group names to avoid conversion in UPN form
* Use CIM instead of WMI cmdlets
The only valid value for userns_mode on docker run command is "host". This should be mentioned in description because it is hard to find in docker documentation as well: https://github.com/docker/docker.github.io/issues/7071
* aws_ec2 Implement the missing 'region discovery'
fixes#45288
tries to use api as documented (which seems to fail in latest boto3 versions)
and fallback to boto3 'hardcoded' list of regions
* fixes and cleanup, add error for worst case scenario
* fix tests, remove more unused code
* add load_name
* acually load the plugin
* set plugin as required
* reverted test changes, removed options tests
* fixes as per feedback and cleanup
* If network cliconf support `supports_generate_diff` in
that case diff between running and cnadidate config
is generated within Ansible and if check_mode is enabled
in that case return only diff without actually invoking
edit_config()
* Add check for elb type to fix difference between NLB and ALB AZ return structure
Fixes#49558
* Fix spacing for pep8 (hopefully) compliancE
* use empty array default instead of loadbalancer type detection
hat tip briantist
* spacing is probably important.
Have added some extra arguments to the postgresql_lang module to allow
configuring an SSL connection to the postgresql server and explicit
support for connecting via a unix socket. The arguments and method used
here for the connection are the same as used by the postgresql_schema
module.
* Add functionality to set hidden properties. Fixes#50299
* Add inject_ovf_env functionality
* Add xml declaration
* Revert "Add functionality to set hidden properties. Fixes#50299"
This reverts commit 4b41bb7520.
* Add changelog fragment
* Minor changes
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Included module installp for AIX packages
This module works with installp AIX packages.
With this module is possible manage (install and remove) native
AIX packages using simple playbooks.
* Included module installp for AIX packages
This module works with installp AIX packages.
With this module is possible to manage (install and remove) native
AIX packages using simple playbooks.
* Fixed variable for installp parameters and docs
Followed the comments for merge
- changed variable for installp params
- doc for name and multiple packges using comma
* Replaced manual split to a list according argument_spec
Changed manual split for module.params["name"] to argument_spec
* Fixed PEP8 space after operator
Fixed PEP8 space after operator
* improved package verification and pep8
- improved package/fileset verification on AIX before to take
actions to remove or install
- Applied PEP8 and non-written conventions
- better comments and documentation
note: even If the package is already installed, even the
package/fileset is new, the module will not install it.
On AIX it is not recommended because it can break your
OS version with missen filesets.
* applied single/double quotes convention.
applied single/double quotes convention.
* Package name 'all' allowed as AIX command line
- Allowed use 'name' as all such as AIX allows
- Removed 'global' varible regarding licence that is used
only by install()
* Documentation format issue
E302 DOCUMENTATION is not valid YAM
* Required (cosmetic) changes and improvements
* Small changes
* Silly PEP8 fixes
* Fix underscore variable
* Standardize cliconf get_capabilities
* Check for capabilities before querying them
* Try to be more helpful when unexpected things are found in get_capabilities
* Add flags param to get_config for compatibility
* Add support for multiple sshkeys
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
* Fix CI
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
* Add the keys at on go
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
* Update tests
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
* Added new vmware module for creating DRS VM-HOST rules Host groups in a given cluster
* Fixing punctuation in lib/ansible/modules/cloud/vmware/vmware_vm_host_drs_rule.py
* Added better Docstring
* Better messaging and documentation. Removed unused lib
* Added operation to determine create or update msg
* Fixed class params to only take module. This is less error prone
* Bugfix, undefined names
* hpilo_boot: fix module doc to match code and logic
There is no explicit nor implied value for media.
In fact, not choosing media makes perfect sense.
* Remove ignored sanity test failure
* New module: tower_notification
* Fix CI check failures
* Add integration tests and extend examples
* Add missing required field for deletion tests and examples
* Add missing required field for deletion tests and examples
* Set port type to int
* Add missing field for Slack notification
* Add missing field types for IRC notification
* Update module documentation
* Correct field name and type for IRC notification
* Uniformize 'targets' field
* Uniformize 'targets' field
This PR includes:
- Various fixes to jsonpatch interface
- Added seealso: and notes: to docs
- Various improvements to docs
- A set of bugfixes found during integration tests
Full integration tests follow.
* changes to clusteR
* Revert "changes to clusteR"
This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.
* new module na_ontap_portset
* Fix author
* fix issue from comment
* adding scm_update_cache_timeout and job_timeout to tower_project module
* add support for cache_timeout, job_timeout and custom_venv for tower_project module
* add the version_added
* Allow creating extension in a specific schema
* Code Review: Update example to include schema parameter
* Code Review: Use simple string concatenation to build query
* add static facility and apply to register
* added warning
* added test for templated register
* test register 'static' status
* rely on subshell to deal with quote context
* use corrects pb for test
* bring constants back cause new code in devel
* facts: solaris: introduce distribution_major version detection for Solaris
Currently, there's no distribution_major in facts module on Solaris OS.
Use "uname -r" output to report major version.
Before the patch we get this on Solaris 11.3 :
$ ansible -o solaris11 -m setup -a filter=ansible_distribution_major_version
solaris11 | SUCCESS => {"ansible_facts": {}, "changed": false}
and after this patch, output is the following:
$ ansible -o solaris11 -m setup -a filter=ansible_distribution_major_version
solaris11 | SUCCESS => {"ansible_facts": {"ansible_distribution_major_version": "11"}, "changed": false}
Tested with Solaris 11.3 and Solaris 10 (both are x86_64 VMs)
Includes patch for test/units.
Fixes#18197
* Try to fix test unit
* should work now...
* fixes for W291 (trailing whitespace) and E265 (block comment)
* mock uname_release for solaris 10 and solaris 11
* facts: solaris: introduce distribution_major version detection for Solaris
Currently, there's no distribution_major in facts module on Solaris OS.
Use "uname -r" output to report major version.
Before the patch we get this on Solaris 11.3 :
$ ansible -o solaris11 -m setup -a filter=ansible_distribution_major_version
solaris11 | SUCCESS => {"ansible_facts": {}, "changed": false}
and after this patch, output is the following:
$ ansible -o solaris11 -m setup -a filter=ansible_distribution_major_version
solaris11 | SUCCESS => {"ansible_facts": {"ansible_distribution_major_version": "11"}, "changed": false}
Tested with Solaris 11.3 and Solaris 10 (both are x86_64 VMs)
Includes patch for test/units.
Fixes#18197
* Try to fix test unit
* should work now...
* fixes for W291 (trailing whitespace) and E265 (block comment)
* mock uname_release for solaris 10 and solaris 11
* typo uname_v -> uname_r
* rebase
* fix pep8 E302: 2 blank lines
* remove int() cast to match test case
* use single function for uname_r and uname_v
* add solaris 11.4 OS to distribution test unit
* fix pep8 sanity - E231 missing whitespace
* distribution_major_version variable strip newline
* mocker test function for mock_get_uname with parameters instead of two different functions
* failed to make one fuction with test unit, revert to use 2 different functions
* try to use single get_uname function
* fix pep8: E703
* promote doc_fragments into actual plugins
change tests hardcoded path to doc fragments
avoid sanity in fragments
avoid improper testing of doc_fragments
also change runner paths
fix botmeta
updated comment for fragments
updated docs
* Issue #41079. Failed to apply rule if there is a default IPv6 NACL
* Issue #41079. Failed to apply rule if there is a default IPv6 NACL
* Issue #41079. Failed to apply rule if there is a default IPv6 NACL
* Simplify logic to skip default deny-all rules
* Simplify logic to skip default deny-all rules
* Remove unnecessary tmp variables
* Add tests for check_mode at play and task level
These test inheritance of check_mode from the various levels (command
line, as a play attribute and as a task attribute) so they will be
useful for checking that the change to fieldattribute inheritance with
defaults works
* Add a sentinel object
The Sentinel object can be used in place of None when we need to mark an
entry as being special (usually used to mark something as not having
been set)
* Start of using a Sentinel object instead of None.
* Handle edge cases around use of Sentinel
* _get_parent_attribute needs to deal in Sentinel not None
* No need to special case any_errors_fatal in task.py any longer
* Handle more edge cases around Sentinel
* Use Sentinel instead of None in TaskInclude
* Update code to clarify the vars we are copying are class attrs
* Add changelog fragment
* Use a default of Sentinel for delegate_to, this also allows 'delegate_to: ~' now to unset inherited delegate_to
* Explain Sentinel stripping in _extend_value
* Fix ModuleArgsParser tests to compare with Sentinel
* Fixes for tasks inside of roles inheriting from play
* Remove incorrect note. ci_complete
* Remove commented code
* parallelize getting mount info
* fixed timeout and made 8 max thread count
- minor cleanup
- avoid empty mount entries
- set timeout on get
- enforce timeout per mount/thread
- make note on failure per mount
- make note on timeout per mount
- ensure proper pool control
- minor fixes
- less vars, simpler code
- move filter 'pre threading'
- remove timeout for all mounts, now per mount
- also use cpu count from multiprocessing lib
- moved 'bind' options out of thread as per comments
- warn on error, more info on failure to get info
* faster config loading
- used already loaded module var instead of doc functions
- add preload to populate config defs cache
- avoid debug work when not in debug
- generators, force consumption
* Catch SSH authentication errors and don't retry multiple times to prevent account lock out
Signed-off-by: Sam Doran <sdoran@redhat.com>
* Subclass AnsibleAuthenticationFailure from AnsibleConnectionFailure
Use comparison rather than range() because it's much more efficient.
Signed-off-by: Sam Doran <sdoran@redhat.com>
* Add tests
Signed-off-by: Sam Doran <sdoran@redhat.com>
* Make paramiko_ssh connection plugin behave the same way
Signed-off-by: Sam Doran <sdoran@redhat.com>
* Add changelog
Signed-off-by: Sam Doran <sdoran@redhat.com>
* - Fix sorting bug related to diff (attributes is sorted in the API, other lists are not)
- Remove null-valued entries from protocolMappers introduced by Ansible's argument spec checking (also fixes diff output).
* python2.6-ified dict comprehension
* avoid use of map
* Fix 'defaults' option in the nxos_config module
Nxos get_config is allways called with the 'all' option.
* Fix flag's calculation
* Add tests
* nxos_config: the 'backup' option take into account the value of 'defaults' option
If 'defaults' option is true, the running-config backup is done with the all
keyword.
* added nictagadm functionality for smartos
* Added mac address assertion and mutex's for etherstub params
* removed old commented code
* Responding to ansibot lint
* Responding to ansibot lint underscore
* doc wording, if rc to return rc
* Version Added bump to 2.6
* Grammer Fix
* match documentation with the arg spec
* removed default from Options since None evidently is 'None'
* Guessing to please the linter, No documentation
* Various changes
* PEP8 fixes
* Create a module for managing ZFS admin privileges
* Actually support check mode in zfs_permissions
* Fix Python 2.4 invalid syntax
* Update added_version to 2.1
* Remove superflous sys.exit() and add an empty RETURN doc (empty because the module does not return anything other than status-related stuff)
* Update version_added since zfs_permissions was not accepted in 2.1.
* - Rename zfs_permissions to zfs_delegate_admin to more accurately reflect
its purpose.
- Update with current Ansible module best practices.
- Stop checking whether changes need to be made (this was flawed since
it was not able to detect whether, for example, changes would be made
with `local=True` when the permissions already existed for
`Local+Descendent`. Instead, just make the changes (`zfs allow` is
idempotent) and compare the state before and after.
- Generally write things in a better way.
* Fix test errors
* Fix more tests.
* Catch exceptions when parsing `zfs allow` output. At least on one
version of ZFS (on a 2016 version of illumos) will have a single space
in the user or group column if the name can't be resolved by the
system's name services).
* Adding digital_ocean_space alias for s3_bucket module
* skipping alias to see if doc-build test passes
* undoing last change
* removing symlink
* oops -- readding module ref
* removing more of my changes
* removing unneeded doc line
* correcting another mistake
* Move relative time handling to module_utils and rewrite it
* Fix cases with no seconds defined
* fix a small typo along the way
* add relative time handling to the ownca provider in openssl_certificate
* add initial integration test for relative time ownca
* quote the documentation to produce valid yaml
* move timespec conversion and validation to the init function
* fix small edge case in conversion function
* add relative timestamp handling to the selfsigned provider
* add get_relative_time_option
* add relative timestamp handling to valid_in
* pep8 fix indentation
* add quotes in error message
* add changelog fragment
* Update changelogs/fragments/50570-relative_time_crypto.yaml
Co-Authored-By: MarkusTeufelberger <mteufelberger@mgit.at>
We should explain the danger of using relative paths, but we should not
say they aren't allowed. Relative paths work and are useful, but the
caveat is that the starting point can't be guaranteed by ansible. This
commit adds that note, and removes the claim that only absolute paths
are accepted.
* Replace loose string that should be a byte string
* Replace byte string literals with string literals
* These, on the other hand, need to be byte strings
* Added support for labels for Docker Network
* Fixed missing comma in Docker Network module
* Specified minimal versions for dependencies and added changelog
* Fixes based on suggestions after code review
* Added integration tests
* Add command option
* Fix test task name
* Changelog fragment
* Fix indendation
* Add version_added
* Better command description
* Test passing command as list
* Handle invalid command types
* Cleaner command type checking
* Check that all items in command list are strings
* Better error about command list items
* Better type checking errors
* Add tests for command type checking
* Update command tests
* Fix messed up rebase
* Fix crash when using configs parameter
* Don’t add difference for configs set to None
* Add changelog fragment
* Revert "Add changelog fragment"
This reverts commit 8df497e3881d976e7417d2662a167694fbc33147.
* Enable config tests
* Pass empty list of configs to docker
* Properly clean up after all tests
* Fix publish idempotency when mode is None
* Add changelog fragment
* Python 2.6 compat
* Use self.publish
* Check length of publish before comparing content
* Sort publish lists before zipping
* Enable publish tests
* python3 compat
* Don’t sort by mode as it is not safe
* Document publish suboptions and add them to args
* Add type to publish documentation
* Add choices to publish argument_spec suboptions
* Make tcp the default protocol
* Make documentation reflect protocol default
* Simplify setting mode
* Remove redundant string quoting
* Test order of publish
* Add comment about publish change detection
* Pass client to detect_usage function
* Use new client argument in detect_usage function
* Use option_minimal_versions
* Add min_docker_api_version
* Skip default since publish is always a list
* Add min Docker API version to module requirements
* Remove redundant keys()
* Move detect_ipvX_address_usage out of __init__
* Check for mode presence in publish ports
* Remove unused import
* Use port.get(‘mode’) to check for falsy values
* Update lib/ansible/modules/cloud/docker/docker_swarm_service.py
Co-Authored-By: hannseman <hannes@5monkeys.se>
* Add force_update to option_minimal_versions
* Detect publish mode better
* Add a trailing comma
* Modified description in nmcli module doc
The instructions for installing module's dependencies were incomplete.
I copied the CentOS/Fedora part from the examples section, while I figured out myself the Debian/Ubuntu package names.
+label: docsite_pr
* Fix modified description in nmcli module doc
* Fix modified description in nmcli module doc again
* Fix modified description in nmcli module doc LB
* Revert "Revert "openssl_csr: Allow to use cryptography as backend (#50324)""
This reverts commit bbd2e31e9f.
* Remove more complicated selection copy'n'pasted from openssl_privatekey.
* Add tests for backend selection.
* Add openssl_csr test for arbitrary string commonName.
* Allow to disable commonName -> SAN copying (fixes#36690).
* Increase persistent command_timeout default value
* Increase command_timeout default value from 10 to 30 sec
to reduce frequent timeout issue for network connection
types (netconf/network_cli/httpapi/napalm)
* Fix review comments
* Adapt netbox_device to pynetbox changes
Pynetbox API has changed, resulting in errors at the creation or
deletion of any device with the netbox_device modules. Fixes these
errors.
rebase
* Refactor netbox_device
Better error handling
Split the return values to `device` and `msg`, containing the created
device (if any), and the message to get more info about what has been
achieved (or the error if any)
* ovirt hosts facts add cluster version filtration
* update filtering of ovirt hosts and input of cluster version
* ovirt host facts change compat version to string
* removed info declaration from documentation fragment as this is not implemented
* added optional headers for POST and PUT requests
* updated documentation
* added missing headers field decalaration
* removed info choice from state field
* added tests for the new utm_utils function
* fixed class invocation
* added missing required params
* fixed the pytests
* Fix malformed string error using ast
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
* Update doc for this option
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
* Revert "Update doc for this option"
This reverts commit 3579d19121.
* Revert type value
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
* added timestamps to nxos_command module
nxos_command module now returns timestamps field, which shows command execution time
* fixed unit test failure for /lib/ansible/module_utils/basic
* cosmetic changes to align with PEP 8
* Corner case in which import_role would add another instance of a role with the same signature into roles: when it already existed there.
roles:
- name: a
tasks:
- import_role: name=a
would execute role 'a' 3 times instead of the intended 2 (x2 in roles: phase +1 in tasks:)
* added tests
* Add object_type param to checkpoint_object_facts
* Add changelog fragment
* Fix sanity
* Fix sanity
* Pass type param to payload
Otherwise it does not do what is expected to do
* Add ip-only default to docstring
* Revert "avoid x2 setting of set_fact when 'cacheable' (#50564)"
This reverts commit 207848f354.
* clarify clear_facts with set_fact cacheable
revert previous 'fix' as it will break playbooks by changing precedence
opted to leave current behaviour but document it on both plugins to mitigate confusion
fixes#50556
also fix grammer, add comment, remove unused e
* Add autopublish and autoinstallpolicy behaviour to Checkpoint devices
Up till now we published and installed policy package for every operation,
however operators may not want that and only reconcile changes after a series
of changes.
Added flags to toggle this behaviour, which defaults to autopublish and
autoinstall policy package just as it was till now.
The policy package name defaults to 'standard', since it's the default one
created on the Checkpoint management server on AWS, unsure if that's common
in other setups.
* Change signature for publish and install policy
The module object is not needed
* Fix pep8
* Fix install_policy invocation
Also fix payload in publish/discard, since it seems passing the UID
when it's not needed has issues.
* Add doc fragments
* Remove default value of targets on install_policy method
It's already defaulting to None via checkpoint_arg_spec
* Fix pep8
* Remove doc fragment and push down auto options to resource modules
I realized if I put those options as doc fragments they will show up
on facts module, which do not apply, only on resource modules that
mangle with objects.
* Fix bogus param name and validate modules issues
* Fix bogus param name on checkpoint_host
* Bubble up import exception content for k8s module
Signed-off-by: Fabian von Feilitzsch <fabian@fabianism.us>
* Track down other places import exception is reported
* Add changelog fragment
The previous code was using the legacy Group Chat 1.0 (GC1.0)
protocol to join [XEP-0045 Multi User Chats][1]. The legacy
protocol is described in § 7.2.1 of that document, the current
protocol is described in § 7.2.2.
The legacy protocol has not been in active use for more than ten
years, and servers are fading out support for it because its
presence causes issues (see for example the lengthy discussion
in [2], particularly the part starting with "A MUC
misunderstanding a presence update for a GC1.0 join").
The effect of servers fading out GC1.0 is that jabber.py cannot
send messages to rooms on servers which have done that step any
more.
This commit implements the modern join protocol, restoring
functionality. The modern join protocol is, to my knowledge,
supported by all XMPP servers which are still in use.
Prosody 0.11 is an example of a server implementation which does
not support GC1.0 anymore.
[1]: https://xmpp.org/extensions/xep-0045.html
[2]: https://mail.jabber.org/pipermail/standards/2017-October/033501.html
* Fix encoding issues with file paths.
Discovered while testing with ANSIBLE_CONFIG env var set to a path
that contained unicode characters while LC_ALL=C.
* Fix unit tests.
* Fix another path encoding issue.
When a user home dir is not created with `useradd`, the home dir will now
be created with umask from /etc/login.defs. Also fixed a bug in which
after a local user is deleted, and the same user exists in the central
user management system, the module would create that user's home.
* check for result['status'] in systemd module
* instead of checking for result['state'], actually check for chroot and warn
* allow systemctl status to work if in a chroot, update warn text
* simply change warning message
* Added new vmware module for gathering facts for DRS groups
* Update lib/ansible/modules/cloud/vmware/vmware_drs_group_facts.py
* Updated doc
* Fixed integration test with mutual exclusive paramteres
Co-Authored-By: karstenjakobsen <karsten@karstenjakobsen.dk>
* Added new vmware module for creating DRS VM or Host groups in a given cluster
* Fixed typo in module name
* Added better docstrings. Fixed better messaging for existing groups. Added delete example.
* Update doc
* Update lib/ansible/modules/cloud/vmware/vmware_drs_group.py
* Updated logic, so result is populated with correct data even if no changes are made
* Update lib/ansible/modules/cloud/vmware/vmware_drs_group.py
* Improved performance by getting group_obj in init()
* Fixed syntax error and added group_name as required if state is
* Added state= to integration test
Co-Authored-By: karstenjakobsen <karsten@karstenjakobsen.dk>
* Updated document fragment
* Used PyVmomi Helper class
* Added check for vcenter server
Fixes: #50752
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Allow to use cryptography as backend for openssl_csr.
* Use different curve.
* Adding changelog.
Includes changelog fragment for #49416, which didn't include one.
* Describe labels and container_labels correctly
* Clarify reserve_memory and limit_memory docs
* Remove default from container_labels doc
* Remove trailing whitespace
* Document min api version for configs and secrets
* Add changelog fragment
* Specify type on labels and container_labels
* Consolidate required API version descriptions
* Update reserve and limit memory docs
* Use correct power-of-two units
* Remove description about limit_memory minimum 4mb
* docker_swarm_service: use exact name match when finding services
The Docker API's filtering support allows filtering for substring
matches which means that when we filter the list of running services we
may accidentally match a service called "foobar" when looking for a
service named "foo".
Fix this by filtering the list of services returned from the Docker API
so that name matches are exact. It is still worth passing the filter
parameter to the Docker API because it reduces the number of results
passed back which may be important for remote Docker connections.
Closes 50654.
* add changelog fragment for #50654
* Added documentation around using vmware dynamic inventory plugin
* Fixed bug for populating host_ip in hostvars for given inventory host
* VMware: Add properties in vmware_vm_inventory
Fixes: #50249
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* fixes issue 50296
* fixes the indentation of the return statement
* Adds a conditional test into `_find_systems_resource()` to check the existence
of the Members of System resource
* updates the error message
* harden the conditional test
* Add a changelog
* Added description, admin commit and VSYS commit features.
* pep8 fixing
* Ansible pylint fixing + module.fail on commit fail
* Ported from lxml.etree to xml.etree. Changed username to fall back to admin if nothing else defined.
* Fixed documentation for username defaults.
* Pluribus Networks port cos bw module
* Indentation fix
* Documentation fix
* Corrected indetentation for required_one_of
* Added maintainer name in BOTMETA.yml
* Removed maintainer name in BOTMETA.yml as my team is already there
* Add checkpoint_host module
* Add state param to docstring
* Require ip_address if state is present
* Make else more explicit by doing and elif 404
* Remove bogus paren
* Add checkpoint_host module
Provide toggle flag to allow display of unreachable task to stderr
using default callback plugin.
Fixes: #48069
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Previously, the index got out of sync with the actual config list. Invoked with lines:
- bad
- first
- bad
- second
the sanitization would first delete index 0 and then index 2, which would result in the output
- first
- bad
By reversing the list, we avoid that problem (though a filter() would be nicer)
* fixing the exception import from tower modules
* Adding tests for checking tower modules are failing with correct msg
* fixed failing tests
* fixed failing test in tower_team
* Add auth_timeout parameter when supported
Paramiko 2.2 introduces the auth_timeout parameter. This will set the
parameter to the same value of the timeout parameter to prevent
"Authentication timeout" errors.
* Conditionally add auth_timeout to ssh.connect
Renamed sock_kwarg to ssh_connect_kwargs and conditionally added the
auth_timeout parameter based on the installed paramiko version.
* Add changelog fragment
* Included support to AIX group subsystems
AIX systems has subsystems as services but also uses group
subsystems.
For example, spooler is a group subsystem to services
qdaemon, writesrv, and lpd.
This change enables the possibility to use also the group
susbsystmes such as spooler, nfs, etc.
When the service name is informed, first the module will
check if the name is a subsystem, if not it will check if
the name is a group subsystem and also it subsystems states.
This change makes services more flexible with AIX systems.
* Included test/legacy/aix_services.yml for tests
As discussed on IRC ansible-devel channes, was include the
legacy tests for further manual tests.
* csv of memory usage
* Fix var
* Configurable output file
* Add cpu profiling
* Valdiate the existence of cgroup files
* Add guard to prevent exception when trying to reset max memory value
* to_bytes/to_text and docs updates
* Add support for CPU results
* Just track the max, don't log all results, and then calculate max
* Restore cgroup_memory_recap, and move new functionality into cgroup_perf_recap
* Add pid count tracking, restructure to support more profilers
* Add cli tool for graphing cgroup_perf_recap data
* csv_output_dir is a path
* Correct CALLBACK_NAME
* Include uuid in csv data
* fix linting errors
* Bump version_added
* Create helper funciton to create dict from list of keys, with callable default
* Updated notes to include pids
* Print a newline after each section
* Plugin improvements
* Add option to supporess recap display
* Add default for output directory
* Add option to dictate whether or not to write files
* Add JSON-seq output option
* s/uuid/task_uuid
* Use bytes for paths
* Increase polling interval length for pids/memory
* Reduce instance attrs, change how we invoke profilers
* Shorten some line lengths
* Remove more instance attrs
* Fix some typos
* document directory creation, and catch exceptions
* Enable per task file outputs, and filename customization
* s/per_task_file/file_per_task/g
* Introduce 'insertbefore' and 'insertafter' to specify the position children have to be inserted.
* Added version_added to new options
* Xpath in example needs single quotes
* Added integration tests for insertafter and insertbefore
* Changed version_added to 2.8
Currently deleting the storage connection just tries to delete the
connection but it doesn't detach the connection from storage domain.
The patch first tries to detach the connection from storage domain
before attempting to delete the same if the storage domain parameter
is provided.
* Cloudscale integration test setup
CloudProvider and CloudEnvironment classes for Cloudscale integration
tests. This also contains a cloudscale_common role with common
variables for all tests.
* cloudscale_volume module
New cloud module to manage volumes on the cloudscale.ch IaaS service.
* Add checkpoint httpapi plugin and access rule facts module
* WIP checkpoint_access_rule module
* Add publish and install policy, plus fix empty json object request for publish
* Refactor publish and install_policy onto module_utils
* Add update resource logic
* Add checkpoint_host_facts module
* Return code and response on get_acess_rule function
* Add checkpoint_host module
* Add checkpoint_run_script module
* Add checkpoint_task_facts module
* Show all tasks if no task id is passed
Note, this is only available on v1.3 of Checkpoint WS API
* Add update logic to checkpoint host
* Add full details on get task call
* Add checkpoint httpapi plugin
* Fix pep8
* Use auth instead of sid property and return False on handle_httperror method
* Fix version in docstring
* Remove constructor
* Remove Accept from base headers
* Do not override http error handler and assign Checkpoint sid to connection _auth
There is scaffolding in the base class to autoappend the token, given
it is assigned to connection _send
* Use new connection queue message method instead of display
* Remove unused display
* Catch ValueError, since it's a parent of JSONDecodeError
* Make static methods that are not used outside the class regular methods
* Add missing self to previously static methods
* Fix logout
Was carrying copy pasta from ftd plugin
* Remove send_auth_request
* Use BASE_HEADERS constant
* Simplify copyright header on httpapi plugin
* Remove access rule module
* Remove unused imports
* Add unit test
* Fix pep8
* Add test
* Add test
* Fix pep8
* new module: AIX LVM file system and NFS
This module creates, removes, mount and unmount LVM and NFS file system
for AIX using /etc/filesystems. For LVM file systems is also possible
to resize the file system.
* better parameters options structure
better parameters options structure
* Improved file system resize returns
Added better tratment for return codes for file system resize.
When a resize is not possible because no enough space on lv or
shrink is not allowed.
* improved doc and creation file system return code
- improved doc
- creation file system return code 10 was treated.
* Doc recomendations, dict result, line limit
- Added doc recomendations
- Changed return to dict results on main()
- Using 159 columns for code limit
* wrong changed return when file system is already
Fixed wrong changed return when file system is already mounted.
When the file system is already mounted the return for changed
is False.
* Fixed description and included playbook for tests
- Fixed description
- Included playbook for manual tests
* Various small bits to get this merged ASAP
* Rename test/legacy/aix_filesystem.yml to test/integration/targets/aix_filesystem/tasks/main.yml
Move integration test to its proper location
* Create aliases
* Fix CI issues
* Fix backup issue in network config modules
* Fix `get_working_path` not found issue introduced due to
backup config code refactor (PR #50208)
* Further refactor config related action plugins to minimize
duplicate code
* Remove unwated imports in config action plugins
* Add common network class for action plugin and related code refactor
* Fix review comment
* Correct Errors in Documentation
According to the module, "compose" is not required, but the docs said it was - removed the "required" tag. Additionally, the example for removing a stack did not include the required "name" option (this method is why "compose" is not required.
+label: docsite_pr
* Removed change to description
Corrected issue to my "correction" on the description.
* Removed required false
* Removed all instances of required: false.
User module can contain Indentation errors or syntax errors.
Handle AST exceptions rather than showing traceback while importing such module.
Fixes: #21707
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Simplify the requirement section to avoid duplicating info already in mysql_document_fragment.
* Package installation section simplified, mentioned RHEL; a typo fix in "than".
* added dnf for Fedora
* Note: Python2 is not as intelligent at detecting false import loops as
Python3. context_objects.py cannot be added to cli/arguments because it
would set up an import loop between cli/__init__.py,
cli/arguments/context_objects.py, and context.py on Python2.
ci_complete
* Mark methods which are really functions as staticmethod
* Fix calls to other staticmethods to use the subclass rather than the
base class so that any inheritance overriding will be honored.
* Remove unnecessary logic and dead code
* Fix a typo in a docstring of how to implement subclass init_parser()
methods
* Call superclass's post_process_args in ansible-doc
* Fix copyright comment according to suggested practice
The goal of breaking apart the base_parser() function is to get rid of
a bunch of conditionals and parameters in the code and, instead, make
code look like simple composition.
When splitting, a choice had to be made as to whether this would operate
by side effect (modifying a passed in parser) or side effect-free
(returning a new parser everytime).
Making a version that's side-effect-free appears to be fighting with the
optparse API (it wants to work by creating a parser object, configuring
the object, and then parsing the arguments with it) so instead, make it
clear that our helper functions are modifying the passed in parser by
(1) not returning the parser and (2) changing the function names to be
more clear that it is operating by side-effect.
Also move all of the generic optparse code, along with the argument
context classes, into a new subdirectory.
* Once cli args are parsed, they're constant. So, save the parsed args
into the global context for everyone else to use them from now on.
* Port cli scripts to use the CLIARGS in the context
* Refactor call to parse cli args into the run() method
* Fix unittests for changes to the internals of CLI arg parsing
* Port callback plugins to use context.CLIARGS
* Got rid of the private self._options attribute
* Use context.CLIARGS in the individual callback plugins instead.
* Also output positional arguments in default and unixy plugins
* Code has been simplified since we're now dealing with a dict rather
than Optparse.Value
* Move get_all_subclasses out of sys_info as it is unrelated to system
information.
* get_all_subclasses now returns a set() instead of a list.
* Don't port get_platform to sys_info as it is deprecated. Code using
the common API should just use platform.system() directly.
* Rename load_platform_subclass() to get_platform_subclass and do not
instantiate the rturned class.
* Test the compat shims in module_utils/basic.py separately from the new
API in module_utils/common/sys_info.py and module_utils/common/_utils.py
* urldecode filter for Jinja2
We needed this in order to deconstruct correct URLs using Jinja2.
And we might as well upstream this.
* Add integration tests
* Fixes for Python 3
* Add urlencode for older Jinja2
* gcp: documentation update
* Update example about dynamic inventory
* minor typo fixes in gcp_utils
* Additional information about enabling inventory plugin in ansible.cfg
partially fixes: #44404
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* add openssh_cert module
* fix some linter issues
* address review feedback
* add basis for integration tests
* change valid datetime formats
* handle principals as set not as list
* handle principals as set not as list
* handle principals as set not as list