In this blog post, we will review how an entire IT infrastructure – computing, storage and networking resources – using the automation tools Ansible and Terraform. Emphasis in this blog post will be placed on Ansible.
Ansible’s tag line is that it delivers: Radically simple IT Automation. It delivers on this claim through its playbook architecture covered with supporting files such as inventory files that contain target device IP addresses as well device credentials.
Ansible was acquired by Redhat in October, 2015. IBM purchased Redhat for $34 billion in July, 2019, an open source software company.
1). An Ansible playbook task section.
2). A specific Ansible task module called “ios_command” for running Cisco IOS CLI commands.
3). A specific Cisco IOS cli command to run.
Once an Ansible playbook like the sample above is constructed, this playbook can be run on multiple devices by simply adding more IP addresses and credentials in the Ansible inventory file.
Here is a sample Ansible inventory file:
bernie@blade8:~/ansible$ cat inventory
[all:vars]
username=admin
password=admin
[ios]
192.168.58.124
192.168.58.130
172.16.0.66
https://www.ibm.com/cloud/blog/end-to-end-application-provisioning-with-ansible-and-terraform
The Nuts and Bolts of Ansible: Python and Github
Python: Ansible is written in Python and Ansible is 100% open source. Therefore, you can explore the Python internals of Ansible and even make changes to the code for your personal needs.
Github: Ansible source code is accessible from the Ansible github repostiory at https://github.com/ansible/ansible. With some familiarity with github, you can perform a git clone operation and download the entire Ansible repository to your local machine. You can then keep your local git repository up to date with a git pull operation. NOTE: Microsoft purchased github for $7.5 billion in 2018.
Wow! Microsoft purchased github for $7.5 billion and IBM purchased Redhat for $34 billion. These are two massive acquisitions merging major Open Source software platforms with two tech giants that have a long history with the world’s largest corporations: Microsoft for almost 40 years and IBM for over 100 years.
Both Microsoft and IBM are making these billion dollar acquisitions to counter the developments of Google and much more significantly Amazon Web Services – the mighty AWS.
While this post began with an Ansible case study being deployed in the IBM cloud, this blog post will be ended with stressing that Ansible playbooks can be deployed in the AWS, Microsoft Azure and the Google Cloud Platform (GCP) as well.
Trade-Offs: Ansible is simple and this simplicity can effect its capabilities and flexibility.
Other tools are more powerful and flexible but more complex than Ansible.
You have automation choices. Here is a period table of automation that gives you an idea of the options you have for the automation tools you can use.
https://xebialabs.com/periodic-table-of-devops-tools/
One thought on “IT Automation: A Case with Redhat’s (now IBM’s) Ansible”
Very interested, would like to learn more!!