adfinis.facts.apt_sources_facts (1.0.2) — module

Set configured apt sources as facts.

| "added in version" 1.0.2 of adfinis.facts"

Authors: Adfinis AG (@adfinis)

Install collection

Install with ansible-galaxy collection install adfinis.facts:==1.0.2


Add to requirements.yml

  collections:
    - name: adfinis.facts
      version: 1.0.2

Description

Set configured apt sources as facts.

Requires the C(python-apt) or C(python3-apt) package to be installed.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Populate apt sources facts
  adfinis.facts.apt_sources_facts:
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Print apt sources facts
  ansible.builtin.debug:
    var: ansible_facts.apt_sources

Outputs

ansible_facts:
  contains:
    apt_sources:
      contains:
        architectures:
          description: The entries of the "Architectures" option, if any.
          elements: str
          returned: always
          sample:
          - amd64
          type: list
        components:
          description: Enabled components of the repository.
          elements: str
          returned: always
          sample:
          - main
          - non-free-firmware
          type: list
        file:
          description: Name of the file this entry was found in.
          returned: always
          sample: /etc/apt/sources.list
          type: str
        suites:
          description: Name of the suites of the repository.
          elements: str
          returned: always
          sample:
          - bookworm
          - bookworm-updates
          type: list
        types:
          description: Types of the entry, contains "deb", "deb-src" or both.
          elements: str
          returned: always
          sample:
          - deb
          - deb-src
          type: list
        uri:
          description: URI for the repository.
          returned: always
          sample: http://deb.debian.org/debian
          type: str
      description: List of all active apt sources, both from deb822 and legacy format
        files.
      elements: dict
      returned: always
      sample:
      - architectures: []
        components:
        - main
        - non-free-firmware
        file: /etc/apt/sources.list.d/debian.sources
        suites:
        - boomworm
        - bookworm_updates
        types:
        - deb
        - deb-src
        uri: http://deb.debian.org/debian
      - architectures: []
        components:
        - main
        - non-free-firmware
        file: /etc/apt/sources.list.d/debian.sources
        suites:
        - bookworm-security
        types:
        - deb
        - deb-src
        uri: http://security.debian.org/debian-security
      type: list
  description: Facts to add to ansible_facts about the configured apt sources.
  returned: always
  type: dict