1
0
Fork 0

Imported from personal ansible repository

This commit is contained in:
Julien Dessaux 2023-01-22 00:16:43 +01:00
parent 17afba8c33
commit 23e2941b3a
Signed by: adyxax
GPG key ID: F92E51B86E07177E
8 changed files with 448 additions and 0 deletions

23
files/syncthing.fact Normal file
View file

@ -0,0 +1,23 @@
#!/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;