Commit 7e821365 authored by Hinrikus Wolf's avatar Hinrikus Wolf
Browse files

add option to enable model preforking for samba

* reduces number of process and hopefully ram usage
* default of role is standard model
parent 79f08582
Pipeline #2393 failed with stage
in 21 seconds
--- ---
ad_admin_password: samba-admin ad_admin_password: samba-admin
smb_model_prefork: false
smb_prefork_children: 4 # since it is default in 4.10
...@@ -98,6 +98,17 @@ ...@@ -98,6 +98,17 @@
tags: tags:
- ad-server - ad-server
- name: ensure we have a default enviroment
template:
src: samba_environ.j2
dest: /etc/default/samba
owner: root
group: root
mode: '0644'
notify: restart samba-ad-dc server
tags:
- ad-server
- name: ensure samba-ad-dc unit is running, enabled and not masked - name: ensure samba-ad-dc unit is running, enabled and not masked
systemd: systemd:
name: samba-ad-dc name: samba-ad-dc
......
{% if smb_model_prefork %}
SAMBAOPTIONS="--model prefork"
{% endif %}
...@@ -24,6 +24,11 @@ ...@@ -24,6 +24,11 @@
tls keyfile = {{smb_tls_key}} tls keyfile = {{smb_tls_key}}
tls certfile = {{smb_tls_cert}} tls certfile = {{smb_tls_cert}}
{% if smb_model_prefork %}
prefork children = {{ smb_prefork_children }}
{% endif %}
[netlogon] [netlogon]
path = /var/lib/samba/sysvol/{{ domain }}/scripts path = /var/lib/samba/sysvol/{{ domain }}/scripts
......
--- ---
ad_admin_password: samba-admin ad_admin_password: samba-admin
smb_model_prefork: false
smb_prefork_children: 4 # since it is default in 4.10
...@@ -69,6 +69,17 @@ ...@@ -69,6 +69,17 @@
tags: tags:
- ad-server - ad-server
- name: ensure we have a default enviroment
template:
src: samba_environ.j2
dest: /etc/default/samba
owner: root
group: root
mode: '0644'
notify: restart samba-ad-dc server
tags:
- ad-server
- name: ensure samba-ad-dc unit is running, enabled and not masked - name: ensure samba-ad-dc unit is running, enabled and not masked
systemd: systemd:
name: samba-ad-dc name: samba-ad-dc
......
{% if smb_model_prefork %}
SAMBAOPTIONS="--model prefork"
{% endif %}
...@@ -24,6 +24,10 @@ ...@@ -24,6 +24,10 @@
tls keyfile = {{smb_tls_key}} tls keyfile = {{smb_tls_key}}
tls certfile = {{smb_tls_cert}} tls certfile = {{smb_tls_cert}}
{% if smb_model_prefork %}
prefork children = {{ smb_prefork_children }}
{% endif %}
[netlogon] [netlogon]
path = /var/lib/samba/sysvol/{{ domain }}/scripts path = /var/lib/samba/sysvol/{{ domain }}/scripts
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment