DevOps Classroomnotes 30/May/2023

Ansible contd

Ansible Handlers

  • Handlers: Refer Here
  • Refer Here for the changes with handlers included
  • Info.php copying step changed i.e. copied the file to meet desired state so restart executed
    Preview
  • Info.pyhp copying step was ok i.e. desired state is met so task did nothing, so restart not executed
    Preview

Inventory

  • Inventory in Ansible represents the hosts which we need to connect to.
  • Ansible inventory is broadly classified into two types
    • static inventory: where we mention the list of nodes to connect to in some file
    • dynamic inventory: where we mention some script/plugin which will dynamically find out the nodes to connect to
  • As of now lets focus on static inventory
  • Refer Here for official docs on Ansible inventory
  • Static inventory can be mentioned in two formats
    • ini
    • yaml
  • Ini format: Refer Here
  • Refer Here for the changes to include groups and same inventory across redhat and ubuntu instances
  • list hosts
    Preview
    Preview
  • YAML format:
  • Refer Here for the inventory in yaml format
    Preview

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company

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