IOS prepends a show running-config with lines that are not part of the
configuration, keeping the output from being an entirely valid configuration:
R1#show run
Building configuration...
Current configuration : 2045 bytes
...
In order to be able to use the config from ios_facts as-is, strip this
header.
* Always use /proc/sys/kernel/random/boot_id to confirm reboot on Linux
/proc/sys/kernel/random/boot_id is available since kernel 2.3.16 and
should be safe to rely on.
The previously used method by checking the system boot time using who -b
turned out to be unreliable: Some systems lacking an RTC report the Unix
epoch as boot time, but the code trying to detect that did't always
work.
Closes#46562
* Change DEFAULT_BOOT_TIME_COMMAND
- change to usinsg /proc by default
- add BOOT_TIME_COMMANDS for BSD, Solaris, and macOS
The PR adds new option "next_run" so that user can decide if the
configuration has to be applied on the VM immediately or it has
to be configured on next restart.
* Complie regular expressions for better performance
* Skip on empty lines
This fixes a bug where the previous repo would be inserted in the result twice since an empty line did not match any of the conditions that would exit the loop iteration.
The description of the `name` and `id` options are updated to highlight the fact that the `name` (which is required and leads to failures if several images exist with the same name) argument can also contain the image `id`.
+label: docsite_pr
* win_update: Add post search category matching to support product matching
* win_updates: Return categories of each update
* win_updates: Documentation fix-up
* win_updates: Adjusted documentation to reflect regex vs sub-string match of post-cat strings
* win_updates: Sped up post-category checking
* win_updates: Updated documentation to suggest querying post-category strings
* win_updates: Simplified saving and checking post-categories
* fixed some issues and added filtered categories to return value
* win_updates: Moved all category matching to occur after initial search
* win_updates: Adjustments to satisfy PowerShell lint checks
* win_updates: Dropped category validation from action plugin
* win_updates: Documentation updates
* win_updates: Fixed plugin unit tests
* Added basic equivalent to PowerShell modules
* changes based on latest review
* Added tests
* ignore sanity test due to how tests are set up
* Changes to work with PSCore
* Added documentation and change updated more modules
* Add some speed optimisations to AddType
* fix some issues in the doc changes
* doc changes
* yum also parse obsolete package output
This is a rebase of the patch originally proposed in
https://github.com/ansible/ansible/pull/40001 by machacekondra
Fixes#39978
Signed-off-by: Adam Miller <admiller@redhat.com>
* properly parse the obsoletes, provide a new output entry, add changelog
Signed-off-by: Adam Miller <admiller@redhat.com>
* make pep8 happy
Signed-off-by: Adam Miller <admiller@redhat.com>
* remove q debugging output
Signed-off-by: Adam Miller <admiller@redhat.com>
* First pass at a toml inventory
* Make EXAMPLES yaml
* Remove unnecessary comment
* Small formatting changes
* Add ansible-inventory option to list as TOML
* TOML inventory improvements, to allow a more simple inventory, specifically related to children
* changelog
* Simplify logic
* Dedupe _expand_hostpattern, making it available to all inventory plugins
* Don't make the TOML inventory dependent on the YAML inventory
* Quote IP address values
* Add more TOML examples
* Further cleanups
* Enable the toml inventory to run by default
* Create toml specific dumper
* 2.8
* Clean up imports
* No toml pygments lexer
* Don't raise an exception early when toml isn't present, and move toml to the end, since it requires an external dep
* Require toml>=0.10.0
* Further clean up of empty data
* Don't require toml>=0.10.0, but prefer it, add code for fallback in older versions
* Ensure we actually pass an encoder to toml.dumps
* Simplify recursive data converter
* Appease tests, since we haven't limited controller testing to 2.7+
* Update docstring for convert_yaml_objects_to_native
* remove outdated catching of AttributeError
* We don't need to catch ImportError when import ansible.plugins.inventory.toml
* Add note about what self.dump_funcs.update is doing
* Address some things
* A little extra comment
* Fix toml availability check
* Don't create an intermediate list
* Require toml file extension
* Add metadata
* Remove TOML docs from intro_inventory to prevent people from getting the wrong idea
* It's in defaults, remove note
* core supported, indicate very clearly that this is preview status
The host argument is a Host object, and is used as such by
group.remove_host. However, self.hosts is a dictionary of host name to
Host object. Thus, the existing code is checking to see if the Host
object is one of the keys.
Use host.name to interact with the keys of the dictionary.
The change to add sshpass support for rsync broke synchronize when
a password was provided at all. Have to convert an int into a string to
make it work.
* Allow bang and exclamation without warning
Allow the password field to be ! or * without warning when using this feature to create accounts that are locked.
Add documentation and tests to cover this.
* Use set() rather than braces for Python 2.6
* Correct yum and dnf autoremove behavior
Sanity check args passed to autoremove
Fixes#47184
Signed-off-by: Adam Miller <admiller@redhat.com>
* fix docs
Signed-off-by: Adam Miller <admiller@redhat.com>
* fix(tasks: synchronize): wrap in sshpass if ssh password was provided
Closes#16616
* fix(tasks: synchronize): pass rsync password to sshpass via fd
* fix(tasks: synchronize): use fail_json instead of AnsibleError
* fixup! fix(tasks: synchronize): use fail_json instead of AnsibleError
fix python2 handling
* feat(module_utils: basic: run_command): add optional arguments `pass_fds` and `before_communicate_callback`
* fix(tasks: synchronize): use module.run_command instead of subprocess.Popen
* fixup! fix(tasks: synchronize): use module.run_command instead of subprocess.Popen
remove unused import
* fixup! fixup! fix(tasks: synchronize): use module.run_command instead of subprocess.Popen
pass_fds only if they passed to run_command()
The current doc of k8s_raw_module contain a copy paste of the env var name :
```
host :
Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.
key_file : Path to a key file used to authenticate with the API. Can also be specified via K8S_AUTH_HOST environment variable.
```
* Removed deprecated ANSIBLE_HOSTS
* Bump sudo/su configs to match deprecation version for cli and playbook args
* Bump include configs to match deprecation version for 'include'
* Fix lvg module idempotency
In [1] changes were made to ensure that the physical
devices were appropriately filtered, but the dev_list
which is used to prepare the filter is modified from
the original arguments to resolve any symlinks. This
results in the existing devices given in the module
args to be left out of the filter, resulting
in the module trying to add the same device again
every time the task is executed.
In this PR we change dev_list to be a copy of the
module arguments so that we're able to add the given
pv list from the module arguments into the filter
as well, ensuring that there is idempotence when
running the task again.
[1] https://github.com/ansible/ansible/pull/38446
* Add lvg module idempotence test
To ensure that the lvg module is tested for idempotency,
we add a basic integration test.
Support for MacOS and FreeBSD are skipped because the
module does not currently support those platforms.
* Store parsed docker-py / docker API versions in client.
* Began refactoring 'minimal required version' for docker_container options.
* Removing some fake defaults.
* Added changelog.
* Improve tests (check older docker versions).
* Fix comparison. The breaking point is not docker-py 2.0.0, but 1.10.0.
(Verified by testing with these versions.)
* Move docker-py/API version detection to setup_docker.
* Add YAML document starter.
* docker_network requirement for docker-py was bumped to 1.10.0 in #47492.
* Docs: Clean up of 'acl' module docs
This is part of a series of module doc cleanups.
* Changes influenced by review coments
* Changes based on review
* issue-47881 making udp calls an option
* squash! issue-47881 making udp calls an option
* squash! issue-47881 making udp calls an option
* squash! issue-47881 making udp calls an option
* --squash
* squash! Merge branch 'issue-47881' of github.com:ckyriakidou/ansible into issue-47881
Handle exception when there is no snapshot available in virtual machine or template while cloning using vmware_guest.
Fixes: #47920
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Support for device read write limit parameters
* Add following options in docker_container module
- device_read_bps
- device_write_bps
- device_read_iops
- device_write_iops
Fixes#36831
* test for device_read_iops
* combined test for device_write_bps and device_write_iops
Don't fail when policy, requestPayment, tagging or versioning API is not
implemented by the endpoint and if related parameters policy, requester_pays,
tags or versioning are None.
You typically want the lineinfile module to operate in an indempotent way, similar to using "sed -i", so your regexp needs to match the line to edit both before and after the edit, otherwise on a second run the regexp will no longer match the original text line and you will end up with a second copy of the replacement line at the top/bottom of the file.
* cleanup is already tested.
* Add test for paused.
* Add recreate and restart tests.
* timeout is a common docker option
* Implement paused and fix paused test.
* Add changelog.
* Improve paused test.
* There will always be metadata returned so no need to check for its
existence first.
* There won't be version or metadata_version as those are being removed
by the api. So all checks for those need to be removed.
migration is disabled. The PR adds new option to force migrate
the VMs. This is required for hosted engine migration since
automatic migration is disabled for HE VM by default.
shade is not used anymore by the `os_*` modules.
PR #40532 replaces `shade` library by `openstacksdk`. This commit clean
up some references to the old library. It's similiar to what has been
done in PR #40784.
* add filters variable to allow servers to be selected based on arbitrary nova properties
* update docs to fix yaml
* add required info for filters variable in the docs
* bump version number
* clean up documentation
* New v2_runner_on_start callback added to indicate the start of execution for a host in a specific task
* Add changelog fragment
* Minor docstring clarification
* Modify yum/tasks/proxy.yml to usernames that expose regex bug
* Fix bad regex backref/interpolation w/yum proxy username
A yum proxy username that begins with a number was being
interpolated as part of the backref, resulting in an error:
"sre_constants.error: invalid group reference"
Closes#47797
Description for the name and description was vague. I didn't get the first time reading that it was talking about a character limit.
+label: docsite_pr
* Remove message suggesting that state: absent is not implemented for queues
* Remove message suggesting that state: absent is not implemented for exchanges
* Providing fix for #47083 in pamd.py
* Providing fix for #47197
* Fixing pep8 errors
* update regex to account for leading dash and VALID_TYPES with dashes as well
* use a results dictionary and clean up unnecessary items
* remove unnessecary return value. action is already reported in invocation output
* make naming consistent across action returns
* fix comparison so it checks equality instead of identity and indentation in update_rule()
* make sure file always has EOF newline
* updated regex to skip spacing between path and args and add rule arg regex to capture complex args
* new module argument parsing code in function and DRY changes
* remove unused has_rule method on PamdService class
* fix error in parse_module_arguments()
* updated args_present action to make it handle key value args and fail on complex bracketed arguments
* pep8 and other fixes so units still work
* suggested change - make version removed 2.8
Co-Authored-By: shepdelacreme <shepdelacreme@users.noreply.github.com>
* add more error proof test to if statement
* Parsing plugin filter may raise TypeError, gracefully handle this exception
and let user know about the syntax error in plugin filter file.
* Test for plugin_filtering
Fixes: #46658
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* ManageIQ module to manage groups
* Fixed typos, more examples on managed_filters.
* Simplified the input if managed_filters
Change return values role_name and tenant_name to role and tenant to macht input params
* Return managed_filters and belongsto_filters instead of filters to better mach the input params
* More generic comparison code from docker_container to docker_common.
* More flexibility if a is None and method is allow_to_present.
Note that this odes not affect docker_container, as there a is never None.
* Update docker_secret and docker_config: simplify labels comparison.
* Added unit tests.
* Use proper subsequence test for allow_more_present for lists.
Note that this does not affect existing code in docker_container, since lists
don't use allow_more_present. Using allow_more_present will only be possible
in Ansible 2.8.
* pep8
* docker_image: Fix up 'changed' event in force mode
This is the same as https://github.com/ansible/ansible/pull/19235 except it applies to all image-building modes (building the image locally, loading the image from an archive, or pulling the image), rather than only when pulling the image.
* Use 'dummy' rather than '_' as unused variable name.
* Add changelog fragment for pull request #33754