Project

General

Profile

resolv.conf.patch

Remi BAPTISTE, 02/14/2019 05:09 PM

Download (1.75 KB)

View differences:

modif/resolv.conf 2018-04-23 16:44:14.085653199 +0200
3 3
#-------------------------------------------------------------------------
4 4
# vi:syntax=conf
5 5

  
6
%if not %%is_defined('_minimal_mode')
7
    %if %%is_defined('container_ip_dns')
8
nameserver %%container_ip_dns
9
    %end if
10
    %if %%getVar('activer_ad_smb', 'non') == 'oui'
6
%if %%getVar('activer_ad_smb', 'non') == 'oui'
7
search %%ad_realm
11 8
# Configuration Samba AD
12
        %if %%getVar('ad_server_role','inconnu' ) == 'controleur de domaine'
13
          %set %%set_other_dns = %%set()
14
          %if %%ad_additional_dc_ip is not None
15
%%set_other_dns.update(%%ad_additional_dc_ip)%slurp
16
          %end if
17
          %if %%getVar('ad_dc_sysvol_ref', None) is not None
18
%%set_other_dns.add(%%ad_dc_sysvol_ref)%slurp
19
          %end if
20
          %for %%variable_iter in %%set_other_dns
21
nameserver %%variable_iter
22
          %end for
23
nameserver %%adresse_ip_eth0
24
        %end if
9
  %if %%getVar('ad_server_role') == 'controleur de domaine'
10
nameserver 127.0.0.1
11
    %if %%getVar('ad_additional_dc') == 'oui'
12
nameserver %%ad_dc_sysvol_ref
13
      %for %%dns in [dns_ip for dns_ip in %%getVar('ad_additional_dc_ip', []) if dns_ip != %%ad_dc_sysvol_ref]
14
nameserver %%dns
15
      %end for
16
    %else
17
      %for %%dns in [dns_ip for dns_ip in %%getVar('ad_additional_dc_ip', [])]
18
nameserver %%dns
19
      %end for
25 20
    %end if
26
%end if
27
%if not %%is_empty(%%adresse_ip_dns)
28
    %for %%variable_iter in %%adresse_ip_dns
29
nameserver %%variable_iter
21
  %else
22
    %for %%dns in %%adresse_ip_dns
23
nameserver %%dns
30 24
    %end for
25
  %end if
31 26
%end if
32
%if %%getVar('activer_ad_smb', 'non') == 'oui'
33
domain %%ad_realm
34
%else
35
search %%nom_domaine_local
36
%end if
27

  
28