devopsarr.sonarr.sonarr_metadata module – Manages Sonarr metadata.

Note

This module is part of the devopsarr.sonarr collection (version 1.3.1).

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 devopsarr.sonarr.

To use it in a playbook, specify: devopsarr.sonarr.sonarr_metadata.

New in devopsarr.sonarr 1.0.0

Synopsis

  • Manages Sonarr metadata.

Parameters

Parameter

Comments

config_contract

string

Config contract.

enable

boolean

enable flag.

Choices:

  • false ← (default)

  • true

fields

list / elements=dictionary

Configuration field list.

name

string

Field name.

value

any

Field value.

implementation

string

Implementation.

name

string / required

Name.

sonarr_api_key

string / required

API key for Sonarr authentication.

sonarr_url

string / required

Full Sonarr URL with protocol and port (e.g. `https://test.sonarr.tv:8989`)

state

string

Create or delete resource.

Choices:

  • "present" ← (default)

  • "absent"

tags

list / elements=integer

Tag list.

Default: []

Notes

Note

  • for authentication, you can set service_account_file using the c(SONARR_URL) env variable.

  • for authentication, you can set service_account_contents using the c(SONARR_API_KEY) env variable.

Examples

---
# Create a metadata
- name: Create a metadata
  devopsarr.sonarr.sonarr_metadata:
    name: "Example"
    enable: true
    config_contract: "WdtvMetadataSettings"
    implementation: "WdtvMetadata"
    fields:
    - name: "seasonImages"
      value: true
    tags: [1,2]

# Delete a metadata
- name: Delete a metadata
  devopsarr.sonarr.sonarr_metadata:
    name: Example
    state: absent

Return Values

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

Key

Description

config_contract

string

Config contract.

Returned: always

Sample: "WebhookSettings"

enable

boolean

On grab flag.

Returned: always

Sample: true

fields

list / elements=string

field list.

Returned: always

id

integer

metadata ID.

Returned: always

Sample: 1

implementation

string

Implementation.

Returned: always

Sample: "Webhook"

name

string

Name.

Returned: always

Sample: "Example"

tags

list / elements=integer

Tag list.

Returned: always

Sample: [1, 2]

Authors

  • Fuochi (@Fuochi)