1[supervisord] 2pidfile={{ remote_dir }}/supervisord.pid 3logfile={{ remote_dir }}/supervisord.log 4 5[program:py1] 6command={{ ansible_python.executable }} -i -u - 7user={{ ansible_user_id }} 8autostart=false 9autorestart=false 10stdout_logfile={{ remote_dir }}/py1.log 11redirect_stderr=yes 12 13[program:py2] 14command={{ ansible_python.executable }} -i -u - 15user={{ ansible_user_id }} 16autostart=false 17autorestart=false 18stdout_logfile={{ remote_dir }}/py2.log 19redirect_stderr=yes 20 21[group:pys] 22programs=py1,py2 23 24[unix_http_server] 25file={{ supervisord_sock_path.path }}/supervisord.sock 26{% if credentials.username is defined and credentials.username|default(false, boolean=true) %} 27username = {{ credentials.username }} 28password = {{ credentials.password }} 29{% endif %} 30 31[inet_http_server] 32port=127.0.0.1:9001 33{% if credentials.username is defined and credentials.username|default(false, boolean=true) %} 34username = {{ credentials.username }} 35password = {{ credentials.password }} 36{% endif %} 37 38[supervisorctl] 39serverurl=unix://{{ supervisord_sock_path.path }}/supervisord.sock 40 41[rpcinterface:supervisor] 42supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface 43