forked from LibreSchool/server-config
Fixed all to be able to work with NS 6.8.
This commit is contained in:
parent
09f7df6000
commit
d5ab68fb01
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@ -10,7 +10,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
# please see the online documentation at vagrantup.com.
|
||||
|
||||
# Every Vagrant virtual environment requires a box to build off of.
|
||||
config.vm.box = "syntaxerrormmm/nethserver"
|
||||
config.vm.box = "nethserver-6.8"
|
||||
config.vm.define "NethServer" do |nethserver|
|
||||
end
|
||||
config.vm.provider :virtualbox do |vb|
|
||||
|
@ -1,6 +1,14 @@
|
||||
---
|
||||
# Base configurations to be implemented anyways.
|
||||
|
||||
# installing italian interface translation
|
||||
|
||||
- name: Making available also Italian NethGUI
|
||||
yum:
|
||||
pkg: nethserver-lang-it
|
||||
state: present
|
||||
tags: nethgui
|
||||
|
||||
# Trusted networks: LAN
|
||||
|
||||
- name: Check for LAN to be added as Trusted Network
|
||||
@ -58,25 +66,6 @@
|
||||
- hostname
|
||||
- domainname
|
||||
|
||||
# Password policy
|
||||
|
||||
- name: Check for password policy
|
||||
shell: /sbin/e-smith/db configuration printprop passwordstrength Users
|
||||
register: chk_passstr
|
||||
changed_when: "'Users=none' not in chk_passstr.stdout"
|
||||
ignore_errors: true
|
||||
tags: password-policy
|
||||
|
||||
- name: Configuring password policy
|
||||
shell: /sbin/e-smith/db configuration setprop passwordstrength PassExpires no Users none Admin strong MaxPassAge 180 MinPassAge 0 PassExpires no PassWarning 7
|
||||
when: chk_passstr|changed
|
||||
tags: password-policy
|
||||
|
||||
- name: Activating password policy
|
||||
shell: /sbin/e-smith/signal-event password-policy-update
|
||||
when: chk_passstr|changed
|
||||
tags: password-policy
|
||||
|
||||
# Base certificate
|
||||
|
||||
- name: Checking CA configuration
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
# Organization configuration
|
||||
# Organization
|
||||
|
||||
- name: Installing required packages
|
||||
yum:
|
||||
@ -12,6 +12,27 @@
|
||||
changed_when: "'City={{ ansible_local.domain.org_city }}' not in check_org.stdout"
|
||||
ignore_errors: yes
|
||||
|
||||
# Password policy
|
||||
|
||||
- name: Check for password policy
|
||||
shell: /sbin/e-smith/db configuration printprop passwordstrength Users
|
||||
register: chk_passstr
|
||||
changed_when: "'Users=none' not in chk_passstr.stdout"
|
||||
ignore_errors: true
|
||||
tags: password-policy
|
||||
|
||||
- name: Configuring password policy
|
||||
shell: /sbin/e-smith/db configuration setprop passwordstrength PassExpires no Users none Admin strong MaxPassAge 180 MinPassAge 0 PassExpires no PassWarning 7
|
||||
when: chk_passstr|changed
|
||||
tags: password-policy
|
||||
|
||||
- name: Activating password policy
|
||||
shell: /sbin/e-smith/signal-event password-policy-update
|
||||
when: chk_passstr|changed
|
||||
tags: password-policy
|
||||
|
||||
# Organization configuration
|
||||
|
||||
- name: Configuring organization
|
||||
shell: /sbin/e-smith/db configuration setprop OrganizationContact City "{{ ansible_local.domain.org_city }}" Company "{{ ansible_local.domain.org_company }}" CountryCode {{ ansible_local.domain.org_countrycode }} Department "{{ ansible_local.domain.org_department }}" PhoneNumber "{{ ansible_local.domain.org_phone }}" Street "{{ ansible_local.domain.org_street }}"
|
||||
when: check_org|changed
|
||||
|
@ -10,5 +10,6 @@
|
||||
- nethserver-collectd
|
||||
- nethserver-collectd-web
|
||||
- nethserver-firewall-base
|
||||
- nethserver-firewall-base-ui
|
||||
- nethserver-backup-config
|
||||
- nethserver-backup-data
|
||||
|
@ -1,4 +1,5 @@
|
||||
---
|
||||
|
||||
# SAMBA and ibays
|
||||
|
||||
- name: Installing SAMBA and ibays packages
|
||||
@ -10,28 +11,6 @@
|
||||
- nethserver-samba
|
||||
- nethserver-samba-audit
|
||||
|
||||
# Mitigating bug for upgrade on Badlocks SAMBA bug
|
||||
- name: Mitigating bad upgrade for Badlocks
|
||||
shell: yum -y downgrade samba* tdb-tools libtdb libtevent libtalloc pytalloc
|
||||
tags:
|
||||
- badlocks
|
||||
- centos_bug
|
||||
|
||||
# Locking SAMBA version to be sure to fix badblocks update
|
||||
- name: Installing versionlock yum-plugin
|
||||
yum:
|
||||
name: yum-plugin-versionlock
|
||||
state: present
|
||||
|
||||
- name: Checking if already locked
|
||||
shell: yum versionlock list | grep -q samba && echo 'Locked' || true
|
||||
register: chk_locked_samba
|
||||
changed_when: "'Locked' not in chk_locked_samba.stdout"
|
||||
|
||||
- name: Locking samba version
|
||||
shell: yum versionlock add samba
|
||||
when: chk_locked_samba|changed
|
||||
|
||||
# SAMBA
|
||||
|
||||
- name: Checking SMB configuration
|
||||
@ -46,6 +25,13 @@
|
||||
regexp: '^unix extensions = no$'
|
||||
replace: 'unix extensions = yes'
|
||||
|
||||
- name: Adding server signing as mandatory
|
||||
lineinfile:
|
||||
dest: /etc/e-smith/templates/etc/samba/smb.conf/10global
|
||||
line: "server signing = mandatory"
|
||||
insertafter: "^workgroup = "
|
||||
state: present
|
||||
|
||||
- name: Configuring SMB
|
||||
shell: /sbin/e-smith/db configuration setprop smb RoamingProfiles yes ServerRole PDC Workgroup "{{ ansible_local.domain.domainshort }}" status enabled
|
||||
when: chk_smb|changed
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
- name: Installazione python-argparse
|
||||
yum:
|
||||
name: "http://mirror.centos.org/centos/6/extras/x86_64/Packages/python-argparse-1.2.1-2.el6.centos.noarch.rpm"
|
||||
name: python-argparse
|
||||
state: present
|
||||
become: yes
|
||||
when: check_argparse|changed
|
||||
|
@ -8,16 +8,11 @@
|
||||
name: yum-plugin-versionlock
|
||||
state: present
|
||||
|
||||
- name: Updating nethserver-release to last known version for 6.6
|
||||
yum:
|
||||
name: nethserver-release-6.6
|
||||
state: present
|
||||
|
||||
- name: Checking if already locked
|
||||
shell: yum versionlock list | grep -q nethserver-release && echo 'Locked' || true
|
||||
register: chk_locked_nethrelease
|
||||
changed_when: "'Locked' not in chk_locked_nethrelease.stdout"
|
||||
|
||||
- name: Locking nethserver-release version to 6.6
|
||||
- name: Locking nethserver-release version
|
||||
shell: yum versionlock add nethserver-release
|
||||
when: chk_locked_nethrelease|changed
|
||||
|
Loading…
x
Reference in New Issue
Block a user