Giter Site home page Giter Site logo

ansible-role-kodi's Introduction

kodi

This role will install Kodi media player and configure it. This role only work on Ubuntu for the moment.

The role will do the following tasks:

  • Cleanup old installation (if needed)
  • Install Software Properties Common
  • Add Kodi PPA
  • Install Kodi
  • Configure the sources used by Kodi
  • Configure Kodi
  • Configure the database informations if needed.

Requirements

Ansible 2.4 required

If you want to store Kodi library in a MySQL/Mariadb database, you must install and configure it following the Kodi Wiki page: http://kodi.wiki/view/MySQL/Setting_up_MySQL

Role Variables

System settings

The role will drop all the configurations in the directory /home/{{ kodi_sysuser }}/.kodi:

kodi_sysuser: htpc
kodi_sysgroup: htpc

Package types

The role can use different PPA for the kodi installation (stable, unstable, nightly)

kodi_ppa_use: stable

If needed, you can cleanup an old installation of kodi

kodi_cleanup_old_install: false

GUI Settings

Theses settings are configured in the file guisettings.xml.

If you want to enable and configure the kodi webserver :

kodi_webserver_enable: True

# Kodi webserver configuration
kodi_webserver_username: kodi
kodi_webserver_password: kodi
kodi_webserver_port: 8080

If you want to activate upnp and zereconf :

kodi_zeroconf_enable: true
kodi_upnpserver_enable: true

If you want to activate scan of the video or music library on startup :

kodi_videolibrary_updateonstartup: true
kodi_musiclibrary_updateonstartup: true

If you want to specify a audio device as passthroughdevice, you must determine which interface you want to use :

$ aplay -L
iec958:CARD=MID,DEV=0
    HDA Intel MID, ALC887 Digital
    IEC958 (S/PDIF) Digital Audio Output

and add the following variable :

kodi_audiooutput_passthroughdevice: ALSA:iec958:CARD=MID,DEV=0

If you want to install addons from unknown sources in Kodi :

kodi_addons_unknownsource_enable: true

Samba configuration :

kodi_smb_winserver: ""
kodi_smb_workgroup: "WORKGROUP"

MySQL settings

By default, Kodi stores the library informations in a SQL lite database. But if you want to share this database between multiple Kodi installation, you must use a MySQL/Mariadb database.

kodi_usemysql: false

kodi_mysql:
  host: localhost
  port: 3306
  user: kodi
  pass: changeme

Sources configuration

You can configure kodi sources in advance but you still must use Kodi interface to finish the configuration.

Available Settings:

kodi_sources_video: []
kodi_sources_music: []
kodi_sources_programs: []
kodi_sources_files: []
kodi_sources_pictures: []

Example :

kodi_sources_video:
  - name: Movies
    path: /media/movies
    allowsharing: true
  - name: Tv Shows
    path: smb://192.168.1.1/tvshow
    allowsharing: false

Dependencies

None.

Example Playbook

Here an example of a Playbook:

- hosts: kodi
  become: true

  vars:
    kodi_sources_video:
      - name: Movies
        path: /media/movies
        allowsharing: true
      - name: Tv Shows
        path: smb://192.168.1.1/tvshow
        allowsharing: false

  roles:
     - role: Synehan.kodi

License

BSD

ansible-role-kodi's People

Contributors

synetest avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.