Add provider file for watching images

This commit is contained in:
phil 2023-03-01 13:12:39 +01:00
parent 90cd2786cf
commit 0bbee108d6
3 changed files with 14 additions and 2 deletions

View file

@ -5,3 +5,4 @@ diun_home: /var/lib/duin
diun_binary_path: /usr/local/bin diun_binary_path: /usr/local/bin
diun_configuration_path: /etc/diun diun_configuration_path: /etc/diun
diun_configuration_file: diun.yaml diun_configuration_file: diun.yaml
diun_provider_image_file: images.yaml

View file

@ -44,11 +44,14 @@
- "{{ diun_configuration_path }}" - "{{ diun_configuration_path }}"
- "{{ diun_home }}" - "{{ diun_home }}"
- name: "Copy configuration file" - name: "Copy configuration files"
ansible.builtin.template: ansible.builtin.template:
src: "{{ diun_configuration_file }}" src: "{{ item }}"
dest: "{{ diun_configuration_path }}" dest: "{{ diun_configuration_path }}"
mode: 0644 mode: 0644
loop:
- "{{ diun_configuration_file }}"
- "{{ diun_provider_image_file }}"
- name: "Copy service file" - name: "Copy service file"
ansible.builtin.template: ansible.builtin.template:

8
templates/images.yaml Normal file
View file

@ -0,0 +1,8 @@
{% if diun_provider_images is defined %}
{% for name in diun_provider_images %}
- name: {{ name.name }}
{% if name.config is defined %}
{{ name.config | indent(2) }}
{% endif %}
{% endfor %}
{% endif %}