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.

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