mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-07 09:07:03 +02:00
Update to 2022-02-18 16:00
This commit is contained in:
20
roles/pgweb/tasks/conf.yml
Normal file
20
roles/pgweb/tasks/conf.yml
Normal 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
|
Reference in New Issue
Block a user