Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Where is documenation for defining servers for use by Rex?

by nysus (Parson)
on Apr 07, 2020 at 21:24 UTC ( #11115194=perlquestion: print w/replies, xml ) Need Help??

nysus has asked for the wisdom of the Perl Monks concerning the following question:

I'm having trouble locating documentation that explains how to set up servers for use in Rex scripts. Can someone please point me in the right direction? Thanks.

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks

  • Comment on Where is documenation for defining servers for use by Rex?

Replies are listed 'Best First'.
Re: Where is documenation for defining servers for use by Rex?
by bliako (Monsignor) on Apr 08, 2020 at 08:02 UTC

    from the documentation of Rex::Commands :

    key_auth If you want to use pubkey authentication, then you need to call key_au +th. user "bob"; private_key "/home/bob/.ssh/id_rsa"; # passphrase-less key public_key "/home/bob/.ssh/id_rsa.pub"; key_auth;

    perhaps you need this then?:

    group "servers", "server_big" => { user => 'my_user', private_key => ' +/home/user/key.pem', key_auth => 1 };

    or something to that effect.

    bw, bliako

      Thanks. Doesn't work, though. I think this is a bug.

      $PM = "Perl Monk's";
      $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
      $nysus = $PM . ' ' . $MCF;
      Click here if you love Perl Monks

        Heh

        SYNOPSIS

        desc "Task description"; task "taskname", sub { ... }; task "taskname", "server1", ..., "server20", sub { ... }; group "group" => "server1", "server2", ...; user "user"; password "password"; environment live => sub { user "root"; password "foobar"; pass_auth; group frontend => "www01", "www02"; };

        annotated SYNOPSIS

        desc "Task description"; task "taskname", sub { ... }; task "taskname", "server1", ..., "server20", sub { ... }; group "group" => "server1", "server2", ...; user("user"); password("password"); environment live => sub { user("root"); password("foobar"); pass_auth(); group frontend => "www01", "www02"; };
        Please take the time to actually read and understand the docs, pay close attention to their site, and where they hang out offering help
Re: Where is documenation for defining servers for use by Rex?
by stevieb (Canon) on Apr 07, 2020 at 21:49 UTC

    This is the second time today I've seen the term "Rex" used here. Is it even Perl related?

    Best I can find is Rexx scripting language.

        Unfortunately, the website is very thin on documentation for defining servers. I have already looked through it. Defining servers was only mentioned in passing here.

        $PM = "Perl Monk's";
        $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
        $nysus = $PM . ' ' . $MCF;
        Click here if you love Perl Monks

      If you mean it's the second time today, it's because the same person has asked two different questions, albeit not in a very efficient way, for example linking to the thing in question. Rex is the top result for a metacpan search, ditto duck duck go, when searching using perl context. I wouldn't have approved the previous question unmoderated had it been Off Topic for the site.

      The multiple search engines I tried using "rex perl" or "perl rex" found exactly what they should have. This is a PEBCAK issue.
Re: Where is documenation for defining servers for use by Rex?
by trwww (Priest) on Apr 08, 2020 at 00:41 UTC

      There is supposedly a way to set properties for individual servers. There is only a small sample of this here.

      The server options I'm trying to specify don't seem to work so I'm looking for thorough documentation on what those server options are. That's why I'm looking for documentation. Example:

      group "servers", "server_big" => { user => 'my_user', private_key => ' +/home/user/key.pem' }; task 'uptime', 'server_big', sub { say run 'uptime'; };

      The private_key setting is getting ignored and I can't log in.

      $PM = "Perl Monk's";
      $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
      $nysus = $PM . ' ' . $MCF;
      Click here if you love Perl Monks

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11115194]
Approved by davies
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2022-06-25 04:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (81 votes). Check out past polls.

    Notices?