Note
This plugin is part of the community.general collection.
To install it use: ansible-galaxy collection install community.general.
To use it in a playbook, specify: community.general.apt_repo.
| Parameter | Choices/Defaults | Comments |
|---|---|---|
| remove_others boolean |
| Remove other then added repositories Used if state=present
|
| repo string / required | Name of the repository to add or remove. | |
| state string |
| Indicates the desired repository state. |
| update boolean |
| Update the package database after changing repositories. |
Note
- name: Remove all repositories
community.general.apt_repo:
repo: all
state: absent
- name: Add repository `Sisysphus` and remove other repositories
community.general.apt_repo:
repo: Sisysphus
state: present
remove_others: yes
- name: Add local repository `/space/ALT/Sisyphus` and update package cache
community.general.apt_repo:
repo: copy:///space/ALT/Sisyphus
state: present
update: yes
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/apt_repo_module.html