Ansible repo for digital ocean projects
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mpdb.yaml 1.8 KiB

2 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. - hosts: all
  2. gather_facts: true
  3. vars:
  4. path: /var/lib/mpd
  5. playlist_directory: /playlist/
  6. db_file: tag_cache
  7. log_dir: /var/log/
  8. log_file: mpd.log
  9. pid_file: pid
  10. state_file: state
  11. sticker_file: sticker
  12. user: mpd
  13. group: nogroup
  14. bind_to_address: any
  15. bind_address: any
  16. mpdport: 6600
  17. log_level: default
  18. gapless_mp3_playback: yes
  19. save_absolute_paths_in_playlists: yes
  20. metadata_to_use: artist,album,title,track,name,genre,date,composer,performer,disc
  21. auto_update: no
  22. auto_update_depth: 3
  23. follow_outside_symlinks: no
  24. follow_inside_symlinks: no
  25. zeroconf_enabled: no
  26. zeroconf_name: mpd
  27. default_permissions: read,add,control,admin
  28. stream: music
  29. stream_port: 6700
  30. stream_bind_address: any
  31. mixer_type: disabled
  32. replaygain: album
  33. replaygain_preamp: 0
  34. volume_normalization: no
  35. audio_buffer_size: 2048
  36. buffer_before_play: "1%"
  37. tasks:
  38. - name: "mpdf backendhost"
  39. set_fact:
  40. backendhost: "{{ inventory_hostname |replace ('b', 'f') }}"
  41. - name: Install mpdb on hosts
  42. apt:
  43. name: mpd
  44. state: present
  45. - name: setup config on hosts
  46. template:
  47. src: mpdb.conf.j2
  48. dest: "/etc/mpdf.conf"
  49. mode: 0644
  50. owner: root
  51. group: root
  52. - name: mpdf music directory
  53. file:
  54. path: "/var/lib/mpd/music"
  55. state: directory
  56. owner: root
  57. group: root
  58. mode: '0755'
  59. - name: setup service on hosts
  60. template:
  61. src: mpdb.service.j2
  62. dest: "/usr/lib/systemd/system/mpd.service"
  63. mode: 0644
  64. owner: root
  65. group: root
  66. - name: mpd service start
  67. systemd:
  68. name: "mpd"
  69. state: started
  70. enabled: yes
  71. masked: no
  72. daemon_reload: yes