ansible-edda/playbooks/roles/music/org/tasks/main.yml

65 lines
1.9 KiB
YAML
Raw Normal View History

2023-02-19 23:46:17 +01:00
---
- name: "install beets"
ansible.builtin.apt:
name:
- "beets"
- "ffmpeg"
- name: "install nextcloud-upload"
ansible.builtin.copy:
src: "./nextcloud-upload"
dest: "/usr/local/bin/nextcloud-upload"
mode: 0755
2023-02-26 00:21:00 +01:00
- name: "resolve nextcloud-upload via hosts file"
ansible.builtin.lineinfile:
path: "/etc/hosts"
line: "{{ music_org_nextcloud_ip_address }} {{ music_user_nextcloud_domain }}"
insertafter: "EOF"
2023-02-19 23:46:17 +01:00
- block:
- name: "create beets config directory"
ansible.builtin.file:
path: "{{ music_user_home_directory }}/.config/beets"
state: "directory"
owner: "{{ music_user_name }}"
group: "{{ music_user_name }}"
mode: 0755
- name: "create beets convert directory"
ansible.builtin.file:
path: "/var/tmp/{{ music_user_name }}/mp3"
state: "directory"
owner: "{{ music_user_name }}"
group: "{{ music_user_name }}"
mode: 0755
2023-03-01 20:14:12 +01:00
- name: "configure beets for collection"
2023-02-19 23:46:17 +01:00
ansible.builtin.template:
2023-03-01 20:14:12 +01:00
src: "./beets-collection.yml"
2023-02-19 23:46:17 +01:00
dest: "{{ music_user_home_directory }}/.config/beets/config.yaml"
mode: 0644
2023-03-01 20:14:12 +01:00
- name: "configure beets for archive"
ansible.builtin.template:
src: "./beets-archive.yml"
dest: "{{ music_user_home_directory }}/.config/beets/archive.yaml"
mode: 0644
2023-02-19 23:46:17 +01:00
- name: "create nextcloud-upload config directory"
ansible.builtin.file:
path: "{{ music_user_home_directory }}/.config/nextcloud-upload"
state: "directory"
owner: "{{ music_user_name }}"
group: "{{ music_user_name }}"
mode: 0755
- name: "configure nextcloud-upload"
ansible.builtin.template:
src: "./nextcloud-upload.yml"
dest: "{{ music_user_home_directory }}/.config/nextcloud-upload/config.yml"
mode: 0644
become_user: "{{ music_user_name }}"