File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,46 @@ Create the child template in the path you configured above and extend `geerlingg
231231{% endblock %}
232232```
233233
234+ ### Example: LDAP stream via Nginx
235+
236+ This example describes how to setup a secure LDAP stream via Nginx.
237+
238+ Create the following file in your playbook directory (e.g. `templates/nginx/vhost-stream.j2`):
239+
240+ ```
241+ server {
242+ listen {{ item.listen }};
243+
244+ {% if item.server_name is defined and item.server_name|length > 0 %}
245+ server_name {{ item.server_name }};
246+ {% endif %}
247+
248+ {% if item.vhost_parameters is defined %}
249+ {{ item.vhost_parameters|indent(8) }}
250+ {% endif %}
251+
252+ }
253+ ```
254+
255+ Then, in your Ansible vars, specify e.g. the following configuration:
256+
257+ ```yaml
258+ nginx_vhosts:
259+ # Configuration for other hosts
260+ # <snip>
261+
262+ # LDAPS
263+ - listen: "636 ssl"
264+ server_name: "ldap.example.com"
265+ template: "{{ playbook_dir }}/templates/nginx/vhost-stream.j2"
266+ filename: "ldap.example.com.636.stream"
267+ vhost_parameters: |
268+ ssl_certificate /etc/letsencrypt/live/ldap.example.com/fullchain.pem;
269+ ssl_certificate_key /etc/letsencrypt/live/ldap.example.com/privkey.pem;
270+
271+ proxy_pass ldap-vm1.internal:389;
272+ ```
273+
234274## Dependencies
235275
236276None.
You can’t perform that action at this time.
0 commit comments