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 Preview Preview
  • 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 Preview
  • Sample YAML Based inventory Refer Here Preview Preview

Next Steps:

  • Adding variables to the inventory

Leave a Reply

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

About learningthoughtsadmin