-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugThis issue/PR relates to a bugThis issue/PR relates to a bughas_prmodulemodulemodulepluginsplugin (any type)plugin (any type)system
Description
Summary
When I try to run the below task, I receive a usage error from update-alternatives. Prior to 5.1.0, this works as expected. It looks like the --slave argument is missing a required value (--slave unversioned-python /usr/bin/python3 compared to --slave <slave_link> <slave_name> <slave_path>). Downgrading to 5.0.2 is a workaround.
Issue Type
Bug Report
Component Name
alternatives
Ansible Version
$ ansible --version
ansible [core 2.12.6]
config file = /tmp/y/ansible.cfg
configured module search path = ['/var/home/bpratt/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /tmp/y/venv/lib64/python3.10/site-packages/ansible
ansible collection location = /var/home/bpratt/.ansible/collections:/usr/share/ansible/collections
executable location = /tmp/y/venv/bin/ansible-playbook
python version = 3.10.4 (main, Mar 25 2022, 00:00:00) [GCC 12.0.1 20220308 (Red Hat 12.0.1-0)]
jinja version = 3.1.2
libyaml = TrueCommunity.general Version
$ ansible-galaxy collection list community.general
# /var/home/bpratt/.ansible/collections/ansible_collections
Collection Version
----------------- -------
community.general 5.1.0
# /tmp/y/venv/lib/python3.10/site-packages/ansible_collections
Collection Version
----------------- -------
community.general 4.8.2
# /tmp/y/venv/lib64/python3.10/site-packages/ansible_collections
Collection Version
----------------- -------
community.general 4.8.2
Configuration
$ ansible-config dump --only-changed
OS / Environment
RHEL 8
Steps to Reproduce
- community.general.alternatives:
name: python
path: /usr/bin/python3
link: /usr/bin/pythonExpected Results
{"changed": true}
Actual Results
TASK [community.general.alternatives] *******************************************************************************************************************************************
task path: /tmp/xyz/playbook.yml:4
redirecting (type: modules) community.general.alternatives to community.general.system.alternatives
fatal: [10.0.101.1]: FAILED! => changed=false
ansible_facts:
discovered_interpreter_python: /usr/libexec/platform-python
cmd: /usr/sbin/update-alternatives --install /usr/bin/python python /usr/bin/python3 50 --slave unversioned-python /usr/bin/python3 --slave unversioned-python-man /usr/share/man/man1/python3.1.gz
msg: ''
rc: 2
stderr: ''
stderr_lines: <omitted>
stdout: |-
alternatives version 1.19.1 - Copyright (C) 2001 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.
usage: alternatives --install <link> <name> <path> <priority>
[--initscript <service>]
[--family <family>]
[--slave <slave_link> <slave_name> <slave_path>]*
alternatives --remove <name> <path>
alternatives --auto <name>
alternatives --config <name>
alternatives --display <name>
alternatives --set <name> <path>
alternatives --list
alternatives --remove-all <name>
alternatives --add-slave <name> <path> <slave_link> <slave_name> <slave_path>
alternatives --remove-slave <name> <path> <slave_name>
common options: --verbose --test --help --usage --version --keep-missing --keep-foreign
--altdir <directory> --admindir <directory>
stdout_lines: <omitted>Code of Conduct
- I agree to follow the Ansible Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis issue/PR relates to a bugThis issue/PR relates to a bughas_prmodulemodulemodulepluginsplugin (any type)plugin (any type)system