ansible/playbooks/reconfigure_heimdall.yaml
ladislav.dusa afc7817a81 conf added
2024-12-11 16:33:42 +01:00

11 lines
578 B
YAML
Executable File

- name: Getting entry
ansible.builtin.shell: sqlite3 /share/docker_data/heimdall/config/www/app.sqlite "SELECT url FROM items WHERE title = '{{ item }}'"
become: true
register: url
- debug:
msg: "{{ url.stdout |regex_replace('[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}','192.168.77.238')}}"
- name: Changing entry
ansible.builtin.shell: sqlite3 /share/docker_data/heimdall/config/www/app.sqlite "UPDATE items SET url = '{{ url.stdout |regex_replace('[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}','192.168.77.238') }}' WHERE title = '{{ item }}'"
become: true