community.general.zypper_repository_info module – List Zypper repositories

Note

This module is part of the community.general collection (version 10.1.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.general. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: community.general.zypper_repository_info.

New in community.general 10.0.0

Synopsis

  • List Zypper repositories on SUSE and openSUSE.

Requirements

The below requirements are needed on the host that executes this module.

  • zypper >= 1.0 (included in openSUSE >= 11.1 or SUSE Linux Enterprise Server/Desktop >= 11.0)

  • python-xml

Attributes

Attribute

Support

Description

check_mode

Support: full

This action does not modify state.

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: N/A

This action does not modify state.

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

Notes

Note

Examples

- name: List registered repositories and store in variable repositories
  community.general.zypper_repository_info: {}
  register: repodatalist

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

repodatalist

list / elements=dictionary

A list of repository descriptions like it is returned by the command zypper repos.

Returned: always

Sample: [{"alias": "SLE-Product-SLES", "autorefresh": "1", "enabled": "1", "gpgcheck": "1", "name": "SLE-Product-SLES", "priority": "99", "url": "http://repo:50000/repo/SUSE/Products/SLE-Product-SLES/15-SP2/x86_64/product"}]

alias

string

The alias of the repository.

Returned: success

autorefresh

integer

Indicates, if autorefresh is enabled on the repository.

Returned: success

enabled

integer

indicates, if the repository is enabled

Returned: success

gpgcheck

integer

indicates, if the GPG signature of the repository meta data is checked

Returned: success

name

string

the name of the repository

Returned: success

priority

integer

the priority of the repository

Returned: success

url

string

The URL of the repository on the internet.

Returned: success

Authors

  • Tobias Zeuch (@TobiasZeuch181)