Closed
Description
Summary
If exist new version of package, module has been report - "Nothing to install"
Bug description (on Russian) - https://bugzilla.altlinux.org/48091
Issue Type
Bug Report
Component Name
community.general.apt_rpm
Ansible Version
ansible 2.9.27
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.9.16 (main, Mar 21 2023, 10:12:38) [GCC 10.3.1 20210703 (ALT Sisyphus 10.3.1-alt2)]
Community.general Version
ansible-galaxy --version
ansible-galaxy 2.9.27
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/site-packages/ansible
executable location = /usr/bin/ansible-galaxy
python version = 3.9.16 (main, Mar 21 2023, 10:12:38) [GCC 10.3.1 20210703 (ALT Sisyphus 10.3.1-alt2)]
$ ansible-galaxy collection list community.general
usage: ansible-galaxy collection [-h] COLLECTION_ACTION ...
ansible-galaxy collection: error: argument COLLECTION_ACTION: invalid choice: 'list' (choose from 'init', 'build', 'publish', 'install')
Configuration
$ ansible-config dump --only-changed
-- nothing --
OS / Environment
OS Alt Server 10.1
Steps to Reproduce
-
fakepkg 1.0 and fakepkg 2.0 in repo.
-
Install fakepkg 1.0 manually -
rpm -i /path/to/fakepkg-1.0.rpm (or apt-get install fakepkg=1.0) -
Create simple playbook
cat /tmp/apt_rpm.yml
- name: Playbook
connection: local
gather_facts: false
hosts: localhost
tasks:
- name: Ensure fakepkg rpm present
apt_rpm:
pkg: fakepkg
update_cache: true
state: present
- apply
Using /etc/ansible/ansible.cfg as config file
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [Playbook] ***********************************
TASK [Ensure fakepkg rpm present] *****************************************
ok: [localhost] => {"changed": false, "msg": "Nothing to install"}
PLAY RECAP ************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Expected Results
fakepkg update from 1.0 to 2.0 version
Actual Results
rpm -q fakepkg
fakepkg-1.0-alt1.x86_64
Code of Conduct
- I agree to follow the Ansible Code of Conduct
Activity