ansible.builtin.apt_repo (v2.9.27) — module

Manage APT repositories via apt-repo

| "added in version" 2.8 of ansible.builtin"

Authors: Mikhail Gordeev (@obirvalger)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

Manages APT repositories using apt-repo tool.

See U(https://www.altlinux.org/Apt-repo) for details about apt-repo

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove all repositories
  apt_repo:
    repo: all
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add repository `Sisysphus` and remove other repositories
  apt_repo:
    repo: Sisysphus
    state: present
    remove_others: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add local repository `/space/ALT/Sisyphus` and update package cache
  apt_repo:
    repo: copy:///space/ALT/Sisyphus
    state: present
    update: yes

Inputs

    
repo:
    description:
    - Name of the repository to add or remove.
    required: true

state:
    choices:
    - absent
    - present
    default: present
    description:
    - Indicates the desired repository state.

update:
    default: 'no'
    description:
    - Update the package database after changing repositories.
    type: bool

remove_others:
    default: 'no'
    description:
    - Remove other then added repositories
    - Used if I(state=present)
    type: bool