From 0759e5c55af839c755f8610a0f00a0cddb9d92de Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Thu, 29 Nov 2018 18:02:42 +0100 Subject: [PATCH] Feat(Choux): Move mpd to per-user configuration --- files/mpd.conf | 12 ++++++------ tasks/arch_CLI_music.yml | 5 +---- tasks/dotfiles.yml | 6 ++++++ 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/files/mpd.conf b/files/mpd.conf index b79cac3..3bc72d3 100644 --- a/files/mpd.conf +++ b/files/mpd.conf @@ -17,7 +17,7 @@ music_directory "{{ music_dir }}" # playlist files not created by the server but only if they are in the MPD # format. This setting defaults to playlist saving being disabled. # -#playlist_directory "~/.mpd/playlists" +playlist_directory "~/.mpd/playlists" # # This setting sets the location of the MPD database. This file is used to # load the database at server start up and store the database while the @@ -25,7 +25,7 @@ music_directory "{{ music_dir }}" # MPD to accept files over ipc socket (using file:// protocol) or streaming # files over an accepted protocol. # -#db_file "~/.mpd/database" +db_file "~/.mpd/database" # # These settings are the locations for the daemon log files for the daemon. # These logs are great for troubleshooting, depending on your log_level @@ -34,25 +34,25 @@ music_directory "{{ music_dir }}" # The special value "syslog" makes MPD use the local syslog daemon. This # setting defaults to logging to syslog. # -#log_file "~/.mpd/log" +log_file "syslog" # # This setting sets the location of the file which stores the process ID # for use of mpd --kill and some init scripts. This setting is disabled by # default and the pid file will not be stored. # -#pid_file "~/.mpd/pid" +pid_file "~/.mpd/pid" # # This setting sets the location of the file which contains information about # most variables to get MPD back into the same general shape it was in before # it was brought down. This setting is disabled by default and the server # state will be reset on server start up. # -#state_file "~/.mpd/state" +state_file "~/.mpd/state" # # The location of the sticker database. This is a database which # manages dynamic information attached to songs. # -#sticker_file "~/.mpd/sticker.sql" +sticker_file "~/.mpd/sticker.sql" # ############################################################################### diff --git a/tasks/arch_CLI_music.yml b/tasks/arch_CLI_music.yml index 7b18bf8..ee5dd29 100644 --- a/tasks/arch_CLI_music.yml +++ b/tasks/arch_CLI_music.yml @@ -13,8 +13,5 @@ name: mpd enabled: yes state: started + scope: user -- name: Copy mpd.conf - template: - src: files/mpd.conf - dest: /etc/mpd.conf diff --git a/tasks/dotfiles.yml b/tasks/dotfiles.yml index a21e556..c95d021 100644 --- a/tasks/dotfiles.yml +++ b/tasks/dotfiles.yml @@ -113,6 +113,12 @@ with_items: "{{ me }}" when: not minimal and not server +- name: Copy mpd.conf + template: + src: files/mpd.conf + dest: /home/{{ item.username }}/.config/mpd/mpd.conf + dest: /etc/mpd.conf + - name: Creates .ssh file: path: /home/{{ item.username }}/.ssh/