cbeckley has asked for the wisdom of the Perl Monks concerning the following question:
I'm attempting to automate and centralize some system administration and deployment tasks, and I've hacked together an ssh wrapper module that works for my initial needs, essentially:
but I'm assuming this falls under the column heading:$cmd->{output} = qx($cmd_str); if ( defined $cmd->{output} ) { $cmd->{child_ret_code} = $?; chomp $cmd->{output}; } else { ($cmd->{sys_ret_code}, $cmd->{sys_ret_msg}) = ($!, '|'.$!.'|'); }
Problems that have been Solved Before
And sure enough I found Net::SSH::Perl. However ...
The most recent node I found in the monastery referencing Net::SSH::Perl is from 2008.
And while the current version of Net::SSH::Perl on CPAN is 2.01 from April of 2016, the most recent rpm I can find is 1.42, which sent me down a rabbit hole of dependencies.
My question then is in two parts, first, is there a better and/or more current module that provides the functionality of Net::SSH::Perl, and if not, is there a cleaner, easier way to get it installed on a Centos 7 instance, which requires an rpm?
Thanks,
cbeckley
|
|---|