Rex-Rancher
view release on metacpan or search on metacpan
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;
eg/lan.Rexfile view on Meta::CPAN
config_dir => '/etc/rancher/k3s',
join_port => 6443
}
);
my $D = $HOST{$DIST};
# --- Connection ---
set connection => 'LibSSH';
set user => ( $ENV{LAN_USER} || 'root' );
set private_key => ( $ENV{LAN_KEY} || $ENV{HOME}.'/.ssh/id_ed25519' );
set public_key => ( $ENV{LAN_KEY} ? $ENV{LAN_KEY}.'.pub' : $ENV{HOME}.'/.ssh/id_ed25519.pub' );
set auth => 'key';
# ============================================================
# Option builders
# ============================================================
sub server_address { $ENV{LAN_SERVER} || connection->server }
sub node_opts {
misc/agent-context/.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`).
## Getty's Rex distributions (CPAN)
### Rex::GPU (`Rex-GPU`)
```perl
( run in 0.842 second using v1.01-cache-2.11-cpan-036bef1c656 )