diff --git a/roles/hobo-agent/tasks/main.yml b/roles/hobo-agent/tasks/main.yml index 6de9bd8..bb064b4 100644 --- a/roles/hobo-agent/tasks/main.yml +++ b/roles/hobo-agent/tasks/main.yml @@ -20,6 +20,13 @@ owner: "{{user}}" group: "{{user}}" +- name: "settings.d directory" + file: + path: "{{app_settings_dir}}/settings.d" + state: directory + owner: "{{user}}" + group: "{{user}}" + - name: hobo agent settings file template: src: hobo-agent-settings.j2 diff --git a/roles/hobo-agent/templates/hobo-agent-settings.j2 b/roles/hobo-agent/templates/hobo-agent-settings.j2 index d4cb0d6..9309f8a 100644 --- a/roles/hobo-agent/templates/hobo-agent-settings.j2 +++ b/roles/hobo-agent/templates/hobo-agent-settings.j2 @@ -14,3 +14,6 @@ WCS_MANAGE_TRY_COMMAND = "{{venv_py3_bin}}/wcsctl.py" {% endif %} {% endfor %} + +for filename in sorted(glob.glob(os.path.join('{{app_settings_dir}}', 'settings.d', '*.py'))): + exec(open(filename).read())