How to avoid passwords in readonlyrest.yml?

How can I avoid writing passwords in readonlyrest.yml ?

https://docs.readonlyrest.com/elasticsearch#static-variables

Where should I run the export commands for the environment variables?

export is a bash shell command.

You need to set the environment variable. The method of doing so, depends on the OS and shell you use.

I use bash on suse sles 12

There are many resources on the Internet where you can read about how to do it. Eg. this one.