robertdebock / ansible-role-fail2ban

Install and configure fail2ban on your system.
https://robertdebock.nl/
Apache License 2.0
59 stars 29 forks source link

Improve your examples for newbie users #13

Closed rit001 closed 1 year ago

rit001 commented 2 years ago

Proposed feature

Your examples could be enhanced to allow newer users to get started with your library.

Rationale

Anyone starting with Ansible is likely to be coming from shell scripts and so their first playbooks are likely to be a long list of tasks that operate steps already defined in their scripts. At some point, as they look for example code they will come across your library, but to use it they need to understand the basics for ansible-galaxy and find a way to merge tasks and roles into a single playbook.

Additional context

After some hunting around the way to combine tasks and roles turned out to be simple - but you have to find an example. It would be helpful if your notes included such an example. For fail2ban it is as simple as the following task

- name: install fail2ban via a role wrapped as a task
  import_role:
    name: robertdebock.fail2ban
robertdebock commented 1 year ago

Thanks for the feedback.

I remember the difficulty I had when beginning with Ansible as well.

The readme.md has an example playbook as the first section now.