mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-01-23 20:39:26 +00:00
12 lines
683 B
YAML
12 lines
683 B
YAML
|
- name: Getting entry
|
||
|
ansible.builtin.shell: sqlite3 /share/docker_data/heimdall/config/www/app.sqlite "SELECT url FROM items WHERE title = '{{ item }}'"
|
||
|
become: true
|
||
|
when: inventory_hostname in groups['raspberrypi5']
|
||
|
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
|
||
|
when: inventory_hostname in groups['raspberrypi5']
|