Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Move application configuration to dedicated tasks file#21

Open
jpiron wants to merge 1 commit intoarillso:masterfrom
jpiron:application_configurations_dedicated_task_file
Open

Move application configuration to dedicated tasks file#21
jpiron wants to merge 1 commit intoarillso:masterfrom
jpiron:application_configurations_dedicated_task_file

Conversation

@jpiron
Copy link

@jpiron jpiron commented Feb 13, 2020

This allows to use the tasks_from option of the import_role module.
This permits to install and configure logrotate basics in one playbook, and
to configure application specifics in another application specific playbook
with something like:

- name: "Configure log rotation."
  import_role:
    name: ansible.logrotate
    tasks_from: configure_application
  become: True
  vars:
    logrotate_applications: "{{ redis_logrotate_configurations }}"
  when: redis_logrotate_configurations is defined

for instance.

@jpiron jpiron force-pushed the application_configurations_dedicated_task_file branch from 88c8b71 to b514c75 Compare February 13, 2020 16:52
@jpiron
Copy link
Author

jpiron commented Mar 10, 2020

Hi,
Any feedback on this ?

This allows to use the tasks_from option of the import_role module.
This permits to install and configure logrotate basics in one playbook, and
to configure application specifics in another application specific playbook
with something like:

```
- name: "Configure log rotation."
  import_role:
    name: ansible.logrotate
    tasks_from: configure_application
  become: True
  vars:
    logrotate_applications: "{{ redis_logrotate_configurations }}"
  when: redis_logrotate_configurations is defined
```
for instance.
@jpiron jpiron force-pushed the application_configurations_dedicated_task_file branch from b514c75 to 3b26321 Compare December 8, 2020 13:45
@jpiron
Copy link
Author

jpiron commented Dec 8, 2020

I just rebased the PR over the master branch.
Let me know if there is something more I can do.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant