Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
453 B

#!/usr/bin/perl
use warnings;
use strict;
use LWP::UserAgent;
use JSON;
my $ret = 'error';
my $url = $ARGV[0] . '?id=' . $ARGV[1];
my $ua = LWP::UserAgent->new(timeout => 10);
$ua->env_proxy;
my $response = $ua->get($url);
if ($response->is_success){
my $json = from_json($response->content);
if (defined $json and defined $json->{conference}){
$ret = $json->{conference};
$ret =~ s/@.*//;
}
}
print "SET VARIABLE JITSI_ROOM $ret\n";