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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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) }}"