From b6ee8f76c2883a934bcf412722e0cf83830173c9 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 23 Jan 2023 17:33:53 +0100 Subject: Simplify fact gathering by using the cli instead of a webapi request --- files/syncthing.fact | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 files/syncthing.fact (limited to 'files/syncthing.fact') diff --git a/files/syncthing.fact b/files/syncthing.fact deleted file mode 100644 index 79ea632..0000000 --- a/files/syncthing.fact +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env perl -############################################################################### -# \_o< WARNING : This file is being managed by ansible! >o_/ # -# ~~~~ ~~~~ # -############################################################################### - -use strict; -use warnings; - -use JSON::PP; -use LWP::UserAgent; - -my $id = '0000000-0000000-0000000-0000000-0000000-0000000-0000000-0000000'; - -my $resp = LWP::UserAgent->new()->head('http://localhost:8384/'); -if ($resp->code == 200) { - $id = $resp->header('X-Syncthing-Id'); -} - -my %output = ( - 'id' => $id, -); -print encode_json \%output; -- cgit v1.2.3