community.general.kopia_repository_info module – Gather information about a Kopia repository

Note

This module is part of the community.general collection (version 13.1.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.kopia_repository_info.

New in community.general 13.1.0

Synopsis

  • Gather read-only information about the current Kopia repository connection and throttle settings.

  • Runs kopia repository status and kopia repository throttle get.

Parameters

Parameter

Comments

config

path

Path to the Kopia config file for this repository connection.

Defaults to the Kopia default config path when not set.

password

string

Repository password used to encrypt and decrypt repository contents.

Attributes

Attribute

Support

Description

check_mode

Support: full

This action does not modify state.

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: N/A

This action does not modify state.

Returns details on what has changed (or possibly needs changing in check_mode), when in diff mode.

Examples

- name: Gather Kopia repository info
  community.general.kopia_repository_info:
    config: /etc/kopia/root.config
  register: result

- name: Show repository status
  ansible.builtin.debug:
    msg: "{{ result.repository_status }}"

- name: Show throttle settings
  ansible.builtin.debug:
    msg: "{{ result.throttle }}"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

repository_status

string

Output of kopia repository status.

Returned: always

Sample: "Connected to repository: s3:/my-bucket/\nConfig file: /etc/kopia/root.config\n..."

throttle

string

Output of kopia repository throttle get showing current throttle limits.

Returned: always

Sample: "upload-bytes-per-second: 0\ndownload-bytes-per-second: 0"

Authors

  • Dexter Le (@munchtoast)