- Auto-fix FQCN, YAML formatting, jinja spacing, and free-form module syntax via ansible-lint --fix - Fix comments misplaced inside module args by the auto-fixer (bluetooth-monitor, pi_standard_setup, pi_musicmouse) - Fix notify: references left stale (lowercase) after handler names were re-cased, which would have silently broken reboot/restart handlers (pi_disable_onboard_bluetooth, pi_hifiberry_amp, pi_squeezelite, pi_standard_setup) - Fix a task in pis/debmatic-install.yml missing its module name (apt_repository), which caused a real syntax-check failure - Add missing play names, fix comment spacing, literal-compare idiom, and no-changed-when annotations - Delete unused/broken roles/better-shell-env (unreferenced, invalid YAML) - Rename all hyphenated role directories to underscore form to satisfy ansible-lint's role-name rule, updating every playbook/meta reference Remaining lint findings (var-naming, package-latest, risky-file-permissions, no-handler) intentionally left for follow-up per user decision.
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
---
|
|
- 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
|