2

I have a supervisord configuration file where I need to set multiple environment variables.

E.g.

environment=A="1",B="2",C="3", etc.

Is there a way of writing this in the file so that it spans multiple lines.

Something like...

environment=
A="1",
B="2",
C="3"

There are quite a lot of values and I would prefer not to write them all on a single line, if it can be avoided.

2
  • 1
    What happened when you tried that? Some squinting at the supervisor docs and then the ConfigParser docs and then RFC 822 of all places indicates that form may be correct.
    – thrig
    Jan 10, 2017 at 23:07
  • Sorry, found out the problem. My variables were not indented in my file. I did write it correctly purely by chance in this question though. D'oh! I've updated the question to better reflect the actual problem.
    – ManoDestra
    Jan 10, 2017 at 23:12

1 Answer 1

2

The trouble was that I was not indenting the variables in my file. The way I suggested in this question turned out to actually be correct. You can separate multiple environment variables on separate lines, but they MUST be indented. I used a tab character and it worked correctly.

e.g.

environment=
    A="",
    B="",
    C=""

Updated the question's sample so that it shows where I actually went wrong.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .