PlayBooks is the term used in Ansible to represent a configuration management scripts written in YAML. Tasks are the operations that needs to be done on the remote machines, hosts are the remote machines on which the tasks are to be executed. Tasks are always associated with hosts and this together is called a Play. PlayBook is a collection of such Plays. Continue reading
Modules are packages that can perform a set of operations on remote hosts based on the arguments given. Without knowing much about modules, we have already used a “ping” module to test our ansible lab configuration. Without any further do, let’s understand Ansible modules in a bit detail. Continue reading
Ansible config file has the default settings that most users are ok to run with. However the settings can be modified like the number of parallel tasks to run at a time, default location of inventory, jinja2 extensions, log_path, private key file and so on. Continue reading
We know a little about inventory file as of now, like, it has the list of hostnames that a controller node could communicate with. But, there is a lot a inventory file can do and we in this post will touch a bit on some of the features. Continue reading
Technically, we have already run our first ad-hoc command in ansible in our previous post. In this post we will actually understand the command we ran. Since this is the format we in fact use through out our entire Ansible journey, it is good to understand this clearly.
With some basic understanding about what Ansible can do, we can now proceed to setup our own lab environment to get a better insight on Ansible. I primarily used vagrant to setup my virtual machines needed for the lab. All you need would be a Laptop or PC with 8 to 16GB RAM capable enough of running 3 to 6 virtual machines. Coming to the software requirements, you would need Oracle Virtual Box to run the vagrant boxes; you can also use VMware Workstation but then to use Vagrant, you would need to purchase a license for the plugin. If you don’t want to use Vagrant at all, well you can always setup 3 or 4 CentOS/RHEL vm’s on the VMware Worstation and continue working on them.