Remove ncmpc configuration
This commit is contained in:
parent
079b45be28
commit
2d2fb508f0
1 changed files with 42 additions and 31 deletions
|
|
@ -1,52 +1,63 @@
|
||||||
- name: copy systemd configuration files
|
- name: Copy systemd configuration files
|
||||||
template:
|
ansible.builtin.template:
|
||||||
src: '{{ item.src }}'
|
src: '{{ item.src }}'
|
||||||
dest: '{{ item.dest }}'
|
dest: '{{ item.dest }}'
|
||||||
|
mode: '0644'
|
||||||
loop:
|
loop:
|
||||||
- {
|
- src: 'templates/mpd/service.j2'
|
||||||
src: 'templates/mpd/service.j2',
|
dest: '{{ xdg_config_dir }}/systemd/user/mpd.service'
|
||||||
dest: '{{ xdg_config_dir }}/systemd/user/mpd.service',
|
|
||||||
}
|
- src: 'templates/mpd/socket.j2'
|
||||||
- {
|
dest: '{{ xdg_config_dir }}/systemd/user/mpd.socket'
|
||||||
src: 'templates/mpd/socket.j2',
|
|
||||||
dest: '{{ xdg_config_dir }}/systemd/user/mpd.socket',
|
|
||||||
}
|
|
||||||
notify:
|
notify:
|
||||||
- stop mpd service
|
- stop mpd service
|
||||||
- restart mpd socket
|
- restart mpd socket
|
||||||
|
|
||||||
- name: create mpd files
|
- name: Create mpd files
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: '{{ item.path }}'
|
path: '{{ item.path }}'
|
||||||
state: '{{ item.state }}'
|
state: '{{ item.state }}'
|
||||||
|
mode: '0644'
|
||||||
loop:
|
loop:
|
||||||
- { path: '{{ mpd_configuration_dir }}', state: 'directory' }
|
- path: '{{ mpd_configuration_dir }}'
|
||||||
- { path: '{{ ncmpc_configuration_dir }}', state: 'directory' }
|
state: 'directory'
|
||||||
- { path: '{{ ncmpcpp_configuration_dir }}', state: 'directory' }
|
- path: '{{ ncmpc_configuration_dir }}'
|
||||||
- { path: '{{ mpd_configuration_dir }}/playlists', state: 'directory' }
|
state: 'directory'
|
||||||
- { path: '{{ mpd_configuration_dir }}/state', state: 'touch' }
|
- path: '{{ ncmpcpp_configuration_dir }}'
|
||||||
|
state: 'directory'
|
||||||
|
- path: '{{ mpd_configuration_dir }}/playlists'
|
||||||
|
state: 'directory'
|
||||||
|
- path: '{{ mpd_configuration_dir }}/state'
|
||||||
|
state: 'touch'
|
||||||
|
|
||||||
- name: remove previous mpd files
|
- name: Remove previous mpd files
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: '{{ item.path }}'
|
path: '{{ item.path }}'
|
||||||
state: '{{ item.state }}'
|
state: '{{ item.state }}'
|
||||||
|
mode: '0644'
|
||||||
|
recurse: '{{ item.path is directory }}'
|
||||||
loop:
|
loop:
|
||||||
- { path: '{{ mpd_configuration_dir }}/log', state: 'absent' }
|
- path: '{{ mpd_configuration_dir }}/log'
|
||||||
- { path: '{{ mpd_configuration_dir }}/database', state: 'absent' }
|
state: 'absent'
|
||||||
- { path: '{{ mpd_configuration_dir }}/sticker.sql', state: 'absent' }
|
- path: '{{ mpd_configuration_dir }}/database'
|
||||||
|
state: 'absent'
|
||||||
|
- path: '{{ mpd_configuration_dir }}/sticker.sql'
|
||||||
|
state: 'absent'
|
||||||
|
- path: '{{ ncmpc_configuration_dir }}'
|
||||||
|
state: 'absent'
|
||||||
|
|
||||||
- name: copy configuration files
|
- name: Copy configuration files
|
||||||
template:
|
ansible.builtin.template:
|
||||||
src: '{{ item.src }}'
|
src: '{{ item.src }}'
|
||||||
dest: '{{ item.dest }}'
|
dest: '{{ item.dest }}'
|
||||||
|
mode: '0644'
|
||||||
loop:
|
loop:
|
||||||
- { src: 'templates/mpd/mpd.conf.j2', dest: '{{ mpd_configuration_dir }}/mpd.conf' }
|
- src: 'templates/mpd/mpd.conf.j2'
|
||||||
- { src: 'templates/mpd/ncmpc.j2', dest: '{{ ncmpc_configuration_dir }}/config' }
|
dest: '{{ mpd_configuration_dir }}/mpd.conf'
|
||||||
- { src: 'templates/mpd/ncmpcpp/config.j2', dest: '{{ ncmpcpp_configuration_dir }}/config' }
|
- src: 'templates/mpd/ncmpcpp/config.j2'
|
||||||
- {
|
dest: '{{ ncmpcpp_configuration_dir }}/config'
|
||||||
src: 'templates/mpd/ncmpcpp/bindings.j2',
|
- src: 'templates/mpd/ncmpcpp/bindings.j2'
|
||||||
dest: '{{ ncmpcpp_configuration_dir }}/bindings'
|
dest: '{{ ncmpcpp_configuration_dir }}/bindings'
|
||||||
}
|
|
||||||
notify:
|
notify:
|
||||||
- stop mpd service
|
- stop mpd service
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue