Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zypper: Add parameter to list all updatable packages #8941

Open
1 task done
seraphyn opened this issue Sep 27, 2024 · 5 comments
Open
1 task done

zypper: Add parameter to list all updatable packages #8941

seraphyn opened this issue Sep 27, 2024 · 5 comments
Labels
feature This issue/PR relates to a feature request module module plugins plugin (any type)

Comments

@seraphyn
Copy link

Summary

I try to list all available updates like in dnf, apt, or yum, but this feature isn't implemented atm.
I helped myself to write this Playbook years ago, but in my opinion this should be an parameter in the module zypper

- hosts: sles
  become: true
  become_user: root
  tasks:
          - name: Zypper Update awk to file
            shell:
                " zypper ref && zypper lu | awk '{print $5, $7, $9 }' | sed -e '1,10d' | sed 's/\"//' > /tmp/awklist.txt "
            register: lsout
            tags: lsout

          - name: show awklist
            shell : cat /tmp/awklist.txt
            register: displaylist

          - debug: msg="{{displaylist.stdout_lines}}"
          - 

It's not perfect but fits atm

Issue Type

Feature Idea

Component Name

zypper

Additional Information

- name: show updateable packages
  community.general.zypper:
    update_cache: yes
    state: installed
    upgrade: no

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request module module plugins plugin (any type) labels Sep 27, 2024
@felixfontein
Copy link
Collaborator

This should be (part of) a separate module, like zypper_info. (See https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_best_practices.html#scoping-your-module-s on list/info/get states.)

@seraphyn
Copy link
Author

You're right.
But there's no zypper_info atm

@felixfontein
Copy link
Collaborator

Indeed. So far nobody created one :)

(Similar issues/PRs: #6736 #8777)

@russoz russoz changed the title [Feature Request][zypper] Add parameter to list all updateable packages zypper: Add parameter to list all updatable packages Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request module module plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

3 participants