Update to 2022-02-18 16:00

This commit is contained in:
Daniel Berteaud
2022-02-18 16:00:06 +01:00
parent 67e32c9d59
commit 767adc1e83
19 changed files with 282 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
---
- name: List existing bookmarks
shell: ls -1 {{ pgweb_root_dir }}/bookmarks/ | perl -pe 's/\.toml$//'
register: pgweb_current_bookmarks
changed_when: False
tags: pgweb,pg
- name: Remove unmanaged bookmarks
file: path={{ pgweb_root_dir }}/bookmarks/{{ item }}.toml state=absent
loop: "{{ pgweb_current_bookmarks.stdout_lines }}"
when: not item in pgweb_bookmarks | map(attribute='name') | list
notify: restart pgweb
tags: pgweb,pg
- name: Configure bookmarks
template: src=bookmark.toml.j2 dest={{ pgweb_root_dir }}/bookmarks/{{ item.name }}.toml owner=root group={{ pgweb_user }} mode=640
loop: "{{ pgweb_bookmarks }}"
notify: restart pgweb
tags: pgweb,pg