I have about 100 remote servers. I want to manage all my servers using one terminal server to update , run commands with sudo privileges.
I need to have one main script that takes another test script as an argument. The main script run through a with loop using a hosts file with remote server names.
The test script has all the actual sudo commands to be run on the remote servers at once
./mainscript hostfile testscript for example, test script may have "sudo yum -y update" or a string of commands.
This seems easy if I login as root user. But I want to run this as user 'admin' who has sudo privileges on all the remote servers. All these scripts are located locally on terminal server.
Please suggest me any ideas you may have to achieve this?