DevOps Classroom Series – 08/May/2021

Ansible Contd..

  • In Ansible the unit of work is module.
  • Lets try to use Ansible to install apache server on Ubuntu
    • Identify and execute the manual steps in configuring the apache server
    sudo apt update
    sudo apt install apache2 -y
    
    • Lets Execute these steps to verify if they are working
    • Ansible Steps:
      • Try to identify and create/edit inventory
      • Refer Here to understand playbook syntax
      • Searching modules in Ansible
        • Simple Approach: Google <cmd> in Ansible
        • Any module in Ansible will have a state parameter
      • Refer Here for the playbook written in the class
      • Usage of Ansible Playbook
      • To make this execution successful we need to provide inventory, playbook and private key
      ansible-playbook -i hosts --private-key  /home/ubuntu/ansible.pem apache.yaml
      
  • Lets try to make our ansible lab setup more like an enterprise setup
  • Things to explore before doing this
    • visudo
    • ssh-keygen
    • ssh configuration in /etc/ssh/sshd_config
    • enable/disable password based authentication in linux

Leave a ReplyCancel reply

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

Please turn AdBlock off
Social Network Integration by Acurax Social Media Branding Company

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Exit mobile version
%%footer%%