0

I will login to one Linux instance using ssh - putty and my goal is to install a software (for ex: I need to download oracle and install it) on 5 Linux machines with one shell script when I run that script on one machine software should be installed on all machines

1 Answers1

3

Shells script are cool, but consider using a configuration management system that is designed to do this sort of thing. My favorite is , but , and are also popular. All of these will provide an easier to understand syntax than raw shell scripting as well as error handling and portability.

chicks
  • 3,793
  • 10
  • 27
  • 36
  • HI chicks thanks for your answer,Ansible is not for windows now I need to create another Linux machine as control server --- actually I am new to linux world and shell scripting - by what you said it is hard to do my task using shell scripting and I should use an configuration management tool for this . can you suggest me some open source tools to do my task from my local windows machine to my multiple linux machine to download and install a software – Manoj Kalluri Mar 14 '16 at 22:02
  • I don't use Windows anymore, so I'm not sure how to answer your precise question. I would install VirtualBox in Windows, and run CentOS or Mint inside of it. cygwin is also good for getting your feet wet with UNIXy commands in Windows and http://www.jeffgeerling.com/blog/running-ansible-within-windows shows how to use it for ansible. – chicks Mar 14 '16 at 22:17
  • Hi thanks for your response - may I know why you prefer ansible than puppet ? it it because of python in ansible when compared to ruby of puppet – Manoj Kalluri Mar 16 '16 at 03:41
  • Puppet's certificates for clients are a major pain. Puppet scales better if you go masterless, but that's not how most people start using it. Ruby is a fine language, but python has a better community. Ansible is the easiest of any of the configuration management systems to get started with. It is easy to get it working in a pull or push fashion. I haven't had to write any python to make ansible work for me. – chicks Mar 16 '16 at 06:21
  • Thanks for sharing information, I have a question for you,ansible also uses ssh to login into multiple nodes to do the tasks. – Manoj Kalluri Mar 17 '16 at 14:29
  • Ansible can be run from `cron` (pull) or `ssh` (push). The `ssh` mode works well with `sudo`. – chicks Mar 17 '16 at 14:30
  • my question was incomplete chicks ,thew actual question is Ansible also uses ssh and ssh password/private key to login into multiple nodes to do the tasks.so why we should use ansible instead of shell scripting - the only benefit is avoiding the complex shell scripting ? – Manoj Kalluri Mar 17 '16 at 14:38
  • ansible will run against multiple nodes in parallel and it does fact gathering and error checking for you without extra work. It will also do multiple things over the same ssh connection even if there's a conditional decision that gets made by the client. All of that is possible in shell, but it would be a lot of work. – chicks Mar 17 '16 at 14:54