Working With Ansible Roles

0 55

Roles provide a framework for fully independent, or interdependent collections of variables, tasks, files, templates, and modules.

  1. From previous labs, our playbooks has grown and can be complex, time to use roles
  2. Create a new directory in /home/ec2-user:
    mkdir ansible-roles
  3. Lets initial roles structure in this directory:
    ansible-galaxy webservers init
  4. This is will initiate directory structure for roles:
  5. Now next step would be to copy content from setup-app.yml to individual main.yml, please refer this link
  6. For more roles please visit galaxy.ansible.com

Leave A Reply

Your email address will not be published.