Ansible roles
A cheatsheet by @rstacruz|Refreshed about 3 years ago.Refresh|View source on Github

Structure

Structure

roles/
  common/
    tasks/
    handlers/
    files/              # 'copy' will refer to this
    templates/          # 'template' will refer to this
    meta/               # Role dependencies here
    vars/
    defaults/
      main.yml

References

References

  • http://www.ansibleworks.com/docs/playbooks_roles.html