diff --git a/ansible.cfg b/ansible.cfg index beb4c0a..87bdb47 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,6 +1,7 @@ [defaults] -retry_files_enabled = false +filter_plugins = /var/lib/dokku/plugins/available/ansible-deploy/plays/filter_plugins interpreter_python = /usr/bin/python3 +retry_files_enabled = false [ssh_connection] pipelining = true diff --git a/plays/filter_plugins/update_env.py b/plays/filter_plugins/update_env.py new file mode 100644 index 0000000..eba3474 --- /dev/null +++ b/plays/filter_plugins/update_env.py @@ -0,0 +1,12 @@ +"""Update config.env filter.""" + + +def filter_update_env(config, env): + for key, val in env: + config["env"][key] = val + return config + + +class FilterModule(object): + def filters(self): + return {"update_env": filter_update_env}