Skip to content

Instantly share code, notes, and snippets.

@ferki
Created August 24, 2024 17:16
Show Gist options
  • Save ferki/2cad6a0c40681da6c2fb135d04e82a44 to your computer and use it in GitHub Desktop.
Save ferki/2cad6a0c40681da6c2fb135d04e82a44 to your computer and use it in GitHub Desktop.
Minimal Rex sudo example
use Rex -feature => [ '1.4', 'exec_autodie' ];
sudo_password 'sudo password';
task test => sub {
say run 'whoami'; # should be normal user
sudo TRUE;
say run 'whoami'; # should be root
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment