--- - name: Packages ansible.builtin.apt: name: - python3 - python3-pip - python3-vlc # also in venv - but this installs vlc + deps - samba - name: Checkout Musicmouse repo ansible.builtin.git: repo: "ssh://git@git.bauer.tech:2222/martin/musicmouse.git" dest: "/opt/musicmouse" version: "release/1.1" accept_hostkey: true - name: Create and update virtual env ansible.builtin.pip: requirements: /opt/musicmouse/espmusicmouse/host_driver/requirements.txt virtualenv: /opt/musicmouse_venv virtualenv_command: "/usr/bin/python3 -m venv" - name: Create media directory ansible.builtin.file: path: /media/musicmouse state: directory - name: Install config file ansible.builtin.copy: src: config.yml dest: /media/musicmouse/config.yml - name: Install systemd service file ansible.builtin.copy: src: musicmouse.service dest: /etc/systemd/system/ - name: Add script to autostart and start now ansible.builtin.systemd: name: musicmouse state: restarted enabled: "yes" daemon_reload: "yes" - name: Samba setup ansible.builtin.copy: src: smb.conf dest: /etc/samba/ - name: Restart samba ansible.builtin.systemd: name: smbd state: restarted enabled: "yes" # manual steps: # - set samba passwords with smbpasswd # - copy music into /media/musicmouse (or via samba share) # - upload host driver? # - manual patching of hassclient necessary :( loop has to be passed in, to not use running_event_loop