Ansible repo for digital ocean projects
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

mpdf.yaml 1.6 KiB

il y a 2 ans
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. mpd: mpd
  8. service_name: "{{ mpd + item }}"
  9. add_path: "{{ path ~ service_name }}"
  10. playlist_directory: "{{ add_path ~ 'playlist/' }}"
  11. db_file: tag_cache
  12. log_file: mpd.log
  13. pid_file: pid
  14. state_file: state
  15. sticker_file: sticker.sql
  16. user: mpd
  17. group: nogroup
  18. bind_to_address: any
  19. bind_address: any
  20. port_start: 6600
  21. port: "{{ port_start + item }}"
  22. log_level:
  23. gapless_mp3_playback: yes
  24. save_absolute_paths_in_playlists: yes
  25. metadata_to_use: artist,album,title,track,name,genre,date,composer,performer,disc
  26. auto_update: no
  27. auto_update_depth: 3
  28. follow_outside_symlinks: no
  29. follow_inside_symlinks: no
  30. zeroconf_enabled: no
  31. zeroconf_name: mpd
  32. default_permissions: red,add,control,admin
  33. stream: music
  34. stream_port: 6700
  35. stream_bind_address: any
  36. mixer_type: disabled
  37. replaygain: album
  38. replaygain_preamp: 0
  39. volume_normalization: no
  40. audio_buffer_size: 2048
  41. buffer_before_play: 1%
  42. tasks:
  43. - debug:
  44. msg: "{{ playlist_directory }}" #"{{ service_name }}"
  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) }}"