From the course: Ansible: From Basics to Guru by Pearson

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Exploring essential Ansible modules

Exploring essential Ansible modules - Ansible Tutorial

From the course: Ansible: From Basics to Guru by Pearson

Exploring essential Ansible modules

In this video, I want to tell you about some of the modules that are commonly used. And I would recommend just get used to them, memorize them, because you'll be using them all the time. So which are they? Well, there is command. Command is what you use to run arbitrary commands without using a shell. It allows you to run a command directly on your operating system. There is shell, which runs arbitrary command while using a shell. Now what is the difference? Well, the difference is if you need shell meta characters in your command, like a pipe or a redirect. That won't work with command. It will work with shell. There is role. Role is what you want to use in the exceptional case that you don't have Python on your system. That has become a pretty rare case because Python is now a part of the default minimal Linux installation. You will find copy useful. Copy is used to copy files or lines of text to files. So copy can be used to create a file with some initial text in it. There is…

Contents