The role and playbook are intended for:
- Installation MPD on Raspberry Pi 2.
- Setup HiFiberry DAC+ on brand new Raspbian installation.
- Tuning MPD for bit perfect output.
- Setup MPD to consume audio data from SMB share.
- Original Raspbian installation is "minimized", i.e. redundant packages are deleted (e.g. xserver-xorg, etc.).
- Ansible itself.
- Well, Ansible works perfectly on the Linux, so Linux control host is required as well ๐
- Running Raspberry Pi 2 machine with brand new Raspbian installed.
- Ansible inventory file with your Raspberry Pi 2 machine.
- SMB server with shared audio files for all users (i.e. without password).
These variables are all situated in the vars/main.yml and have to be adjusted by you.
Name | Type | Description |
---|---|---|
mpdrpi_media_share_name | string | The full path top SMB share (example: //nas/media) |
mpdrpi_music_directory | string | It represents the audio files directory relative to the mounted SMB share (example: audio/). |
The inventory file file has to contain mpd_hosts group, which is used in the role. You have to add your Raspberry Pi host name into this group. Example of inventory file:
[mpd_hosts]
my_rpi_for_mpd
RPI Mini role is used to reduce bloating of intact Raspbian installation.
- hosts:
- mpd_hosts
roles:
- rpi_mini
- mpd_rpi
-
It's a good practice to reset default SSH host keys. It's useful to apply once only. Note the "rpimini_ssh_reset=true" usage.
ansible-playbook -i hosts mpd_rpi.yml -u root --tags=ssh_reset --extra-vars "rpimini_ssh_reset=true"
-
To make all role tasks except SSH host keys resetting run following command.
ansible-playbook -i hosts mpd_rpi.yml -u root
-
If the MPD configuration (i.e. mpd.conf.j2) was changed, it can be deployed by following command. Note the "--tags=mpd" usage. Other tasks are not executed.
ansible-playbook -i hosts mpd_rpi.yml -u root --tags=mpd
After first complete (i.e. without any applied tags) role execution the Raspberry Pi host should be restarted. It's necessary to load all modules required by HiFiberry DAC+.
GPLv3