yavdr / yavdr-ansible

ansible playbooks for yaVDR
GNU General Public License v3.0
11 stars 10 forks source link

add template for vdr instance #23

Closed kfb77 closed 2 years ago

kfb77 commented 2 years ago

Please make vdr instance configurable from playbook. This is my proposal as PR.

seahawk1986 commented 2 years ago

The configuration for yavdr-frontend also needs to be changed, so it will be able to control the vdr with the configured instance id.

/etc/yavdr-frontend/config.yml

vdr:
    id: 0  # vdr instance id
kfb77 commented 2 years ago

I do not have this file, not even the directory /etc/yavdr-frontend. My system is a RasPi3+ installed from branch focal. Which role should creates this file ?

seahawk1986 commented 2 years ago

The configuration file is from the python3-yavdrfrontend package (which is not installed by the Raspberry Pi playbook since there is no working kodi package). I need to look into changing values in a yaml file while keeping comments - AFAIK https://pypi.org/project/ruamel.yaml/ can do that.

kfb77 commented 2 years ago

PR should normally be complete but I have no other vdr with frontend. For once, would you add the part yourself ? If not I have to wait until the kodi package for RasPi is ready and add it myself.

seahawk1986 commented 2 years ago

Yes, it is on my todo list - I just need to find some time to make the necessary changes ...

kfb77 commented 2 years ago

OK, I understand that with my simple approach I am far from a generally working solution. You can close my PR.

seahawk1986 commented 2 years ago

I found some time to make the neccessary changes - with the new commits it is possible to set a value for vdr.instance_id (see https://github.com/yavdr/yavdr-ansible/blob/focal/group_vars/all#L33) and this value is set for vdr, vdr-addon-avahi-linker, yavdr-frontend and dbus-send.

Please check if this works for you as intended.

kfb77 commented 2 years ago

Thank you very much, it works as intended