DevOps Classroomnotes 31/Mar/2022

Reusing Playbooks

  • Creating Reusable playbooks is inevitable. In ansible we have two options for reusing playbooks
    • Including and importing
    • Roles

Including and Importing

  • These allow users to break up larger playbooks into smaller files, which can be used across multiple parent playbooks or even multiple times within the same playbooks
  • Dynamic vs static:
    • Ansible has two modes of operation for reusable content dynamic and static
    • If you use include* it will be dynamic
    • If you use import* it will be static
  • We can import/include playbooks, task files & roles
  • Refer Here for the correct implementation
  • Refer Here for tasks reusability

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner