forked from LibreSchool/server-config
121 lines
4.2 KiB
YAML
121 lines
4.2 KiB
YAML
---
|
|
# Configurazione principale di NethServer.
|
|
|
|
- name: Configurazione organizzazione
|
|
shell: /sbin/e-smith/db configuration setprop OrganizationContact City "{{ org_city }}" Company "{{ org_company }}" CountryCode {{ org_countrycode }} Department "{{ org_department }}" PhoneNumber "{{ org_phone }}" Street "{{ org_street }}"
|
|
sudo: yes
|
|
|
|
- name: Configurazione scheda di rete esterna
|
|
shell: /sbin/e-smith/db networks setprop eth0 role red bootproto dhcp
|
|
sudo: yes
|
|
|
|
- name: Configurazione scheda di rete interna
|
|
shell: /sbin/e-smith/db networks setprop eth1 role green ipaddr {{ serverip }} netmask {{ servernetmask }}
|
|
sudo: yes
|
|
|
|
- name: Configurazione rete trusted
|
|
shell: /sbin/e-smith/db networks set {{ servernet }} network Description "Local LAN" Mask {{ servernetmask }}
|
|
sudo: yes
|
|
|
|
- name: Attivo configurazioni di rete
|
|
shell: /sbin/e-smith/signal-event interface-update
|
|
sudo: yes
|
|
|
|
- name: Configurazione nome server
|
|
shell: /sbin/e-smith/db configuration set SystemName {{ servershort }}
|
|
sudo: yes
|
|
|
|
- name: Configurazione nome dominio
|
|
shell: /sbin/e-smith/db configuration set DomainName {{ domainlong }}
|
|
sudo: yes
|
|
|
|
- name: Attivazione cambiamenti hostname
|
|
shell: /sbin/e-smith/signal-event hostname-modify
|
|
sudo: yes
|
|
|
|
- name: Configurazione forza password
|
|
shell: /sbin/e-smith/db configuration setprop passwordstrength PassExpires no Users none
|
|
sudo: yes
|
|
|
|
- name: Attivo configurazione policy password
|
|
shell: /sbin/e-smith/signal-event password-policy-update
|
|
sudo: yes
|
|
|
|
- name: Configurazione servizio DHCP
|
|
shell: /sbin/e-smith/db dhcp set eth1 range DhcpRangeStart {{ dhcprange_start }} DhcpRangeEnd {{ dhcprange_end }} status enabled
|
|
sudo: yes
|
|
|
|
- name: Attivazione configurazione DHCP
|
|
shell: /sbin/e-smith/signal-event network-modify
|
|
sudo: yes
|
|
|
|
- name: Configurazione servizio DNS
|
|
shell: /sbin/e-smith/db configuration setprop dns role resolver NameServers "{{ extdnsserver1 }},{{ extdnsserver2 }}"
|
|
sudo: yes
|
|
register: cfg_dns
|
|
|
|
- name: Attivo configurazione DNS
|
|
shell: /sbin/e-smith/signal-event nethserver-dnsmasq-save
|
|
when: cfg_dns|changed
|
|
sudo: yes
|
|
|
|
- name: Configuro NTP
|
|
shell: /sbin/e-smith/db configuration setprop ntpd NTPServer ntp1.inrim.it status enabled
|
|
sudo: yes
|
|
|
|
- name: Attivazione NTP
|
|
shell: /sbin/e-smith/signal-event nethserver-ntp-update
|
|
sudo: yes
|
|
|
|
- name: Configurazione SMB
|
|
shell: /sbin/e-smith/db configuration setprop smb RoamingProfiles yes ServerRole PDC Workgroup "{{ domainshort }}" status enabled
|
|
sudo: yes
|
|
|
|
- name: Attivo configurazione SMB
|
|
shell: /sbin/e-smith/signal-event nethserver-samba-save
|
|
sudo: yes
|
|
|
|
- name: Creazione gruppo Domain Users
|
|
shell: /sbin/e-smith/db accounts set domusers group Description "Domain Users" Members admin Removable no
|
|
sudo: yes
|
|
|
|
- name: Configurazione nuovo gruppo Domain Users
|
|
shell: /sbin/e-smith/signal-event group-create domusers
|
|
sudo: yes
|
|
|
|
- name: Configurazione share Condiviso
|
|
shell: /sbin/e-smith/db accounts set shared ibay AclRead domadmins,domusers AclWrite domadmins,domusers Description "Cartella condivisa" GroupAccess rw HttpStatus disabled OtherAccess r OwningGroup locals SmbAuditStatus enabled SmbGuestAccessType none SmbRecycleBinStatus enabled SmbRecycleBinVersionsStatus enabled SmbStatus enabled
|
|
sudo: yes
|
|
|
|
- name: Attivazione share condiviso
|
|
shell: /sbin/e-smith/signal-event nethserver-ibays-update
|
|
sudo: yes
|
|
|
|
- name: Configurazione squid
|
|
shell: /sbin/e-smith/db configuration setprop squid BlueMode transparent GreenMode transparent PortBlock enabled status enabled DiskCache enabled DiskCacheSize 500
|
|
sudo: yes
|
|
|
|
- name: Attivazione configurazione squid
|
|
shell: /sbin/e-smith/signal-event nethserver-squid-update
|
|
sudo: yes
|
|
|
|
- name: Configurazione squidguard
|
|
shell: /sbin/e-smith/db configuration setprop squidguard Expressions enabled Lists shalla status enabled
|
|
sudo: yes
|
|
|
|
- name: Scarico liste di filtraggio
|
|
shell: /sbin/e-smith/signal-event nethserver-squidguard-downloadlists
|
|
sudo: yes
|
|
|
|
- name: Attivazione squidguard
|
|
shell: /sbin/e-smith/signal-event nethserver-squidguard-update
|
|
sudo: yes
|
|
|
|
- name: Configurazione squidclamav
|
|
shell: /sbin/e-smith/db configuration setprop squidclamav status enabled
|
|
sudo: yes
|
|
|
|
- name: Attivazione squidclamav
|
|
shell: /sbin/e-smith/signal-event nethserver-squidclamav-update
|
|
sudo: yes
|