From 274555a8bc19ca7408b6d69a190bf12554b91e68 Mon Sep 17 00:00:00 2001 From: Ashish D'Souza Date: Sun, 23 Jul 2023 17:29:31 -0400 Subject: [PATCH] Added source field to service database --- install.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.yaml b/install.yaml index b7296fc..2a383d3 100644 --- a/install.yaml +++ b/install.yaml @@ -60,13 +60,14 @@ login_user: '{{homelab_config.database.user}}' login_password: '{{homelab_config.database.password}}' db: '{{homelab_config.database.name}}' - query: 'INSERT INTO service (name, host, config) VALUES (%s, %s, %s) ON CONFLICT DO NOTHING;' + query: 'INSERT INTO service (name, host, source, config) VALUES (%s, %s, %s, %s) ON CONFLICT DO NOTHING;' positional_args: - '{{item.name}}' - '{{item.host}}' + - '{{item.source}}' - '{{item.config}}' with_items: - - {name: archer_a9_router_rebooter, host: '{{ansible_hostname}}', config: '{{archer_a9_router_rebooter_config|to_json}}'} + - {name: archer_a9_router_rebooter, host: '{{ansible_hostname}}', source: gitea/ashish/archer-a9-router-rebooter/master, config: '{{archer_a9_router_rebooter_config|to_json}}'} - name: Insert into Postgres table service_data community.postgresql.postgresql_query: login_host: '{{homelab_config.database.host}}'