ansible.builtin.deb822_repository module – Add and remove deb822 formatted repositories
Note
This module is part of ansible-core
and included in all Ansible
installations. In most cases, you can use the short
module name
deb822_repository
even without specifying the collections keyword.
However, we recommend you use the Fully Qualified Collection Name (FQCN) ansible.builtin.deb822_repository
for easy linking to the
module documentation and to avoid conflicting with other collections that may have
the same module name.
New in ansible-core 2.15
Synopsis
Add and remove deb822 formatted repositories in Debian based distributions
Requirements
The below requirements are needed on the host that executes this module.
python3-debian / python-debian
Parameters
Parameter |
Comments |
---|---|
Allow downgrading a package that was previously authenticated but is no longer authenticated Choices:
|
|
Allow insecure repositories Choices:
|
|
Allow repositories signed with a key using a weak digest algorithm Choices:
|
|
Architectures to search within repository |
|
Controls if APT should try to acquire indexes via a URI constructed from a hashsum of the expected file instead of using the well-known stable filename of the index. Choices:
|
|
Controls if APT should consider the machine’s time correct and hence perform time related checks, such as verifying that a Release file is not from the future. Choices:
|
|
Controls if APT should try to detect replay attacks. Choices:
|
|
Components specify different sections of one distribution version present in a Suite. |
|
Controls how far from the future a repository may be. |
|
Tells APT whether the source is enabled or not. Choices:
|
|
Determines the path to the InRelease file, relative to the normal position of an InRelease file. |
|
Defines which languages information such as translated package descriptions should be downloaded. |
|
The octal mode for newly created files in sources.list.d. Default: |
|
Name of the repo. Specifically used for |
|
Controls if APT should try to use PDiffs to update old indexes instead of downloading the new indexes entirely Choices:
|
|
Either a URL to a GPG key, absolute path to a keyring file, one or more fingerprints of keys either in the |
|
A source string state. Choices:
|
|
Suite can specify an exact path in relation to the URI(s) provided, in which case the Components: must be omitted and suite must end with a slash ( |
|
Defines which download targets apt will try to acquire from this source. |
|
Decides if a source is considered trusted or if warnings should be raised before e.g. packages are installed from this source. Choices:
|
|
Which types of packages to look for from a given source; either binary Choices:
Default: |
|
The URIs must specify the base of the Debian distribution archive, from which APT finds the information it needs. |
Notes
Note
This module will not automatically update caches, call the apt module based on the changed state.
Examples
- name: Add debian repo
deb822_repository:
name: debian
types: deb
uris: http://deb.debian.org/debian
suites: stretch
components:
- main
- contrib
- non-free
- name: Add debian repo with key
deb822_repository:
name: debian
types: deb
uris: https://deb.debian.org
suites: stable
components:
- main
- contrib
- non-free
signed_by: |-
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEYCQjIxYJKwYBBAHaRw8BAQdAD/P5Nvvnvk66SxBBHDbhRml9ORg1WV5CvzKY
CuMfoIS0BmFiY2RlZoiQBBMWCgA4FiEErCIG1VhKWMWo2yfAREZd5NfO31cFAmAk
IyMCGyMFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQREZd5NfO31fbOwD6ArzS
dM0Dkd5h2Ujy1b6KcAaVW9FOa5UNfJ9FFBtjLQEBAJ7UyWD3dZzhvlaAwunsk7DG
3bHcln8DMpIJVXht78sL
=IE0r
-----END PGP PUBLIC KEY BLOCK-----
- name: Add repo using key from URL
deb822_repository:
name: example
types: deb
uris: https://download.example.com/linux/ubuntu
suites: '{{ ansible_distribution_release }}'
components: stable
architectures: amd64
signed_by: https://download.example.com/linux/ubuntu/gpg
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Path to the repository file Returned: always Sample: |
|
Path to the signed_by key file Returned: always Sample: |
|
A source string for the repository Returned: always Sample: |