Skip to content

Instantly share code, notes, and snippets.

@ferki
Created October 9, 2020 22:05
Show Gist options
  • Save ferki/07a29ad7ebee33a3b9357efe0f1b3d74 to your computer and use it in GitHub Desktop.
Save ferki/07a29ad7ebee33a3b9357efe0f1b3d74 to your computer and use it in GitHub Desktop.
Rex and Secret::Store
use Rex;
use Secret::Store;
my $store = Secret::Store->new( backend => 'pass' );
sudo_password $store->get('sudo/username');
task 'whoami' => sub {
sudo TRUE;
say run 'whoami';
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment