diff --git a/monit/files/monitrc b/monit/files/monitrc index ac16b7b..30c01a1 100644 --- a/monit/files/monitrc +++ b/monit/files/monitrc @@ -1,7 +1,17 @@ set daemon {{ daemon_check }} +{% if http_access.ssl is defined %} +set httpd port {{ http_access.port }} + with ssl { +{%- for k,v in http_access.ssl.items() %} + {{ k }}: {{ v }} +{%- endfor %} + } + use address {{ http_access.bind }} +{%- else -%} set httpd port {{ http_access.port }} and use address {{ http_access.bind }} +{%- endif -%} {%- for host in http_access.allowed.hosts %} allow {{ host }} {%- endfor %} diff --git a/pillar.example b/pillar.example index 9e4049f..bb2d547 100644 --- a/pillar.example +++ b/pillar.example @@ -13,6 +13,9 @@ monit: http_access: port: 2812 bind: 127.0.0.1 + ssl: + pemchain: /etc/monit/chain.pem + pemkey: /etc/monit/key.pem allowed: users: - ['user1', 'pass1']