Closed jessedobbelaere closed 1 year ago
Hi @jessedobbelaere , thanks for the report!
The code you link to should actually only skip, if the key already exists and the value for that key is already the one you are trying to set.
Maybe you can open a pull request adding a failing test to https://github.com/dokku/ansible-dokku/blob/master/molecule/default/verify.yml that demonstrates the problem you are seeing?
Right, it checks the value 🤦 I will do another test and see how to exactly reproduce it! Will close until I have a reproducible case
Description of problem
Ansible role that sets Dokku config using
dokku_config
will not update keys that already exist. Is there a workaround for this?How reproducible
Steps to Reproduce
In an Ansible role, I calculate a var
clickhouse_database_url
. I then set the env var with Dokku like this:However, if the value changed and we run Ansible again, Dokku ansible will not update the value if the key exists already in the config:
https://github.com/dokku/ansible-dokku/blob/978b45ac436ad2ce563d93955d5d2de30b8c423a/library/dokku_config.py#L86-L87
Actual Results
CLICKHOUSE_DATABASE_URL
is still the old valueExpected Results
CLICKHOUSE_DATABASE_URL
gets overwritten with the new value, or workaround suggested?Environment Information
dokku report APP_NAME
outputHow (deb/make) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:
Additional information
dokku ps:inspect APP_NAME
dokku nginx:show-config APP_NAME
dokku trace:on
(BEWARE:trace:on
will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXX):