This is just a quick summary of Ansible and Puppet.
– name: blahblah hosts: hostname vars: var1: value1 var2: value2 vars_files: – /path/to/var1.yaml – /path/to/var2.yaml vars_prompt: this key’s value is a 2 item array, each item is a single item hash – name: var_name – prompt: the prompt message itself # this will do a prompt for more info during […]
Here’s a simple playbook that sets up an Apache web server on a RHEL/CentOS 7 box: [root@controller playbooks]# pwd /root/playbooks [root@controller playbooks]# cat httpd.yaml — – name: This sets up an httpd webserver hosts: ansibleclient01.local tasks: – name: Install apache packages yum: name: httpd state: present – name: ensure httpd […]
Before the controller can manage the clients, it first need to provide ansible an inventory of the clients it is allowed to manage. This inventory needs to be in the form of a file called “hosts”. You can choose where you store the hosts file. But the default location ansible […]
There are a few of ways to install ansible. For the rest of these articles I’ll be running Ansible on Centos 7. Install Ansible using yum This is done like this: $ yum install epel-release $ yum install ansible Then check the version of ansible installed: $ ansible –version It […]
Playbooks are written in yaml format, and you can actually choose where to store your playbooks. In my case I’ll create a folder called playbooks for storing my playbooks, and I’ll create this in the root user’s home directory: [root@controller ~]# pwd /root [root@controller ~]# mkdir playbooks [root@controller ~]# cd […]
Control Machine: This is equivalent to Puppet’s PuppetMaster Managed Node: This is equivalent to Puppet’s Puppet agents Playbooks: This is ansible’s equivalent to a puppet’s manifest file,
What is Ansible Ansible can be thought of as a multi-purpose tool for: Cloud Infrastructure Automation – You can use it to build new virtual machines on popular cloud platforms, such as AWS and Azure. Another very popular tool that’s used for this kind of work is Terraform Configuration Management […]