DevOps Classroom Series – 06/May/2021

Ansible Contd..

  • Ansible Control Node requirements:
    • OS:
      • Linux flavours => RedHat, Ubuntu, CentOS, any of BSD’s
      • Mac
    • Software:
      • Python 2
      • Python 3
  • Lets create a ubuntu 18 VM as node
  • Ansible Node requirements
    • SSH should be running Preview
    • Python should be installed
    • SFTP/SCP should be configured
  • Now lets try to verify the connectivity using ansible b/w control node and node
  • First lets create a simple inventory
172.31.7.136
# echo "172.31.7.136" > inventory

Preview

  • Now ensure you have private key (pem) file in the Ansible control node and permissions are set Preview Preview
  • Lets look at a simple ansible ping command which verifies if your control node can access nodes or not
ansible -i <inventory> -m ping all
  • We also need to specify the username and pem file (private key file) Preview Preview
  • So now lets add a new centos 7 VM Preview Preview

How to make ansible work towards our deployments

  • Pictorial Representation Preview
  • In Ansible the atomic unit of work is module. Ansible has lot of inbuilt modules to help us automate our infra needs
  • Refer Here for the list of all the modules supported by ansible
  • Our approach to use Ansible
    • Make a list of all the steps needed to deploy your application
    • for every step try to find the ansible module which can help in expressing a desired state.

Exercise

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Floating Social Media Icons by Acurax Wordpress Designers

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube