DevOps Classroomnotes 03/Apr/2022

Ansible Roles

  • Ansible Roles lets us automatially load vars, files, tasks, handlers and other Ansible artifacts based on a known folder/file structure
  • Role directory structure
    Preview
  • To create a role directory ansible-galaxy role init <role-name>
  • Refer Here for the basic role structure
  • To understand creating roles, lets create a role for install tomcat 9
  • Refer Here for the changes done in the classroom to convert the playbook for install tomcat9 into a reusable playbook.

Ansible Collections

  • Collections are distribution format for ansible content that include playbooks, roles, modules and plugins.
  • Refer Here for basic collection structure
  • Collections can be installed from git locations
ansible-galaxy collection install git+https://github.com/ansible-collections/community.postgresql

Topics left

  • Ansible forks
  • Ansible Vault
  • Ansible Tower

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner