diff --git a/Vagrantfile b/Vagrantfile index f0248a4..4841371 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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| diff --git a/roles/nethcfg/tasks/base.yml b/roles/nethcfg/tasks/base.yml index debdb6b..0d031dd 100644 --- a/roles/nethcfg/tasks/base.yml +++ b/roles/nethcfg/tasks/base.yml @@ -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 diff --git a/roles/nethcfg/tasks/directory.yml b/roles/nethcfg/tasks/directory.yml index 0fdad3e..910cde0 100644 --- a/roles/nethcfg/tasks/directory.yml +++ b/roles/nethcfg/tasks/directory.yml @@ -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 diff --git a/roles/nethcfg/tasks/otherservices.yml b/roles/nethcfg/tasks/otherservices.yml index 1dac462..72e736c 100644 --- a/roles/nethcfg/tasks/otherservices.yml +++ b/roles/nethcfg/tasks/otherservices.yml @@ -10,5 +10,6 @@ - nethserver-collectd - nethserver-collectd-web - nethserver-firewall-base + - nethserver-firewall-base-ui - nethserver-backup-config - nethserver-backup-data diff --git a/roles/nethcfg/tasks/samba.yml b/roles/nethcfg/tasks/samba.yml index 3b05d21..6177838 100644 --- a/roles/nethcfg/tasks/samba.yml +++ b/roles/nethcfg/tasks/samba.yml @@ -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 diff --git a/roles/setup/tasks/ansible.yml b/roles/setup/tasks/ansible.yml index 7d5bed3..a8abcc4 100644 --- a/roles/setup/tasks/ansible.yml +++ b/roles/setup/tasks/ansible.yml @@ -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 diff --git a/roles/setup/tasks/lock-nethrelease.yml b/roles/setup/tasks/lock-nethrelease.yml index 9159ec9..3ee41f3 100644 --- a/roles/setup/tasks/lock-nethrelease.yml +++ b/roles/setup/tasks/lock-nethrelease.yml @@ -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