community.general.zypper_repository_info module – List Zypper repositories

Note

This module is part of the community.general collection (version 10.2.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

alias

string

The alias of the repository.

Returned: success

Sample: "SLE-Product-SLES"

autorefresh

integer

Indicates, if autorefresh is enabled on the repository.

Returned: success

Sample: 1

enabled

integer

Indicates, if the repository is enabled.

Returned: success

Sample: 1

gpgcheck

integer

Indicates, if the GPG signature of the repository meta data is checked.

Returned: success

Sample: 1

name

string

The name of the repository.

Returned: success

Sample: "SLE-Product-SLES"

priority

integer

The priority of the repository.

Returned: success

Sample: 99

url

string

The URL of the repository on the internet.

Returned: success

Sample: "http://repo:50000/repo/SUSE/Products/SLE-Product-SLES/15-SP2/x86_64/product"

Authors

  • Tobias Zeuch (@TobiasZeuch181)