devopsarr.sonarr.sonarr_series module – Manages Sonarr series.

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_series.

New in devopsarr.sonarr 1.0.0

Synopsis

  • Manages Sonarr series.

Parameters

Parameter

Comments

monitored

boolean

Monitored flag.

Choices:

  • false ← (default)

  • true

path

string / required

Series path.

quality_profile_id

integer

Quality profile ID.

root_folder_path

string

Root folder path.

season_folder

boolean

Season folder flag.

Choices:

  • false ← (default)

  • true

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: []

title

string / required

Series title.

title_slug

string / required

Series title in kebab case.

tvdb_id

integer / required

TVDB ID.

use_scene_numbering

boolean

Use scene numbering flag.

Choices:

  • false ← (default)

  • true

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 series
- name: Create a series
  devopsarr.sonarr.sonarr_series:
    title: "Breaking Bad"
    title_slug: "breaking-bad"
    tvdb_id: 81189
    monitored: false
    season_folder: true
    use_scene_numbering: false
    path: "/config/breaking-bad"
    root_folder_path: "/config"
    quality_profile_id: 1
    tags: [1,2]

# Delete a series
- name: Delete a series
  devopsarr.sonarr.sonarr_series:
    title: "Breaking Bad"
    title_slug: "breaking-bad"
    tvdb_id: 81189
    state: absent

Return Values

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

Key

Description

id

integer

series ID.

Returned: always

Sample: 1

monitored

boolean

Monitored flag.

Returned: always

Sample: false

path

string

Series path.

Returned: always

Sample: "/series/series_title"

quality_profile_id

integer

Quality profile ID.

Returned: always

Sample: 1

root_folder_path

string

Root folder path.

Returned: always

Sample: "/series"

season_folder

boolean

Season folder flag.

Returned: always

Sample: false

tags

list / elements=integer

Tag list.

Returned: always

Sample: [1, 2]

title

string

Series title.

Returned: always

Sample: "Series Title"

title_slug

string

Series title in kebab case.

Returned: always

Sample: "series-title"

tvdb_id

integer

TVDB ID.

Returned: always

Sample: 12345678

use_scene_numbering

boolean

Use scene numbering flag.

Returned: always

Sample: false

Authors

  • Fuochi (@Fuochi)