Rex-Rancher
view release on metacpan or search on metacpan
.claude/skills/rex/SKILL.md view on Meta::CPAN
set connection => 'LibSSH';
# All Rex file operations now work without SFTP:
file '/etc/hostname', content => "myhost\n";
delete_lines_matching '/etc/fstab', matching => qr/\sswap\s/;
host_entry 'myhost.internal', ip => '127.0.1.1', aliases => ['myhost'];
```
Authentication:
```perl
Rex::Config->set_private_key('/root/.ssh/id_ed25519');
Rex::Config->set_public_key('/root/.ssh/id_ed25519.pub');
```
Host key checking is disabled by default (`strict_hostkeycheck => 0`).
## Workspace Distributions
### Rex::GPU (`rex-gpu`)
```perl
eg/hetzner-gpu.Rexfile view on Meta::CPAN
my $HOSTNAME = $ENV{RKE2_HOSTNAME} || 'rexdemo';
my $DOMAIN = $ENV{RKE2_DOMAIN} || 'internal';
my $TIMEZONE = $ENV{RKE2_TIMEZONE} || 'Europe/Berlin';
my $TOKEN = $ENV{RKE2_TOKEN} || 'rexdemo-cluster-secret';
my $KUBECONFIG = $ENV{KUBECONFIG} || "$ENV{HOME}/.kube/rexdemo.yaml";
# --- Connection ---
set connection => 'LibSSH';
set user => ($ENV{REX_USER} || 'root');
set private_key => ($ENV{REX_KEY} || "$ENV{HOME}/.ssh/id_ed25519");
set public_key => ($ENV{REX_KEY} ? "$ENV{REX_KEY}.pub" : "$ENV{HOME}/.ssh/id_ed25519.pub");
set auth => 'key';
# ============================================================
# Main deployment
# ============================================================
desc "Full deployment: prepare â GPU (reboot) â RKE2 â Cilium â device plugin";
task "deploy", sub {
my $host = connection->server;
( run in 0.933 second using v1.01-cache-2.11-cpan-39bf76dae61 )