mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-22 05:09:12 +00:00
Add 'state' parameter for alternatives (#4557)
* Add 'activate' parameter for alternatives Allow alternatives to be installed without being set as the current selection. * add changelog fragment * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> * rename 'activate' -> 'selected' * rework 'selected' parameter -> 'state' * handle unsetting of currently selected alternative * add integration tests for 'state' parameter * fix linting issues * fix for Python 2.7 compatibility * Remove alternatives file. Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
d7e5e85f3e
commit
29c49febd9
5 changed files with 149 additions and 9 deletions
|
|
@ -49,6 +49,12 @@
|
|||
# Test that path is checked: alternatives must fail when path is nonexistent
|
||||
- import_tasks: path_is_checked.yml
|
||||
|
||||
# Test operation of the 'state' parameter
|
||||
- block:
|
||||
- include_tasks: remove_links.yml
|
||||
- include_tasks: tests_state.yml
|
||||
|
||||
# Cleanup
|
||||
always:
|
||||
- include_tasks: remove_links.yml
|
||||
|
||||
|
|
@ -62,6 +68,7 @@
|
|||
path: '/usr/bin/dummy{{ item }}'
|
||||
state: absent
|
||||
with_sequence: start=1 end=4
|
||||
|
||||
# *Disable tests on Fedora 24*
|
||||
# Shippable Fedora 24 image provides chkconfig-1.7-2.fc24.x86_64 but not the
|
||||
# latest available version (chkconfig-1.8-1.fc24.x86_64). update-alternatives
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue