* Look in /lib/molly-guard for shutdown command
Signed-off-by: Sam Doran <sdoran@redhat.com>
* Add parameter for extra_search_paths
Signed-off-by: Sam Doran <sdoran@redhat.com>
* Change option to search_paths
- Update docs
- Make the parameter replace the default values
- Add some sanity checking on the data type
Signed-off-by: Sam Doran <sdoran@redhat.com>
* Correct parameter in tests, change conditional for molly-guard tasks
Signed-off-by: Sam Doran <sdoran@redhat.com>
* Address feedback
* Simplify field validation
Needed the try except in case a non-iterable type is put in the search_paths field
* 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
* Fix TagName and TagValue in aws_kms
Fixes#53061
* Improve test suite to check for tags
Also fixed some obvious failures, need to run the test suite from time
to time!
* adding quiet option to assert (ansible#27124)
* adding doc for quiet to assert.py
* fixing PEP8 failure
* improving example
* improving docs
* adding changelog fragment
* adding . at end of descriptions
* removing trailing blank line
* adding integration test for assert
* fixing CI complaints
* disabling gather_facts in quiet.yml test
* rerunning to capture skip
* cleaning up python 2 vs 3
* following rebase
* fixing CI complaints
* fixing CI complaints
* fixing CI complaints
* fixing CI complaints
* fixing CI complaints
* 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
* network.py:ActionModule:run: does not honor _handle_src_option failures
PR #50301 moved template error handling out of run() and into its
own method in `_handle_src_option`; however, after the change run()
ignores the return value so any errors are ignored.
Reproduceable with `nxos_config/tests/common/src_invalid.yaml`
Verified fix with `nxos_config/tests/common/src_*` tests.
Ref:
71113ee291 (diff-7477bf046013758366cc85b06f90709aR43)
* nxos_config/tests/common/src_basic: Updated to test with src
This test was not actually testing with `src:` as it should have.
* Revert 412d7e change to plugins/action/network.py
PR #52912 fixed this already.
* nxos_config: fix src_invalid test
* Ensure play order is obeyed
it was being ignored depending on other options
also added tests for each order (except shuffle) both serial and not
fixes#49846
* adding mysql configuration module
* fixes in configuration
* move tests
* fixes
* updating test
* updated module
* fixed merge issues
* one more test fix
* adding for debugging purposes
* removed file checked in by mistake
* one more merge problem
* fixed test
* try to get more info
* fix error
* Add more tests.
* Added tests for CA options.
* Don't run in docker-in-docker situations where docker daemon becoming instable is really dangerous. Also, restart docker daemon after tests.
* Only run CA tests when openssl_certificate can be run (which is not the case for RHEL7, see #34054).
* Add comment on why docker-based CI runs are skipped.
* nxos_hsrp: fix 'sh_preempt': <unknown enum:>
Some older nxos images fail to set this attr value. This fix checks for
unknown enum and issues a second (unstructured) call to the device to get
the data.
* add whitespace for pep8
* Support UpdateService forceNewDeployment in ecs_service module
* Fixes for review
* Add force_new_deployment option to ecs_service.py
cherrypicks changes from via/ansible
Adds tests for pull request #42518
fixes backwards compatability with boto<1.8.4
* WIP commit so I don't have to stash
* WIP commit for healthcheck grace period
* WIP commit; ecs_module handles service registries
* Fix bad check for desired_count
* Add scheduling strategy test, comment out service registry test
* Fix names in ecs_cluster role main task.
* move full test run back to the end
* Change botocore version for full test to support scheduling strategy
* fix bug with desired_count==0 in amazon/ecs_service
* Fix changed checking for scheduling strategy DAEMON in ecs_service
* Pass testS
* Fix some unhelpful comments
* Add changelog for ecs_service
* Add diff support to docker_swarm.
* Add changelog.
* Using diff mode for docker_swarm tests. This improves debugging, since the the module now outputs more information on *why* it did certain actions.
* Revert "Clear failed state in always only if we did rescue (#52829)"
This reverts commit f135960fc2.
* Add tests for failed scenario
* Set failed task with EXPECTED FAILURE
* Adding module for managing AWS Secrets Manager resources
* adding aws_secret lookup plugin
Also use the data returned by describe_secret everywhere.
* replace the explicit /root use by a temporary dir
* aws_secret: rework module
Reworked module to use a class avoiding using client and module in every
functions.
* Added support of "recovery_window" parameter to allow user to provide
recovery period.
* updated return value to be the api output providing more details about
the secret.
* Fix Python 3 bug in tests if the role is not removed
* Add unsupported alias due to issue restricting resource for creating secrets
* Add folder_name alias
The parameter should be named folder_name instead of folder to be
consistent with the other parameters cluster_name and datacenter_name.
* Fix 'A specified parameter was not correct: cnxSpec' error
The play fails when re-connecting a host with the cnxSpec argument
defined.
Just remove the cnxSpec argument definition. It isn't necessary when
re-connecting an existing host in vCenter (6.5).
* Fix ESXi host add/remove/re-connect errors
An ESXi host cannot be added, removed, or re-connected under a folder.
ESXi hosts connected under a folder, instead of a cluster, have an
object type of ComputeResource instead of HostSystem and the HostSystem
object is the first entry in the host parameter list of the
ComputeResource object.
Separate between cluster and folder actions.
* Add support for changing UUID type referenced
* Update all appropriate VMware modules to include UUID type
* Add integration test for filtering on instance UUID
* Windows: Add backup parameter to modules
This PR adds a backup infrastructure for modules.
* Fixes based on review feedback
* Various fixes to check-mode and backup
* Add integration tests
* Fix win_xml integration test
* Add backup support to copy action plugin
* Added integration tests
* Improve test efficiencies and other minor impv
* Add proper k8s *List kind support
* set defaults more intelligently
* reimplement list support so that it will work in all versions of the client
* clean up debugging code
* Allow configuration templates when using net_id...for reals
- Didn't work before, I had bad code. I'm sorry.
- Cleaned up code and simplified functions
- Added integration tests to test for net_id actions
* Add changelog
* Add module name to changelog
* Fix indentation
* Initial commit of meraki_syslog module
- Query or modify syslog settings in Meraki networks
- This has not yet been tested
* Module now supports creating new syslog servers
- Added integration test
- Still needs to add support for
- Modification or removal of roles
- Removal of syslog servers
- Test to make sure servers are appended to existing
* Improvements to integration test
- Code hasn't been tested so it likely is broke somewhere
- Move to a block setup and always destroy network
- Create test network just for syslog server tests
- Current tests will test present functionality
- Absent state needs to be tested further
* Working version of meraki_syslog module
- There is no absent state since module overwrites server config
- Full integration tests
* Formatting fix
* Add some examples
* Fix sanity test errors
* Add type for all parameters
* Add new module property to Windows modules
* Add brief pause to file tests to ensure the stat times are not equal, which was happening sometimes.
* Raise TypeError on error rather than fail_json()
* Rework error message to be less verbose
* Add porting guide entry
* test - add setup target that creates the nobody user
* do not set explicit gid/uid for nobody user
* Do no create group and only touch basic attributes
* fix parameters check and port module to boto3
* begin with integration tests
* allow redshift iam policy
* Wait for cluster to be created before moving on to delete it
* Allow sts credentials so this can be run in CI
Don't log credentials
ensure cluster can be removed
* - Replace DIY waiters with boto3 waiters
- test multi node cluster
* catch specific boto3 error codes
* remove wait from test
* add missing alias for shippable
* - Rework modify function.
- Default unavailable parameters to none.
- Add cluster modify test
* Ensure resources are cleaned up if tests fail
* Ensure all botocore ClientError and BotoCoreError exceptions are handled
* Don’t remove service when networks change
* Add changelog fragment
* Some more network integration tests
* Add hannseman as author
* Remove return on self.client.fail
* Integration tests for docker_host_facts
* Integration tests for docker_host_facts (update to cover #52432 fix)
* Integration tests for docker_host_facts updates after review
* Integration tests for docker_host_facts updates after review
* Integration tests for docker_host_facts updates after review
* Integration tests for docker_host_facts - adding comments and integrated test for all options combined together
* Integration tests for docker_host_facts - small code improvement
* Adjusting variable name
* dev test labs vm and artifacts
* fix sanity
* fixing sanity
* disable artifact test for now
* + vn update
* fix sanity
* fixed test issue
* one more merge update
* fixed assert
* intersight_rest_api module and integration tests.
Fix intersight module_utils issues when using POST/PATCH/DELETE.
* Update json returns based on code review
* Initial commit
- Module mostly works but doesn't work for URL categories
- Additional tests should be added
- Documentation is needed
- Module is close to being complete
* Improved documentation
- Added parameter documentation
- Added examples
* Lint changes and bug fixes
- Fixed content filtering syntax bug per Meraki documentation update
* Change test cases so they work
* Remove duplicate key
* Improve documentation and check mode
* Fix bug when specifying SSID by number
- Migrated integration test to blocks with always
- Minor URL fixes
(cherry picked from commit ed79c294f2e3f82d4828226004c055dcd7ce9f63)
* Create changelog file
* Add new line
* Add first version of luks_device tests.
* Do ~ expansion manually.
* Try to enable RHEL8.
* Adjust to older losetup version.
* Make sure cryptsetup is installed.
* Cisco Intersight module_utils and intersight_facts module
* Add RETURN information and fix pylint, import, and pep8 issues.
* Review updates for specifying type of params/returns and not polluting ansible_facts.
* BSD one line license, validate_certs used, urls.fetch_urls replaces requests
* postgresql_idx: ci tests, refactoring, return values
* postgresql_idx: ci tests, new params, return values
* postgresql_idx: ci tests, fix
* postgresql_idx: ci tests, fix
* postgresql_idx: ci tests, fix
* postgresql_idx: ci tests, fix
* postgresql_idx: ci tests, fix
* postgresql_idx: ci tests, fix
* postgresql_idx: ci tests, fix
* postgresql_idx: ci tests, fix
* postgresql_idx: ci tests, fix
* New module postgresql_table - fix tests
* New module postgresql_table - fix tests
* New module postgresql_table - fix tests
* New module postgresql_table - fix state choices order
In ACS 4.12, it is no longer possbile to acquire IPs to a (...) network
not already in implemented state.
With deployment of a VM instance, we enforce the implementation of the
network. Also see 323f791efc
Previously the yum module would provide a `changes` dict when
executed in check mode but omit it when not in check mode in favor
of the `results` data which is raw output from the yum command. This
pull request makes that output uniform.
Fixes#51724
Signed-off-by: Adam Miller <admiller@redhat.com>
* Check that verify_ssl defined in tower_cli.cfg isn't ignored
* Avoid to override verify_ssl value defined in tower_cli.cfg
By default, tower-cli library enables SSL certificates check. But
verify_ssl false value defined in config files read by default by
tower-cli library (for example /etc/tower/tower_cli.cfg) was ignored
because overriden by the tower_verify_ssl parameter default value.
* fix a typo in comment
* Added support for user-specified log file in win_package - feature (#38353)
* added integration tests for win_package log_path support feature (#38353), and applied review feedback
* win_package log_path support feature (#38353) - fixed typo in win-package.py documentation
* win_package log_path support feature (#38353) - improved an integration test and better doc in win-package.py
Due to changes in https://github.com/ansible/ansible/pull/45412
vmware_guest testcase delete_vm failed. This patch will fix that testcase.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Allow creation and deletion of keys (deletion just schedules for
deletion, recreating an old key is just cancelling its deletion)
* Allow grants to be set, thus enabling encryption contexts to be
used with keys
* Allow tags to be added and modified
* Add testing for KMS module
* Tidy up aws_kms module to latest standards
* Add posibilities to run the integration tests for PowerShell < 5.0
* Update of tests - based at a review comments for #50612
* The correction of YAML structure
* Add state option to git_config module
State present/absent option works like --set/--unset option for 'git config'.
* Change git_config to avoid useless parameter passed to git command
When unsetting value, command was : git config --unset foo ''.
Now command is : git config --unset foo.
* Add some integration tests to git_config module
* Add missing aliases file
* Change set up method
Using git command seems to cause troubles on some OS : changing config
by changing '.gitconfig' file.
* Remove some distros from tests pool
Git is not installed or is out of date on these distros.
* Fix aliases to skip tests on centos6
* Refactor tests of the git_config module
* Add use case when state=absent and value is defined
* [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
* 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
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>
* recent changes to args for hosted template file broke the test; changed test to use a specific known-working commit instead of `master`.
* long-term may want to consider hosting the template in httptester or just embedding a local copy