dokku / ansible-dokku

Ansible modules for installing and configuring Dokku
MIT License
174 stars 44 forks source link

Allow to set app config with base64 input #42

Open weyert opened 4 years ago

weyert commented 4 years ago

If you want to set some long config value like some public key with lots of line breaks and spaces it's easier to this by the base64 encoding only currently this is not possible. Consider dokku_config in two modes plain and base64.

ltalirz commented 4 years ago

Are you aware of the pipe character in yaml? See e.g. https://github.com/dokku/ansible-dokku/blob/3797fc3ff52f929297d0f14c8ddb893a23711e0f/molecule/default/verify.yml#L22-L24

It allows you to simply copy-paste multiline strings - all you need to do is indent the block. See also https://yaml-multiline.info/

Using base64-encoded input makes it obviously no longer human-readable, so I am wondering whether this would be a good idea. I vote for closing this but let's hear what @josegonzalez has to say as well.

josegonzalez commented 4 years ago

I'm fine with adding base64 as an option, though certainly not as default. We can probably do the encoding in the library and have it be just a bool option on dokku_config.