saltyorg / Saltbox

Ansible-based solution for rapidly deploying a Docker containerized cloud media server.
https://docs.saltbox.dev
GNU General Public License v3.0
571 stars 65 forks source link

Settings: rewrite #154

Open saltydk opened 12 months ago

saltydk commented 12 months ago

Clean up the settings role to use dynamic include_tasks instead of the current implementation that is fairly spammy and confusing to debug.

Current implementation:

- name: "Settings | Migrator"
  ansible.builtin.include_tasks: "subtasks/migrator.yml"
  vars:
    file: "{{ outer_item }}"

Initial suggestion would be:

- name: "Settings | Migrator"
  ansible.builtin.include_tasks: "subtasks/migrator/{{ outer_item }}.yml"

This would avoid looping over tasks that aren't going to do anything over and over.