Ansible repo for digital ocean projects
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

63 wiersze
1.5 KiB

  1. - hosts: all
  2. gather_facts: false
  3. vars:
  4. #we need to loop over the /var/lib/mpd{{ count }} directory for the files/folders below. we need to loop over the stream ports as well
  5. count: 5
  6. path: /var/lib
  7. service_name: "{{ mpd + item }}"
  8. playlist_directory: >-
  9. {{ "%s/%s/playlist/"
  10. path,
  11. service_name
  12. }}
  13. db_file: tag_cache
  14. log_file: mpd.log
  15. pid_file: pid
  16. state_file: state
  17. sticker_file: sticker.sql
  18. user: mpd
  19. group: nogroup
  20. bind_to_address: any
  21. bind_address: any
  22. port_start: 6600
  23. port: "{{ port_start + item }}"
  24. log_level:
  25. gapless_mp3_playback: yes
  26. save_absolute_paths_in_playlists: yes
  27. metadata_to_use: artist,album,title,track,name,genre,date,composer,performer,disc
  28. auto_update: no
  29. auto_update_depth: 3
  30. follow_outside_symlinks: no
  31. follow_inside_symlinks: no
  32. zeroconf_enabled: no
  33. zeroconf_name: mpd
  34. default_permissions: red,add,control,admin
  35. stream: music
  36. stream_port: 6700
  37. stream_bind_address: any
  38. mixer_type: disabled
  39. replaygain: album
  40. replaygain_preamp: 0
  41. volume_normalization: no
  42. audio_buffer_size: 2048
  43. buffer_before_play: 1%
  44. tasks:
  45. - name: Install mpdf on hosts
  46. apt:
  47. name: mpd
  48. state: present
  49. - name: setup config on hosts
  50. template:
  51. src: mpdf.conf.j2
  52. dest: /etc/mpdf{{ item }}.conf
  53. mode: 0644
  54. owner: root
  55. group: root
  56. notify:
  57. - restart mpd
  58. loop: "{{ range(1,count|int + 1) }}"