Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move custom configurations management to dedicated tasksets #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jpiron
Copy link

@jpiron jpiron commented Jan 19, 2021

This allows to use the tasks_from parameter of the import_role module.
For instance, one could run something like :

- name: "Create Traefik fail2ban configuration."
  import_role:
    name: ansible-fail2ban
    tasks_from: copy_custom_configurations
  become: True
  vars:
    fail2ban_filterd_path: "{{ traefik_fail2ban_filterd_path }}"
    fail2ban_actiond_path: "{{ traefik_fail2ban_actiond_path }}"
    fail2ban_jaild_path: "{{ traefik_fail2ban_jaild_path }}"

from a Traefik playbook to just add Traefik specific Fail2ban configuration
without reconfiguring everything.

@jpiron jpiron force-pushed the dedicated_task_lists branch from 401b44b to 33c869d Compare April 19, 2022 09:13
@jpiron jpiron force-pushed the dedicated_task_lists branch 2 times, most recently from 1236ca8 to 5af75d8 Compare August 28, 2024 13:33
@jonathanpiron
Copy link

Hi,

I just rebased this MR against the master branch.
Let me know if there is something I need to add.

@jpiron jpiron force-pushed the dedicated_task_lists branch from 5af75d8 to 8278ef1 Compare January 27, 2025 06:30
This allows to use the `tasks_from` parameter of the `import_role` module.
For instance, one could run something like :
```
- name: "Create Traefik fail2ban configuration."
  import_role:
    name: ansible-fail2ban
    tasks_from: copy_custom_configurations
  become: True
  vars:
    fail2ban_filterd_path: "{{ traefik_fail2ban_filterd_path }}"
    fail2ban_actiond_path: "{{ traefik_fail2ban_actiond_path }}"
    fail2ban_jaild_path: "{{ traefik_fail2ban_jaild_path }}"
```
from a Traefik playbook to just add Traefik specific Fail2ban configuration
without reconfiguring everything.
@jpiron jpiron force-pushed the dedicated_task_lists branch from 8278ef1 to 2c7b7f6 Compare January 27, 2025 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants