DevOps Classroom Series – 12/May/2021

Revisiting the Playbook created

  • Refer Here for the playbook created
  • Added vars section in the playbook to define variables Refer Here for the change set
  • Create a change set for testing variables Refer Here
  • Ansible variables can be defined at multiple places and they have some priority which is referred as precedence
  • At this moment lets try to understand about ansible inventories
  • In Ansible there is a default inventory located at /etc/ansible/hosts and if we don’t pass the -i to ansible-playbook or ansible command the inventory file considered would be the default inventory

Creating Inventories

  • Inventories can be created in two formats in ansible
    • INI:
    • YAML
  • Sample INI based inventory Refer Here
  • Sample YAML Based inventory Refer Here

Next Steps:

  • Adding variables to the inventory

Leave a comment

Turn on JavaScript to leave a comment.

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
Exit mobile version
%%footer%%