Ansible repo for digital ocean projects
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

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