community.general.zypper_repository – Add and remove Zypper repositories¶
Note
This plugin is part of the community.general collection (version 2.5.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.zypper_repository
.
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
Parameters¶
Examples¶
- name: Add NVIDIA repository for graphics drivers
community.general.zypper_repository:
name: nvidia-repo
repo: 'ftp://download.nvidia.com/opensuse/12.2'
state: present
- name: Remove NVIDIA repository
community.general.zypper_repository:
name: nvidia-repo
repo: 'ftp://download.nvidia.com/opensuse/12.2'
state: absent
- name: Add python development repository
community.general.zypper_repository:
repo: 'http://download.opensuse.org/repositories/devel:/languages:/python/SLE_11_SP3/devel:languages:python.repo'
- name: Refresh all repos
community.general.zypper_repository:
repo: '*'
runrefresh: yes
- name: Add a repo and add its gpg key
community.general.zypper_repository:
repo: 'http://download.opensuse.org/repositories/systemsmanagement/openSUSE_Leap_42.1/'
auto_import_keys: yes
- name: Force refresh of a repository
community.general.zypper_repository:
repo: 'http://my_internal_ci_repo/repo'
name: my_ci_repo
state: present
runrefresh: yes
Authors¶
Matthias Vogelgesang (@matze)