DevOps Classroomnotes 02/Jun/2023

Ansible contd..

Ansible variables

  • Refer Here for the official docs on variables
  • Refer Here for the changeset containing two variables one at inventory and other a playbook variable
  • Lets use a generic package manager package Refer Here
  • Refer Here for the changeset where we used package instead of apt/yum for install apache
  • Refer Here for loops in ansible
  • Refer Here for the changeset with loops and using loops from variables
  • variables at the inventory level need not be in inventory file
  • Refer Here for the changeset with host_vars and group_vars
  • Refer Here for the changeset to fail playbook explicitly on unsupported os
  • Refer Here for the debug messages

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner