Ran ansible-lint

This commit is contained in:
Sonny Bakker 2025-12-18 15:00:37 +01:00
parent 92f761f4bb
commit 43d470edf3
33 changed files with 343 additions and 317 deletions

View file

@ -1,66 +1,67 @@
---
- name: Include mpd defaults
ansible.builtin.include_vars:
file: vars/mpd.yml
- name: Copy systemd configuration files
ansible.builtin.template:
src: '{{ item.src }}'
dest: '{{ item.dest }}'
mode: '0644'
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "0644"
loop:
- src: 'templates/mpd/service.j2'
dest: '{{ xdg_config_dir }}/systemd/user/mpd.service'
- src: "templates/mpd/service.j2"
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:
- stop mpd service
- restart mpd socket
- name: Create mpd files
ansible.builtin.file:
path: '{{ item.path }}'
state: '{{ item.state }}'
mode: '0755'
path: "{{ item.path }}"
state: "{{ item.state }}"
mode: "0755"
loop:
- path: '{{ mpd_configuration_dir }}'
state: 'directory'
- path: '{{ ncmpc_configuration_dir }}'
state: 'directory'
- path: '{{ ncmpcpp_configuration_dir }}'
state: 'directory'
- path: '{{ mpd_configuration_dir }}/playlists'
state: 'directory'
- path: '{{ mpd_configuration_dir }}/state'
state: 'touch'
- path: "{{ mpd_configuration_dir }}"
state: "directory"
- path: "{{ ncmpc_configuration_dir }}"
state: "directory"
- 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
ansible.builtin.file:
path: '{{ item.path }}'
state: '{{ item.state }}'
mode: '0755'
path: "{{ item.path }}"
state: "{{ item.state }}"
mode: "0755"
loop:
- path: '{{ mpd_configuration_dir }}/log'
state: 'absent'
- path: '{{ mpd_configuration_dir }}/database'
state: 'absent'
- path: '{{ mpd_configuration_dir }}/sticker.sql'
state: 'absent'
- path: '{{ ncmpc_configuration_dir }}'
state: 'absent'
- path: "{{ mpd_configuration_dir }}/log"
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
ansible.builtin.template:
src: '{{ item.src }}'
dest: '{{ item.dest }}'
mode: '0755'
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "0755"
loop:
- src: 'templates/mpd/mpd.conf.j2'
dest: '{{ mpd_configuration_dir }}/mpd.conf'
- src: 'templates/mpd/ncmpcpp/config.j2'
dest: '{{ ncmpcpp_configuration_dir }}/config'
- src: 'templates/mpd/ncmpcpp/bindings.j2'
dest: '{{ ncmpcpp_configuration_dir }}/bindings'
- src: "templates/mpd/mpd.conf.j2"
dest: "{{ mpd_configuration_dir }}/mpd.conf"
- src: "templates/mpd/ncmpcpp/config.j2"
dest: "{{ ncmpcpp_configuration_dir }}/config"
- src: "templates/mpd/ncmpcpp/bindings.j2"
dest: "{{ ncmpcpp_configuration_dir }}/bindings"
notify:
- stop mpd service