Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
e882d1128d |
21
Vagrantfile
vendored
21
Vagrantfile
vendored
@ -10,16 +10,11 @@ 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.
|
||||
|
||||
# Defining a base vm name:
|
||||
myname = "NethServer"
|
||||
|
||||
config.vm.box = "syntaxerrormmm/nethserver-6.9"
|
||||
config.vm.box_url = "https://vagrant.libreschool.org/nethserver-6.9"
|
||||
config.vm.define myname do |nethserver|
|
||||
config.vm.box = "syntaxerrormmm/nethserver"
|
||||
config.vm.define "NethServer" do |nethserver|
|
||||
end
|
||||
config.vm.provider :virtualbox do |vb|
|
||||
vb.name = myname
|
||||
vb.name = "NethServer"
|
||||
end
|
||||
|
||||
# Disable automatic box update checking. If you disable this, then
|
||||
@ -35,7 +30,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
# Create a private network, which allows host-only access to the machine
|
||||
# using a specific IP.
|
||||
# config.vm.network "private_network", ip: "192.168.33.10"
|
||||
config.vm.network "private_network", ip: "172.16.254.1", auto_config: false
|
||||
config.vm.network "private_network", ip: "192.168.1.1", auto_config: false
|
||||
|
||||
# Create a public network, which generally matched to bridged network.
|
||||
# Bridged networks make the machine appear as another physical device on
|
||||
@ -131,11 +126,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
#
|
||||
# chef.validation_client_name = "ORGNAME-validator"
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
# Using default dynamic inventory
|
||||
ansible.playbook = "provision.yml"
|
||||
ansible.groups = {
|
||||
"vagrant" => [ myname ]
|
||||
}
|
||||
ansible.compatibility_mode = "2.0"
|
||||
ansible.inventory_path = "vagrant/hosts"
|
||||
ansible.playbook = "vagrant/vagrant.yml"
|
||||
end
|
||||
end
|
||||
|
39
domain.yml
39
domain.yml
@ -1,31 +1,26 @@
|
||||
---
|
||||
# Configurazione dominio
|
||||
ntpserver: pdc.topolin.ia
|
||||
ntpserver: pdc.mastri.edu
|
||||
server: pdc
|
||||
serverip: 172.16.254.1
|
||||
serverip: 192.168.1.1
|
||||
servernetmask: 255.255.255.0
|
||||
servernet: 172.16.254.0
|
||||
servergw: 172.16.254.1
|
||||
serverfqdn: pdc.topolin.ia
|
||||
domainshort: TOPOLIN
|
||||
domainfull: topolin.ia
|
||||
dhcprange_start: 172.16.254.10
|
||||
dhcprange_end: 172.16.254.50
|
||||
servernet: 192.168.1.0
|
||||
servergw: 192.168.1.1
|
||||
serverfqdn: pdc.mastri.edu
|
||||
domainshort: MASTRI
|
||||
domainfull: mastri.edu
|
||||
dhcprange_start: 192.168.1.10
|
||||
dhcprange_end: 192.168.1.50
|
||||
extdnsserver1: 208.67.222.222
|
||||
extdnsserver2: 208.67.220.220
|
||||
org_email: info@bglug.it
|
||||
org_company: Accademia di SuperPippo
|
||||
org_countrycode: IA
|
||||
org_company: Istituto Comprensivo 'Mastri Caravaggini'
|
||||
org_countrycode: IT
|
||||
org_department: "Laboratorio 1"
|
||||
org_city: Topolinia
|
||||
org_phone: "313 113 176-167"
|
||||
org_street: "Piazza la bomba e scappa"
|
||||
edu_package: secondary
|
||||
mirror_mode: remote
|
||||
#mirror_nfs_share: 192.168.255.1:/var/spool/apt-mirror/mirror
|
||||
mirror_host: it.archive.ubuntu.com
|
||||
#mirror_path: /ubuntu
|
||||
#mirror_security_host: security.ubuntu.com
|
||||
#mirror_security_path: /ubuntu
|
||||
org_city: Caravaggio
|
||||
org_phone: "+39 0363 50598"
|
||||
org_street: "Via Zenale e Butinone, 20"
|
||||
mirror_mode: nfs
|
||||
mirror_nfs_share: 192.168.255.1:/var/spool/apt-mirror/mirror
|
||||
#remote_mirror: ubuntu.fastbull.org
|
||||
client_gitbranch: master
|
||||
#client_gitrepo: "https://github.com/bglug-it/client-pull-installation.git"
|
||||
|
2
hosts
2
hosts
@ -2,4 +2,4 @@
|
||||
host_key_checking=false
|
||||
|
||||
[server]
|
||||
172.16.254.1 ansible_ssh_user=amgmt
|
||||
192.168.1.1 ansible_ssh_user=amgmt
|
||||
|
@ -1,58 +0,0 @@
|
||||
# Default password for project #
|
||||
|
||||
* NS Box root user: `vagrant`
|
||||
* NS Box vagrant user: `vagrant`
|
||||
* Vault Password: `v4ul+Password!`
|
||||
* amgmt user (server): `DoN0t4g3t!`
|
||||
* bglug user (client): `s4lamanDr@`
|
||||
* admin user (domain): `R0busTdom41nPa55wd!`
|
||||
|
||||
# How to change passwords for production deployments #
|
||||
|
||||
## *root* and *vagrant* users ##
|
||||
|
||||
These will not be required, since you will not have a virtual machine to
|
||||
manage via *Vagrant*.
|
||||
|
||||
## Vault password ##
|
||||
|
||||
Clone [`client-pull-installation`][2] then, in the working copy, launch following commands:
|
||||
|
||||
$ ansible-vault rekey domainpwd.vault
|
||||
|
||||
`ansible-vault` will ask one time the old password and two times the new one.
|
||||
|
||||
## *amgmt* user (server-side) ##
|
||||
|
||||
Clone [`server-config`][1] then, in the working copy, generate a new password hash with the follwing command:
|
||||
|
||||
$ mkpasswd -m sha-512
|
||||
|
||||
The command would ask for the password to be hashed. Please copy the result string.
|
||||
|
||||
Open up the file `roles/init/tasks/mgmtuser.yml`, find out `password:` and then replace previous hash with the one you have just created.
|
||||
|
||||
## *bglug* user (client side but preseeded) ##
|
||||
|
||||
The definition of password for *bglug* is inside `*.seed` files, inside [`server-config`][1]. Create a new password hash with:
|
||||
|
||||
$ mkpasswd -m sha-512
|
||||
|
||||
Copy the hash in your clipboard; clone the repository, then in the working directory:
|
||||
|
||||
$ find . -iname \*.seed -exec $EDITOR {} \;
|
||||
|
||||
Within each `*.seed` file, search for the string `user-password-crypted` string and change following hash.
|
||||
|
||||
## *admin* user (domain valid) ##
|
||||
|
||||
Password must be specified within NethServer interface for the *admin* user and must be absolutely equal to the one contained inside vault file.
|
||||
|
||||
Clone [`client-pull-installation`][2], create new branch and modify the password inside `domainpwd.vault`:
|
||||
|
||||
$ ansible-vault edit domainpwd.vault
|
||||
|
||||
The system would ask for the vault password. Change the plain text password with your editor.
|
||||
|
||||
[1]: https://github.com/bglug-it/server-config
|
||||
[2]: https://github.com/bglug-it/client-pull-installation
|
@ -1,26 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Fixing base variables.
|
||||
basedir=/var/lib/{{ ansible_local.domain.domainfull }}
|
||||
url=git://{{ ansible_local.domain.serverfqdn }}/client-pull-installation.git
|
||||
branch={{ ansible_local.domain.client_gitbranch }}
|
||||
|
||||
# Creo directory dipendenti
|
||||
echo "$(date --rfc-3339=seconds) Installing bin directory."
|
||||
/usr/bin/install -d -o root -g users ${basedir}/bin
|
||||
|
||||
# Workaround issue #23 - ansible-pull won't pull out of remote the first time.
|
||||
if [[ ! -f ${basedir}/config/local.yml ]]; then
|
||||
/usr/bin/git clone -b ${branch} ${url} ${basedir}/config
|
||||
fi
|
||||
/usr/bin/install -d -o root -g users /var/lib/{{ ansible_local.domain.domainfull }}/bin
|
||||
/bin/chown -R root:users /var/lib/{{ ansible_local.domain.domainfull }}
|
||||
|
||||
# Installo ansible-pull.sh
|
||||
echo "$(date --rfc-3339=seconds) Creating ansible-pull.sh."
|
||||
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/ansible-pull.sh -O ${basedir}/bin/ansible-pull.sh
|
||||
chmod a+x ${basedir}/bin/ansible-pull.sh
|
||||
|
||||
# Fixing permissions on the main directory
|
||||
/bin/chown -R root:users ${basedir}
|
||||
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/ansible-pull.sh -O /var/lib/{{ ansible_local.domain.domainfull }}/bin/ansible-pull.sh
|
||||
chmod a+x /var/lib/{{ ansible_local.domain.domainfull }}/bin/ansible-pull.sh
|
||||
|
||||
# Installo il cronjob per ansible-pull
|
||||
echo "$(date --rfc-3339=seconds) Creating crontab"
|
||||
|
@ -1,8 +1,10 @@
|
||||
---
|
||||
dependencies:
|
||||
- { role: ubuntu-mirror, tags: [ 'client-install' ] }
|
||||
- { role: pxe, tags: [ 'client-install' ] }
|
||||
- { role: preseed, tags: [ 'client-install' ] }
|
||||
- { role: ansible-pull, tags: [ 'client-install' ] }
|
||||
- { role: ubuntu-mirror, tags: [ 'client-install' ] }
|
||||
- { role: doraemon, tags: [ 'client-install' ] }
|
||||
- { role: npm, tags: [ 'client-install' ] }
|
||||
- { role: git-daemon, tags: [ 'client-install' ] }
|
||||
- { role: nfs-server, tags: [ 'client-install' ] }
|
||||
|
@ -1,3 +1,2 @@
|
||||
---
|
||||
doraemon_pkg: doraemon
|
||||
doraemon_version: 1.2.0-1
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
- name: Installazione doraemon
|
||||
yum:
|
||||
pkg: "{{ doraemon_pkg }}"
|
||||
pkg: doraemon
|
||||
state: latest
|
||||
become: yes
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
client_gitrepo: "https://github.com/bglug-it/client-pull-installation.git"
|
||||
client_gitbranch: master
|
@ -41,17 +41,17 @@
|
||||
shell: pushd /var/lib/git-daemon/repositories/client-pull-installation.git; git fetch -p origin; popd
|
||||
become: yes
|
||||
become_user: git-daemon
|
||||
when: chk_clientpullinstall_repo is succeeded
|
||||
when: chk_clientpullinstall_repo|success
|
||||
tags:
|
||||
- git-daemon-update
|
||||
|
||||
# E' in forma di shell perché non c'è modo di passare ad ansible
|
||||
# il parametro --mirror
|
||||
- name: Clono il repository client-pull-installation
|
||||
shell: git clone --mirror {{ client_gitrepo }} /var/lib/git-daemon/repositories/client-pull-installation.git
|
||||
shell: git clone --mirror https://github.com/bglug-it/client-pull-installation.git /var/lib/git-daemon/repositories/client-pull-installation.git
|
||||
become: yes
|
||||
become_user: git-daemon
|
||||
when: chk_clientpullinstall_repo is changed
|
||||
when: chk_clientpullinstall_repo|changed
|
||||
|
||||
- name: Rendo il repository esportabile
|
||||
file:
|
||||
@ -94,7 +94,7 @@
|
||||
- name: Aggiungo servizio a gestione NethServer
|
||||
shell: /sbin/e-smith/db configuration set git-daemon service status enabled TCPPort 9418 access private
|
||||
become: yes
|
||||
when: chk_gitdaemon_srv is changed
|
||||
when: chk_gitdaemon_srv|changed
|
||||
|
||||
- name: Creazione directory defaults per NethServer
|
||||
file:
|
||||
@ -102,7 +102,7 @@
|
||||
recurse: yes
|
||||
state: directory
|
||||
become: yes
|
||||
when: chk_gitdaemon_srv is changed
|
||||
when: chk_gitdaemon_srv|changed
|
||||
|
||||
- name: Creazione tipo default per NethServer
|
||||
lineinfile:
|
||||
@ -112,7 +112,7 @@
|
||||
create: yes
|
||||
state: present
|
||||
become: yes
|
||||
when: chk_gitdaemon_srv is changed
|
||||
when: chk_gitdaemon_srv|changed
|
||||
|
||||
- name: Creazione stato default per NethServer
|
||||
lineinfile:
|
||||
@ -122,19 +122,19 @@
|
||||
create: yes
|
||||
state: present
|
||||
become: yes
|
||||
when: chk_gitdaemon_srv is changed
|
||||
when: chk_gitdaemon_srv|changed
|
||||
|
||||
- name: Aggiunta servizio
|
||||
shell: /sbin/e-smith/signal-event runlevel-adjust
|
||||
become: yes
|
||||
when: chk_gitdaemon_srv is changed
|
||||
when: chk_gitdaemon_srv|changed
|
||||
|
||||
- name: Aggiunta servizio di rete e cambio firewall
|
||||
shell: /sbin/e-smith/signal-event firewall-adjust
|
||||
become: yes
|
||||
when: chk_gitdaemon_srv is changed
|
||||
when: chk_gitdaemon_srv|changed
|
||||
|
||||
- name: Avvio servizio
|
||||
shell: service git-daemon start
|
||||
become: yes
|
||||
when: chk_gitdaemon_srv is changed
|
||||
when: chk_gitdaemon_srv|changed
|
||||
|
@ -1,9 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Overriding default gitrepo if defined in domain.yml
|
||||
set_fact: client_gitrepo="{{ ansible_local.domain.client_gitrepo }}"
|
||||
when: "ansible_local.domain.client_gitrepo is defined"
|
||||
|
||||
- name: Overriding default gitbranch if defined in domain.yml
|
||||
set_fact: client_gitbranch="{{ ansible_local.domain.client_gitbranch }}"
|
||||
when: "ansible_local.domain.client_gitbranch is defined"
|
@ -1,7 +1,3 @@
|
||||
---
|
||||
|
||||
- include: initvars.yml
|
||||
tags: git-daemon
|
||||
|
||||
- include: git-daemon.yml
|
||||
tags: git-daemon
|
||||
|
@ -1,4 +1,4 @@
|
||||
---
|
||||
|
||||
ansible_ssh_user: root
|
||||
admin_sshkey: "{{ lookup('env', 'HOME') + '/.ssh/id_rsa.pub' }}"
|
||||
admin_sshkey: /Users/syntaxerrormmm/.ssh/id_rsa.pub
|
||||
|
@ -5,15 +5,13 @@
|
||||
comment: "Ansible Management User"
|
||||
group: wheel
|
||||
state: present
|
||||
password: $6$mVKMBMbAxeql$eqSe8tu2qKjtwmpiFy07b6nv2g4F80N.U9EzOmQTrNZwKZ61n6NLrSEQHQo1FOlQghOiB8as6Z35oTUUKN8y2.
|
||||
password: $6$rounds=100000$XvHuMoXtpCksx379$nhlfUn38.oBB7JrDrtwfUisw8T0Bg5InzFq1fw31mcEmGZ2AYFkFK2zC2g04lSfw.kpdSgqH3Dl5q9r1fY6.k.
|
||||
|
||||
- name: Concessione diritti all'utente di gestione Ansible
|
||||
template:
|
||||
src: sudoers.d
|
||||
dest: /etc/sudoers.d/amgmt
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0440
|
||||
mode: "u=r,g=r"
|
||||
validate: "/usr/sbin/visudo -cf %s"
|
||||
|
||||
- name: Installazione chiave privata PC locale
|
||||
|
@ -1,4 +1,5 @@
|
||||
---
|
||||
extnic: wan0
|
||||
intnic: lan0
|
||||
force_regen_ca: false
|
||||
force_ibay_shared: false
|
||||
|
@ -1,14 +1,6 @@
|
||||
---
|
||||
# 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
|
||||
@ -20,12 +12,12 @@
|
||||
|
||||
- name: Configuring trusted networks
|
||||
shell: /sbin/e-smith/db networks set {{ ansible_local.domain.servernet }} network Description "Local LAN" Mask {{ ansible_local.domain.servernetmask }}
|
||||
when: check_trusted is changed
|
||||
when: check_trusted|changed
|
||||
tags: trustednet
|
||||
|
||||
- name: Activating trusted network
|
||||
shell: /sbin/e-smith/signal-event trusted-networks-modify
|
||||
when: check_trusted is changed
|
||||
when: check_trusted|changed
|
||||
tags: trustednet
|
||||
|
||||
# Preconfiguring DNS anyways
|
||||
@ -33,17 +25,17 @@
|
||||
- name: Checking DNS configuration
|
||||
shell: /sbin/e-smith/db configuration printprop dns NameServers
|
||||
register: chk_dns
|
||||
changed_when: "'NameServers={{ ansible_local.domain.extdnsserver1 }}' not in chk_dns.stdout"
|
||||
changed_when: "'NameServers={{ ansible_local.domain.extdnsserver1 }},{{ ansible_local.domain.extdnsserver2 }}' not in chk_dns.stdout"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Configuring DNS resolution
|
||||
shell: /sbin/e-smith/db configuration setprop dns NameServers {{ ansible_local.domain.extdnsserver1 }},{{ ansible_local.domain.extdnsserver2 }}
|
||||
when: chk_dns is changed
|
||||
when: chk_dns|changed
|
||||
tags: dns-preset
|
||||
|
||||
- name: Activating correct DNS resolution
|
||||
shell: "/sbin/e-smith/signal-event nethserver-base-update"
|
||||
when: chk_dns is changed
|
||||
when: chk_dns|changed
|
||||
|
||||
# Hostname and domainname
|
||||
|
||||
@ -61,11 +53,30 @@
|
||||
|
||||
- name: Activating hostname/domainname changes
|
||||
shell: /sbin/e-smith/signal-event hostname-modify
|
||||
when: chg_hostname is changed or chg_domainname is changed
|
||||
when: chg_hostname|changed or chg_domainname|changed
|
||||
tags:
|
||||
- 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
|
||||
@ -78,9 +89,9 @@
|
||||
- name: Configuring CA
|
||||
shell: /sbin/e-smith/db configuration setprop pki CertificateDuration 3650 CommonName {{ ansible_local.domain.serverfqdn }} CountryCode {{ ansible_local.domain.org_countrycode }} EmailAddress {{ ansible_local.domain.org_email }} Locality "{{ ansible_local.domain.org_city }}" Organization "{{ ansible_local.domain.org_company }}"
|
||||
tags: regen-ca
|
||||
when: chk_crt is changed or force_regen_ca|bool
|
||||
when: chk_crt|changed or force_regen_ca|bool
|
||||
|
||||
- name: Activating CA and regenerate
|
||||
shell: /sbin/e-smith/signal-event certificate-update
|
||||
when: chk_crt is changed or force_regen_ca|bool
|
||||
when: chk_crt|changed or force_regen_ca|bool
|
||||
tags: regen-ca
|
||||
|
@ -15,11 +15,11 @@
|
||||
|
||||
- name: Configuring DHCP
|
||||
shell: /sbin/e-smith/db dhcp set {{ intnic }} range DhcpRangeStart {{ ansible_local.domain.dhcprange_start }} DhcpRangeEnd {{ ansible_local.domain.dhcprange_end }} status enabled
|
||||
when: chk_dhcp is failed
|
||||
when: chk_dhcp|failed
|
||||
|
||||
- name: Activating DHCP
|
||||
shell: /sbin/e-smith/signal-event nethserver-dnsmasq-save
|
||||
when: chk_dhcp is failed
|
||||
when: chk_dhcp|failed
|
||||
|
||||
# DNS
|
||||
# Already preconfigured before (roles/nethcfg/tasks/base.yml)
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
- name: Configuring DNS resolution
|
||||
shell: /sbin/e-smith/db configuration setprop dns NameServers {{ ansible_local.domain.extdnsserver1 }},{{ ansible_local.domain.extdnsserver2 }}
|
||||
when: chk_dns is changed
|
||||
when: chk_dns|changed
|
||||
tags: force-resolvers
|
||||
|
||||
- name: Activating correct DNS resolution
|
||||
@ -41,7 +41,7 @@
|
||||
with_items:
|
||||
- base
|
||||
- dnsmasq
|
||||
when: chk_dns is changed
|
||||
when: chk_dns|changed
|
||||
tags: force-resolvers
|
||||
|
||||
# Avahi
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
# Organization
|
||||
# Organization configuration
|
||||
|
||||
- name: Installing required packages
|
||||
yum:
|
||||
@ -12,31 +12,10 @@
|
||||
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 is changed
|
||||
tags: password-policy
|
||||
|
||||
- name: Activating password policy
|
||||
shell: /sbin/e-smith/signal-event password-policy-update
|
||||
when: chk_passstr is 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 is changed
|
||||
when: check_org|changed
|
||||
|
||||
- name: Activating organization configuration
|
||||
shell: /sbin/e-smith/signal-event organization-save
|
||||
when: check_org is changed
|
||||
when: check_org|changed
|
||||
|
@ -10,11 +10,11 @@
|
||||
|
||||
- name: domusers - Creating new group
|
||||
shell: /sbin/e-smith/db accounts set domusers group Description "Domain Users" Members admin Removable no
|
||||
when: check_domusers is failed
|
||||
when: check_domusers|failed
|
||||
|
||||
- name: domusers - Activating group
|
||||
shell: /sbin/e-smith/signal-event group-create domusers
|
||||
when: check_domusers is failed
|
||||
when: check_domusers|failed
|
||||
|
||||
# Domain Operators
|
||||
|
||||
@ -25,11 +25,11 @@
|
||||
|
||||
- name: domopers - Creating new group
|
||||
shell: /sbin/e-smith/db accounts set domopers group Description "Domain Operators" Removable no
|
||||
when: check_domopers is failed
|
||||
when: check_domopers|failed
|
||||
|
||||
- name: domopers - Activating group
|
||||
shell: /sbin/e-smith/signal-event group-create domopers
|
||||
when: check_domopers is failed
|
||||
when: check_domopers|failed
|
||||
|
||||
# Docenti
|
||||
|
||||
@ -40,8 +40,8 @@
|
||||
|
||||
- name: docenti - Creating new group
|
||||
shell: /sbin/e-smith/db accounts set docenti group Description "Docenti" Removable no
|
||||
when: check_docenti is failed
|
||||
when: check_docenti|failed
|
||||
|
||||
- name: docenti - Activating group
|
||||
shell: /sbin/e-smith/signal-event group-create docenti
|
||||
when: check_docenti is failed
|
||||
when: check_docenti|failed
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
# Network interfaces
|
||||
- include: network.yml
|
||||
when: development|bool
|
||||
become: yes
|
||||
tags:
|
||||
- network
|
||||
|
@ -1,6 +1,9 @@
|
||||
---
|
||||
# Reconfiguring network interfaces
|
||||
|
||||
- name: Configuring external NIC
|
||||
shell: /sbin/e-smith/db networks setprop {{ extnic }} role red bootproto dhcp
|
||||
|
||||
- name: Configuring internal NIC
|
||||
shell: /sbin/e-smith/db networks setprop {{ intnic }} role green ipaddr {{ ansible_local.domain.serverip }} netmask {{ ansible_local.domain.servernetmask }}
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
- name: Configuring NTP
|
||||
shell: /sbin/e-smith/db configuration setprop ntpd NTPServer ntp1.inrim.it status enabled
|
||||
become: yes
|
||||
when: chk_ntp is changed
|
||||
when: chk_ntp|changed
|
||||
|
||||
- name: Activating NTP
|
||||
shell: /sbin/e-smith/signal-event nethserver-ntp-update
|
||||
become: yes
|
||||
when: chk_ntp is changed
|
||||
when: chk_ntp|changed
|
||||
|
@ -10,6 +10,5 @@
|
||||
- nethserver-collectd
|
||||
- nethserver-collectd-web
|
||||
- nethserver-firewall-base
|
||||
- nethserver-firewall-base-ui
|
||||
- nethserver-backup-config
|
||||
- nethserver-backup-data
|
||||
|
@ -20,11 +20,11 @@
|
||||
|
||||
- name: Configuring Squid
|
||||
shell: /sbin/e-smith/db configuration setprop squid BlueMode transparent GreenMode transparent PortBlock disabled status enabled DiskCache enabled DiskCacheSize 2000
|
||||
when: chk_squid is changed
|
||||
when: chk_squid|changed
|
||||
|
||||
- name: Activating Squid configuration
|
||||
shell: /sbin/e-smith/signal-event nethserver-squid-update
|
||||
when: chk_squid is changed
|
||||
when: chk_squid|changed
|
||||
|
||||
# Squid-clamav
|
||||
|
||||
@ -36,11 +36,11 @@
|
||||
|
||||
- name: Configuring squidclamav
|
||||
shell: /sbin/e-smith/db configuration setprop squidclamav status enabled
|
||||
when: chk_squidclamav is changed
|
||||
when: chk_squidclamav|changed
|
||||
|
||||
- name: Activating squidclamav
|
||||
shell: /sbin/e-smith/signal-event nethserver-squidclamav-update
|
||||
when: chk_squidclamav is changed
|
||||
when: chk_squidclamav|changed
|
||||
|
||||
# SquidGuard
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
|
||||
- name: Configuring squidguard
|
||||
shell: /sbin/e-smith/db configuration setprop squidguard Expressions enabled Lists shalla status enabled
|
||||
when: check_squidguard is changed
|
||||
when: check_squidguard|changed
|
||||
|
||||
- name: Activating squidguard configuration
|
||||
shell: "/sbin/e-smith/signal-event nethserver-squidguard-{{ item }}"
|
||||
@ -60,7 +60,7 @@
|
||||
- save
|
||||
- update
|
||||
- downloadlists
|
||||
when: check_squidguard is changed
|
||||
when: check_squidguard|changed
|
||||
|
||||
# Content filtering settings
|
||||
|
||||
@ -72,8 +72,8 @@
|
||||
- name: Configuring content filtering
|
||||
shell: /sbin/e-smith/db contentfilter setprop default Categories aggressive,alcohol,weapons,games-online,gamble,dating,webradio,webtv,sex,porn,spyware,violence,anonvpn,warez
|
||||
register: cf_cat
|
||||
when: check_cf is changed
|
||||
when: check_cf|changed
|
||||
|
||||
- name: Activating content filtering as a whole
|
||||
shell: /sbin/e-smith/signal-event nethserver-squidguard-update
|
||||
when: check_cf is changed
|
||||
when: check_cf|changed
|
||||
|
@ -1,5 +1,4 @@
|
||||
---
|
||||
|
||||
# SAMBA and ibays
|
||||
|
||||
- name: Installing SAMBA and ibays packages
|
||||
@ -13,59 +12,25 @@
|
||||
|
||||
# SAMBA
|
||||
|
||||
- name: "Verifying modifications on templates-custom."
|
||||
shell: grep -q 'server signing = mandatory' /etc/e-smith/templates-custom/etc/samba/smb.conf/10global
|
||||
register: check_tempcust
|
||||
changed_when: check_tempcust.rc != 0
|
||||
ignore_errors: true
|
||||
|
||||
- name: "Create directory structure for templates-custom"
|
||||
file:
|
||||
path: "/etc/e-smith/templates-custom/etc/samba/smb.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
state: directory
|
||||
when: check_tempcust is changed
|
||||
|
||||
- name: "Copying settings from default."
|
||||
copy:
|
||||
src: /etc/e-smith/templates/etc/samba/smb.conf/10global
|
||||
dest: /etc/e-smith/templates-custom/etc/samba/smb.conf/10global
|
||||
remote_src: true
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when: check_tempcust is changed
|
||||
|
||||
- name: "Enabling unix extensions on SAMBA"
|
||||
replace:
|
||||
dest: /etc/e-smith/templates-custom/etc/samba/smb.conf/10global
|
||||
regexp: '^unix extensions = no$'
|
||||
replace: 'unix extensions = yes'
|
||||
when: check_tempcust is changed
|
||||
|
||||
- name: Adding server signing as mandatory
|
||||
lineinfile:
|
||||
dest: /etc/e-smith/templates-custom/etc/samba/smb.conf/10global
|
||||
line: "server signing = mandatory"
|
||||
insertafter: "^workgroup = "
|
||||
state: present
|
||||
when: check_tempcust is changed
|
||||
|
||||
- name: Checking SMB configuration
|
||||
shell: /sbin/e-smith/db configuration printprop smb RoamingProfiles
|
||||
register: chk_smb
|
||||
changed_when: "'RoamingProfiles=yes' not in chk_smb.stdout"
|
||||
ignore_errors: true
|
||||
|
||||
- name: "Enabling unix extensions on SAMBA"
|
||||
replace:
|
||||
dest: /etc/e-smith/templates/etc/samba/smb.conf/10global
|
||||
regexp: '^unix extensions = no$'
|
||||
replace: 'unix extensions = yes'
|
||||
|
||||
- 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 is changed
|
||||
when: chk_smb|changed
|
||||
|
||||
- name: Activating SMB
|
||||
shell: /sbin/e-smith/signal-event nethserver-samba-save
|
||||
when: chk_smb is changed
|
||||
when: chk_smb|changed
|
||||
|
||||
# ibays
|
||||
|
||||
@ -87,7 +52,7 @@
|
||||
|
||||
- name: Copying default templates for shared template type
|
||||
shell: cp -r /etc/e-smith/templates/etc/samba/smb.conf/ibay-default /etc/e-smith/templates/etc/samba/smb.conf/ibay-shared
|
||||
when: force_ibay_shared|bool or chk_shared is failed
|
||||
when: force_ibay_shared|bool or chk_shared|failed
|
||||
|
||||
- name: Configuring ibay-shared template structure (directory mask)
|
||||
lineinfile:
|
||||
@ -95,7 +60,7 @@
|
||||
line: 'directory mask = 0775'
|
||||
insertafter: '^create mask'
|
||||
state: present
|
||||
when: force_ibay_shared|bool or chk_shared is failed
|
||||
when: force_ibay_shared|bool or chk_shared|failed
|
||||
|
||||
- name: Configuring force create mode
|
||||
lineinfile:
|
||||
@ -103,7 +68,7 @@
|
||||
line: 'force create mode = 0664'
|
||||
insertafter: '^directory mask'
|
||||
state: present
|
||||
when: force_ibay_shared|bool or chk_shared is failed
|
||||
when: force_ibay_shared|bool or chk_shared|failed
|
||||
|
||||
- name: Configuring force directory mode
|
||||
lineinfile:
|
||||
@ -111,41 +76,23 @@
|
||||
line: 'force directory mode = 0775'
|
||||
insertafter: '^force create mode'
|
||||
state: present
|
||||
when: force_ibay_shared|bool or chk_shared is failed
|
||||
when: force_ibay_shared|bool or chk_shared|failed
|
||||
|
||||
- name: Configuring shared ibay
|
||||
shell: /sbin/e-smith/db accounts set shared ibay AclRead domusers,domadmins AclWrite domusers,domadmins Description "Cartella condivisa" GroupAccess rw HttpStatus disabled OtherAccess r OwningGroup locals SmbAuditStatus enabled SmbGuestAccessType none SmbRecycleBinStatus enabled SmbRecycleBinVersionsStatus enabled SmbStatus enabled
|
||||
when: chk_shared is failed
|
||||
when: chk_shared|failed
|
||||
|
||||
- name: Activating shared ibay
|
||||
shell: /sbin/e-smith/signal-event ibay-create shared
|
||||
become: yes
|
||||
when: chk_shared is failed
|
||||
when: chk_shared|failed
|
||||
|
||||
- name: Changing ibay profile for shared
|
||||
shell: /sbin/e-smith/db accounts setprop shared SmbProfileType shared
|
||||
become: yes
|
||||
when: force_ibay_shared|bool or chk_shared is failed
|
||||
|
||||
- name: Saving new version of smb.conf
|
||||
shell: /sbin/e-smith/signal-event nethserver-samba-save
|
||||
become: yes
|
||||
when: check_tempcust is changed
|
||||
when: force_ibay_shared|bool or chk_shared|failed
|
||||
|
||||
- name: Forcing regeneration of smb.conf
|
||||
shell: /sbin/e-smith/signal-event nethserver-samba-update
|
||||
become: yes
|
||||
when: force_ibay_shared|bool or chk_shared is failed or check_tempcust is changed
|
||||
|
||||
# Fixing issue #3 - Configure sudo access for admin on server for operator
|
||||
# access
|
||||
# https://github.com/bglug-it/server-config/issues/3
|
||||
- name: Configuring sudo access for admin account
|
||||
lineinfile:
|
||||
dest: /etc/sudoers.d/admin
|
||||
line: 'admin ALL=(ALL:ALL) NOPASSWD: ALL'
|
||||
create: yes
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0440
|
||||
validate: 'visudo -cf %s'
|
||||
when: force_ibay_shared|bool or chk_shared|failed
|
||||
|
9
roles/nfs-server/files/access.ldif
Normal file
9
roles/nfs-server/files/access.ldif
Normal file
@ -0,0 +1,9 @@
|
||||
dn: olcDatabase={2}bdb,cn=config
|
||||
changetype: modify
|
||||
replace: olcAccess
|
||||
olcAccess: {0}to attrs=sambaNTPassword by dn.exact="gidNumber=0+uidNumber=0,cn
|
||||
=peercred,cn=external,cn=auth" manage by dn.exact="cn=samba,dc=directory,dc=n
|
||||
h" peername.ip="127.0.0.1" write by self write by * none
|
||||
olcAccess:: ezF9dG8gYXR0cnM9dXNlclBhc3N3b3JkIA0KIGJ5IGRuLmV4YWN0PSJnaWROdW1iZXI9MCt1aWROdW1iZXI9MCxjbj1wZWVyY3JlZCxjbj1leHRlcm5hbCxjbj1hdXRoIiBtYW5hZ2UNCiBieSBkbi5leGFjdD0iY249cGFtLGRjPWRpcmVjdG9yeSxkYz1uaCIgcGVlcm5hbWUucGF0aD0iL3Zhci9ydW4vbGRhcGkiIHdyaXRlIA0KIGJ5IGRuLmV4YWN0PSJjbj1saWJ1c2VyLGRjPWRpcmVjdG9yeSxkYz1uaCIgcGVlcm5hbWUuaXA9IjEyNy4wLjAuMSIgd3JpdGUNCiBieSBhbm9ueW1vdXMgYXV0aCANCiBieSBzZWxmIHdyaXRlIA0KIGJ5ICogbm9uZQ==
|
||||
olcAccess:: ezJ9dG8gZG4uYmFzZT0iIg0KIGJ5ICogcmVhZA==
|
||||
olcAccess:: ezN9dG8gKg0KIGJ5IHNlbGYgd3JpdGUNCiBieSBkbi5leGFjdD0iZ2lkTnVtYmVyPTArdWlkTnVtYmVyPTAsY249cGVlcmNyZWQsY249ZXh0ZXJuYWwsY249YXV0aCIgbWFuYWdlDQogYnkgZG4uZXhhY3Q9ImNuPXNhbWJhLGRjPWRpcmVjdG9yeSxkYz1uaCIgcGVlcm5hbWUuaXA9IjEyNy4wLjAuMSIgd3JpdGUgDQogYnkgZG4uZXhhY3Q9ImNuPXBhbSxkYz1kaXJlY3RvcnksZGM9bmgiIHBlZXJuYW1lLnBhdGg9Ii92YXIvcnVuL2xkYXBpIiB3cml0ZSANCiBieSBkbi5leGFjdD0iY249bGlidXNlcixkYz1kaXJlY3RvcnksZGM9bmgiIHBlZXJuYW1lLmlwPSIxMjcuMC4wLjEiIHdyaXRlIA0KIGJ5IHVzZXJzIHNzZj03MSByZWFkIA0KIGJ5ICogcmVhZA==
|
1
roles/nfs-server/files/nfsd.conf
Normal file
1
roles/nfs-server/files/nfsd.conf
Normal file
@ -0,0 +1 @@
|
||||
options nfsd nfs4_disable_idmapping=1
|
3
roles/nfs-server/tasks/main.yml
Normal file
3
roles/nfs-server/tasks/main.yml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
- include: nfs-server.yml
|
||||
tags: nfs-server
|
54
roles/nfs-server/tasks/nfs-server.yml
Normal file
54
roles/nfs-server/tasks/nfs-server.yml
Normal file
@ -0,0 +1,54 @@
|
||||
---
|
||||
# Install and configure nfs server
|
||||
|
||||
- name: Installing nfs-utils
|
||||
yum: pkg=nfs-utils state=present
|
||||
become: yes
|
||||
|
||||
- name: Activating NFS at boot
|
||||
shell: /sbin/chkconfig nfs on
|
||||
become: yes
|
||||
|
||||
- name: Configuring exports
|
||||
template: src='preseed/exports' dest='/etc/exports'
|
||||
become: yes
|
||||
|
||||
- name: Copy LDIF access file
|
||||
copy: src=files/access.ldif dest=/tmp/access.ldif
|
||||
become: yes
|
||||
|
||||
- name: Enable LDAP external access
|
||||
shell: /usr/bin/ldapmodify -Y EXTERNAL -f /tmp/access.ldif
|
||||
become: yes
|
||||
|
||||
- name: Remove LDIF access file
|
||||
shell: /bin/rm /tmp/access.ldif
|
||||
become: yes
|
||||
|
||||
## TODO: (maybe) add port 111? (rpcbind)
|
||||
- name: Configuring firewall service for NFS
|
||||
shell: /sbin/e-smith/db configuration set nfs service TCPPort 2049 UDPPort 2049 status enabled access private
|
||||
become: yes
|
||||
|
||||
- name: Reloading firewall configuration
|
||||
shell: /sbin/e-smith/signal-event firewall-adjust
|
||||
become: yes
|
||||
|
||||
- name: Reloading runlevel configuration
|
||||
shell: /sbin/e-smith/signal-event runlevel-adjust
|
||||
become: yes
|
||||
|
||||
- name: Disable NFS4 id mapping at boot
|
||||
copy: src=files/nfsd.conf dest=/etc/modules.d/nfsd.conf
|
||||
become: yes
|
||||
|
||||
- name: Disable NFS4 id mapping
|
||||
shell: /bin/echo Y > /sys/module/nfsd/parameters/nfs4_disable_idmapping
|
||||
|
||||
- name: Reloading NFS exports
|
||||
shell: /usr/sbin/exportfs -ra
|
||||
become: yes
|
||||
|
||||
- name: Restarting NFS server
|
||||
shell: /sbin/service nfs restart
|
||||
become: yes
|
1
roles/nfs-server/templates/exports
Normal file
1
roles/nfs-server/templates/exports
Normal file
@ -0,0 +1 @@
|
||||
/var/lib/nethserver/home {{ ansible_local.domain.servernet }}/{{ ansible_local.domain.servernetmask }}(rw,no_root_squash,sync,no_subtree_check)
|
@ -1,6 +1,5 @@
|
||||
---
|
||||
# Defaults for installation
|
||||
edu_package: secondary
|
||||
mirror_mode: local
|
||||
mirror_host: archive.ubuntu.com
|
||||
mirror_path: /ubuntu
|
||||
@ -8,6 +7,5 @@ mirror_security_host: security.ubuntu.com
|
||||
mirror_security_path: /ubuntu
|
||||
mirror_localpath: /ks/mirror
|
||||
execpath: ""
|
||||
execsecurepath: ""
|
||||
execmirrorpath: ""
|
||||
development: false
|
||||
|
@ -3,22 +3,11 @@
|
||||
- include: mirror-cfg.yml
|
||||
tags:
|
||||
- preseed
|
||||
- repoconfig
|
||||
|
||||
- include: preseed.yml
|
||||
tags:
|
||||
- preseed
|
||||
|
||||
- include: repoconfig.yml
|
||||
tags:
|
||||
- preseed
|
||||
- repoconfig
|
||||
|
||||
- include: firefoxcert.yml
|
||||
tags:
|
||||
- firefox
|
||||
|
||||
- include: paperms.yml
|
||||
tags:
|
||||
- preseed
|
||||
- paperms
|
||||
|
@ -6,27 +6,19 @@
|
||||
when: "ansible_local.domain.mirror_mode is defined"
|
||||
|
||||
- name: Determining mirror_host
|
||||
set_fact:
|
||||
mirror_host: "{{ ansible_local.domain.mirror_host }}"
|
||||
orig_mirror_host: "{{ ansible_local.domain.mirror_host }}"
|
||||
set_fact: mirror_host="{{ ansible_local.domain.mirror_host }}"
|
||||
when: ansible_local.domain.mirror_host is defined
|
||||
|
||||
- name: Determining mirror_path
|
||||
set_fact:
|
||||
mirror_path: "{{ ansible_local.domain.mirror_path }}"
|
||||
orig_mirror_path: "{{ ansible_local.domain.mirror_path }}"
|
||||
set_fact: mirror_path="{{ ansible_local.domain.mirror_path }}"
|
||||
when: ansible_local.domain.mirror_path is defined
|
||||
|
||||
- name: Determining mirror_security_host
|
||||
set_fact:
|
||||
mirror_security_host: "{{ ansible_local.domain.mirror_security_host }}"
|
||||
orig_mirror_security_host: "{{ ansible_local.domain.mirror_security_host }}"
|
||||
set_fact: mirror_security_host="{{ ansible_local.domain.mirror_security_host }}"
|
||||
when: ansible_local.domain.mirror_security_host is defined
|
||||
|
||||
- name: Determining mirror_security_path
|
||||
set_fact:
|
||||
mirror_security_path: "{{ ansible_local.domain.mirror_security_path }}"
|
||||
orig_mirror_security_path: "{{ ansible_local.domain.mirror_security_path }}"
|
||||
set_fact: mirror_security_path="{{ ansible_local.domain.mirror_security_path }}"
|
||||
when: ansible_local.domain.mirror_security_path is defined
|
||||
|
||||
- name: Determining mirror_localpath
|
||||
@ -36,13 +28,16 @@
|
||||
# The remote option is already configured as it is.
|
||||
|
||||
# Configuring correctly local mirror
|
||||
- name: Altering paths
|
||||
- name: Determining variables for local and nfs mode
|
||||
set_fact:
|
||||
execmirrorpath: "{{ mirror_host }}{{ mirror_path }}"
|
||||
execsecurepath: "{{ mirror_security_host }}{{ mirror_security_path }}"
|
||||
orig_mirror_path: ”{{ mirror_path }}"
|
||||
orig_mirror_host: "{{ mirror_host }}"
|
||||
orig_mirror_security_path: "{{ mirror_security_path }}"
|
||||
orig_mirror_security_host: "{{ mirror_security_host }}"
|
||||
execmirrorpath: ”{{ mirror_host }}{{ mirror_path }}"
|
||||
execpath: "{{ ansible_local.domain.serverfqdn }}{{ mirror_localpath }}/"
|
||||
mirror_path: "{{ mirror_localpath }}/{{ mirror_host }}{{ mirror_path }}"
|
||||
mirror_host: "{{ ansible_local.domain.serverfqdn }}"
|
||||
mirror_security_path: "{{ mirror_localpath }}/{{ mirror_security_host }}{{ mirror_security_path }}"
|
||||
mirror_security_path: "{{ mirror_localpath }}/{{ mirror_security_host }}{{mirror_security_path }}"
|
||||
mirror_security_host: "{{ ansible_local.domain.serverfqdn }}"
|
||||
when: mirror_mode != 'remote'
|
||||
|
@ -1,25 +0,0 @@
|
||||
---
|
||||
# Installing fixes final fixes for PulseAudio permissions.
|
||||
|
||||
- name: Creating paperms subdir inside ks/preseed share
|
||||
file:
|
||||
path: /var/lib/nethserver/ibay/ks/paperms
|
||||
state: directory
|
||||
owner: root
|
||||
group: locals
|
||||
mode: 0755
|
||||
become: yes
|
||||
|
||||
- name: Deploy template files for paperms
|
||||
template:
|
||||
src: "paperms/{{ item }}"
|
||||
dest: "/var/lib/nethserver/ibay/ks/paperms/{{ item }}"
|
||||
owner: root
|
||||
group: locals
|
||||
mode: 0644
|
||||
with_items:
|
||||
- updategrp.py
|
||||
- paperms.sh
|
||||
- cronjob
|
||||
- logrotate
|
||||
become: yes
|
@ -1,10 +1,5 @@
|
||||
---
|
||||
|
||||
- name: Configure the edu-package following settings in domain.yml
|
||||
set_fact:
|
||||
edu_package: "{{ ansible_local.domain.edu_package }}"
|
||||
when: ansible_local.domain.edu_package is defined
|
||||
|
||||
- name: Verifica configurazione ibay preseed
|
||||
shell: /sbin/e-smith/db accounts show ks
|
||||
register: chk_ks_created
|
||||
@ -14,12 +9,12 @@
|
||||
|
||||
- name: Configurazione web preseed
|
||||
shell: /sbin/e-smith/db accounts set ks ibay Description "Preseed share" GroupAccess rw HttpAccess private HttpAliasType default HttpAllowOverrideStatus disabled HttpForceSslStatus disabled HttpPasswordStatus disabled HttpStatus enabled HttpVirtualHost __ANY__ OtherAccess r OwningGroup locals SmbAuditStatus disabled SmbStatus disabled
|
||||
when: chk_ks_created is failed
|
||||
when: chk_ks_created|failed
|
||||
become: yes
|
||||
|
||||
- name: Attivazione web preseed
|
||||
shell: /sbin/e-smith/signal-event ibay-create ks
|
||||
when: chk_ks_created is failed
|
||||
when: chk_ks_created|failed
|
||||
become: yes
|
||||
|
||||
- name: Verifica presenza directory mirror
|
||||
@ -31,7 +26,7 @@
|
||||
- name: Collegamento directory mirror
|
||||
file: path=/var/lib/nethserver/ibay/ks/mirror src=/var/spool/apt-mirror/mirror state=link
|
||||
become: yes
|
||||
when: chk_mirror_dir is succeeded
|
||||
when: chk_mirror_dir|success
|
||||
|
||||
- name: Creazione directory preseed
|
||||
file:
|
||||
@ -47,7 +42,6 @@
|
||||
- edubuntu.seed
|
||||
- client-trusty.seed
|
||||
- docenti-trusty.seed
|
||||
- aula-trusty.seed
|
||||
become: yes
|
||||
|
||||
- block:
|
||||
@ -73,6 +67,6 @@
|
||||
with_items:
|
||||
- postseed-client.sh
|
||||
- postseed-docenti.sh
|
||||
- postseed-aula.sh
|
||||
- pulseaudio-perms.sh
|
||||
- checksum.fact
|
||||
become: yes
|
||||
|
@ -1,44 +0,0 @@
|
||||
---
|
||||
# Configuring the base repositories files.
|
||||
# Composing here files to be used by clients will reduce time to load/construct
|
||||
# them within client-pull-installation playbook.
|
||||
|
||||
- name: Creating base directory for storing repositories files
|
||||
file:
|
||||
path: /var/lib/nethserver/ibay/ks/repoconfig
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
become: yes
|
||||
|
||||
- name: Preconfiguring base repositories file for clients
|
||||
template:
|
||||
src: repoconfig/sources.list
|
||||
dest: /var/lib/nethserver/ibay/ks/repoconfig/sources.list
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
become: yes
|
||||
|
||||
- name: Preconfiguring other repositories for clients
|
||||
template:
|
||||
src: "repoconfig/{{ item }}"
|
||||
dest: "/var/lib/nethserver/ibay/ks/repoconfig/{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
with_items:
|
||||
- bglug-trusty.list
|
||||
- ansible-ansible-trusty.list
|
||||
- libreoffice-ppa-trusty.list
|
||||
- epoptes-ppa-trusty.list
|
||||
- geogebra-stable.list
|
||||
become: yes
|
||||
|
||||
- name: Pre-downloading geogebra GPG signature because of HTTPS
|
||||
get_url:
|
||||
url: "https://www.geogebra.net/linux/office@geogebra.org.gpg.key"
|
||||
dest: "/var/lib/nethserver/ibay/ks/repoconfig/office_geogebra.gpg.key"
|
||||
validate_certs: no
|
||||
become: yes
|
2
roles/preseed/templates/libreoffice-5-trusty.list
Normal file
2
roles/preseed/templates/libreoffice-5-trusty.list
Normal file
@ -0,0 +1,2 @@
|
||||
deb http://{{ execpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
deb-src http://{{ execpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
@ -1 +0,0 @@
|
||||
@reboot root /var/lib/{{ ansible_local.domain.domainfull }}/bin/paperms.sh >> /var/log/paperms.log 2>&1
|
@ -1,7 +0,0 @@
|
||||
/var/log/paperms.log {
|
||||
rotate 7
|
||||
daily
|
||||
compress
|
||||
missingok
|
||||
notifempty
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Fixing base variables
|
||||
basedir=/var/lib/{{ ansible_local.domain.domainfull }}
|
||||
|
||||
# Making sure destination folder exists.
|
||||
/usr/bin/install -d -o root -g users ${basedir}/bin
|
||||
|
||||
# Update this script itself
|
||||
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/paperms/paperms.sh -O ${basedir}/bin/paperms.sh
|
||||
/bin/chown root:users ${basedir}/bin/paperms.sh
|
||||
/bin/chmod a+x ${basedir}/bin/paperms.sh
|
||||
|
||||
# Updating cronjob
|
||||
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/paperms/cronjob -O /etc/cron.d/paperms
|
||||
/bin/chown root:root /etc/cron.d/paperms
|
||||
/bin/chmod 0644 /etc/cron.d/paperms
|
||||
|
||||
# Removing old versions of the cronjob
|
||||
rm -f /etc/cron.d/pulseaudio-perms
|
||||
|
||||
# Updating logrotate
|
||||
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/paperms/logrotate -O /etc/logrotate.d/paperms
|
||||
/bin/chown root:root /etc/logrotate.d/paperms
|
||||
/bin/chmod 0644 /etc/logrotate.d/paperms
|
||||
|
||||
# Updating updategrp.py
|
||||
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/paperms/updategrp.py -O ${basedir}/bin/updategrp.py
|
||||
/bin/chown root:users ${basedir}/bin/updategrp.py
|
||||
/bin/chmod a+x ${basedir}/bin/updategrp.py
|
||||
|
||||
# Main part: run updategrp.py
|
||||
/usr/bin/wbinfo -t && /usr/bin/python2 ${basedir}/bin/updategrp.py "domain users" "pulse" || echo "Not in domain."
|
||||
/usr/bin/wbinfo -t && /usr/bin/python2 ${basedir}/bin/updategrp.py "domain users" "pulse-access" || echo "Not in domain."
|
@ -1,74 +0,0 @@
|
||||
#!/usr/bin/env python2
|
||||
|
||||
from __future__ import print_function
|
||||
import grp
|
||||
import re
|
||||
from subprocess import check_output
|
||||
from sys import argv
|
||||
|
||||
class UpdateGrp:
|
||||
|
||||
def __init__(self, leftname = "domain users", rightname = "pulse"):
|
||||
"""Confronts members of the LHS group with the members of the RHS group. LHS group defaults to "domain users"."""
|
||||
self.leftname = leftname
|
||||
self.rightname = rightname
|
||||
self.leftmembers = grp.getgrnam(self.leftname)[3]
|
||||
self.rightmembers = grp.getgrnam(self.rightname)[3]
|
||||
|
||||
# Since there is also a local user already created on the machine but
|
||||
# it is not a domain user, we will add it to leftmembers
|
||||
self.leftmembers.append("bglug")
|
||||
|
||||
self.to_add = list(set(self.leftmembers) - set(self.rightmembers))
|
||||
self.to_remove = list(set(self.rightmembers) - set(self.leftmembers))
|
||||
|
||||
def update_rhs(self):
|
||||
"""Updates the RHS group members to be equal to the LHS group members."""
|
||||
# If RHS is a local group
|
||||
with open('/etc/group', 'r') as group:
|
||||
for grp in group.readlines():
|
||||
if re.match("%s:" % self.rightname, grp):
|
||||
# If to_add is not empty, add each element to group
|
||||
if len(self.to_add) > 0:
|
||||
for user in self.to_add:
|
||||
print(check_output(["gpasswd", "-a", user, self.rightname]), end='')
|
||||
|
||||
# If to_remove is not empty, remove each element to group
|
||||
if len(self.to_remove) > 0:
|
||||
for user in self.to_remove:
|
||||
print(check_output(["gpasswd", "-d", user, self.rightname]), end='')
|
||||
|
||||
def update_lhs(self):
|
||||
"""Updates the LHS group members to be equal to the RHS group members."""
|
||||
# If LHS is a local group
|
||||
with open('/etc/group', 'r') as group:
|
||||
for grp in group.readline():
|
||||
if re.match("%s:" % self.leftname, grp):
|
||||
# If to_remove is not empty, add each element to group
|
||||
if len(self.to_remove) > 0:
|
||||
for user in self.to_remove:
|
||||
print(check_output(["gpasswd", "-a", user, self.leftname]), end='')
|
||||
|
||||
# If to_add is not empty, remove each element to group
|
||||
if len(self.to_add) > 0:
|
||||
for user in self.to_add:
|
||||
print(check_output(["gpasswd", "-d", user, self.leftname]), end='')
|
||||
|
||||
|
||||
def modprint(self):
|
||||
"""Debug function to print only modifications."""
|
||||
print("To add: ", end='')
|
||||
print(self.to_add)
|
||||
print("To remove: ", end='')
|
||||
print(self.to_remove)
|
||||
|
||||
# When run interactively
|
||||
if __name__ == '__main__':
|
||||
# If the first argument is '--help' or '-h', or number of arguments less than 1 and more than 2, print help.
|
||||
if len(argv) < 2 or len(argv) > 3 or argv[1] == '--help' or argv[1] == '-h':
|
||||
print("Usage: %s <LHSgroup> <RHSgroup>" % argv[0])
|
||||
print("Aligns RHS group members as LHS.")
|
||||
|
||||
else:
|
||||
updgrp = UpdateGrp(argv[1], argv[2])
|
||||
updgrp.update_rhs()
|
@ -1,134 +0,0 @@
|
||||
# No questions if possible
|
||||
debconf debconf/priority string critical
|
||||
|
||||
# Localization - Italiano
|
||||
d-i debian-installer/locale string it_IT.UTF-8
|
||||
d-i debian-installer/supported-locales multiselect it_IT it_IT@euro en_US en_US.UTF-8
|
||||
|
||||
# Keyboard settings
|
||||
d-i console-setup/ask_detect boolean false
|
||||
d-i keyboard-configuration/layoutcode string it
|
||||
|
||||
# Network
|
||||
d-i netcfg/choose_interface select auto
|
||||
|
||||
# Adjust the default hostname.
|
||||
d-i netcfg/hostname string kickseed
|
||||
|
||||
# Enabling non-free firmware
|
||||
d-i hw-detect/load_firmware boolean true
|
||||
|
||||
# Setting up repositories from local mirror
|
||||
d-i mirror/country string manual
|
||||
d-i mirror/protocol string http
|
||||
d-i mirror/http/hostname string {{ mirror_host }}
|
||||
d-i mirror/http/directory string {{ mirror_path }}
|
||||
d-i mirror/http/proxy string
|
||||
d-i mirror/suite string trusty
|
||||
|
||||
# Apt-setup additional repos
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||
|
||||
# Additional repos
|
||||
d-i apt-setup/multiverse boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/partner boolean true
|
||||
|
||||
# Setup and enable libreoffice PPA
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||
|
||||
# Setup and enable ansible PPA
|
||||
d-i apt-setup/local1/repository string http://{{ execpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
d-i apt-setup/local1/comment string Ansible Official PPA
|
||||
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
||||
|
||||
# Setup and enable epoptes PPA
|
||||
d-i apt-setup/local2/repository string http://{{ execpath }}ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local2/comment string Epoptes stable repository
|
||||
d-i apt-setup/local2/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x2D9B9274D3DF9D7CD7281A3E49F26CB30350B375&op=get
|
||||
|
||||
# Setup and enable geogebra repository
|
||||
d-i apt-setup/local3/repository string http://{{ execpath }}/www.geogebra.net/linux stable main
|
||||
d-i apt-setup/local3/comment string Geogebra Official repository
|
||||
d-i apt-setup/local3/key string http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/office_geogebra.gpg.key
|
||||
|
||||
# Time and date
|
||||
d-i clock-setup/utc boolean true
|
||||
d-i time/zone string Europe/Rome
|
||||
d-i clock-setup/ntp boolean true
|
||||
d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
||||
|
||||
# User creation
|
||||
d-i passwd/user-fullname string BgLUG User
|
||||
d-i passwd/username string bglug
|
||||
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||
|
||||
# Partitioning
|
||||
d-i partman-auto/init_automatically_partition select biggest_free
|
||||
d-i partman-auto/disk string /dev/sda
|
||||
d-i partman-auto/method string regular
|
||||
d-i partman-lvm/device_remove_lvm boolean true
|
||||
d-i partman-md/device_remove_md boolean true
|
||||
d-i partman-auto/choose_recipe select atomic
|
||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||
d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
d-i partman/mount_style select uuid
|
||||
d-i user-setup/encrypt-home boolean false
|
||||
|
||||
# Kernel installation
|
||||
d-i base-installer/kernel/image string linux-generic
|
||||
d-i base-installer/kernel/altmeta string lts-xenial
|
||||
|
||||
# Install the Edubuntu desktop.
|
||||
tasksel tasksel/first multiselect edubuntu-desktop-gnome
|
||||
|
||||
# No asking for installation in language
|
||||
d-i pkgsel/install-language-support boolean true
|
||||
d-i pkgsel/ignore-incomplete-language-support boolean true
|
||||
d-i localechooser/translation/warn-severe boolean true
|
||||
d-i localechooser/translation/warn-light boolean true
|
||||
|
||||
# Policy to upgrade: none
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# Upgrade after installation: no
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
# Language pack selection
|
||||
d-i pkgsel/language-packs multiselect it, en
|
||||
|
||||
# Disable popularity contest
|
||||
popularity-contest popularity-contest/participate boolean false
|
||||
|
||||
# Install both GNOME and KDE translation packages.
|
||||
d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-kde-$LL kde-i18n-$LL libreoffice-help-$LL libreoffice-l10n-$LL firefox-locale-$LL gimp-help-$LL thunderbird-locale-$LL
|
||||
|
||||
# Adding libreoffice and ansible
|
||||
{% if ansible_bios_version == 'VirtualBox' %}
|
||||
d-i pkgsel/include string dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude geogebra geogebra-gnome gnome-search-tool ocrfeeder openshot freeplane gtk-recordmydesktop vokoscreen virtualbox-guest-dkms
|
||||
{% else %}
|
||||
d-i pkgsel/include string dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude geogebra geogebra-gnome gnome-search-tool ocrfeeder openshot freeplane gtk-recordmydesktop vokoscreen
|
||||
{% endif %}
|
||||
|
||||
# Post installation tasks
|
||||
# Update system
|
||||
d-i preseed/late_command string in-target apt-get -y upgrade; \
|
||||
in-target apt-get -y dist-upgrade; \
|
||||
in-target apt-get -y purge unity-webapps-common zeitgeist-core zeitgeist-datahub webbrowser-app epoptes epoptes-client; \
|
||||
in-target apt-get -y autoremove; \
|
||||
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
||||
in-target bash -c "/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-aula.sh | /bin/bash >/root/postseed.log 2>&1";
|
||||
|
||||
# Grub installation on MBR
|
||||
d-i grub-installer/only_debian boolean true
|
||||
d-i grub-installer/bootdev string /dev/sda
|
||||
|
||||
# No reboot message
|
||||
d-i finish-install/reboot_in_progress note
|
@ -27,18 +27,18 @@ d-i mirror/http/proxy string
|
||||
d-i mirror/suite string trusty
|
||||
|
||||
# Apt-setup additional repos
|
||||
d-i apt-setup/extras boolean false
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/backports boolean true
|
||||
d-i apt-setup/non-free boolean true
|
||||
d-i apt-setup/contrib boolean true
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||
|
||||
# Additional repos
|
||||
d-i apt-setup/multiverse boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/partner boolean true
|
||||
|
||||
# Setup and enable libreoffice PPA
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||
|
||||
@ -47,16 +47,6 @@ d-i apt-setup/local1/repository string http://{{ execpath }}ppa.launchpad.net/a
|
||||
d-i apt-setup/local1/comment string Ansible Official PPA
|
||||
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
||||
|
||||
# Setup and enable epoptes PPA
|
||||
d-i apt-setup/local2/repository string http://{{ execpath }}ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local2/comment string Epoptes stable repository
|
||||
d-i apt-setup/local2/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x2D9B9274D3DF9D7CD7281A3E49F26CB30350B375&op=get
|
||||
|
||||
# Setup and enable geogebra repository
|
||||
d-i apt-setup/local3/repository string http://{{ execpath }}/www.geogebra.net/linux stable main
|
||||
d-i apt-setup/local3/comment string Geogebra Official repository
|
||||
d-i apt-setup/local3/key string http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/office_geogebra.gpg.key
|
||||
|
||||
# Time and date
|
||||
d-i clock-setup/utc boolean true
|
||||
d-i time/zone string Europe/Rome
|
||||
@ -66,7 +56,7 @@ d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
||||
# User creation
|
||||
d-i passwd/user-fullname string BgLUG User
|
||||
d-i passwd/username string bglug
|
||||
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||
d-i passwd/user-password-crypted string $1$33bB/LIt$MEHmvzVIgYRJs/5L4z34L/
|
||||
|
||||
# Partitioning
|
||||
d-i partman-auto/init_automatically_partition select biggest_free
|
||||
@ -84,7 +74,6 @@ d-i user-setup/encrypt-home boolean false
|
||||
|
||||
# Kernel installation
|
||||
d-i base-installer/kernel/image string linux-generic
|
||||
d-i base-installer/kernel/altmeta string lts-xenial
|
||||
|
||||
# Install the Edubuntu desktop.
|
||||
tasksel tasksel/first multiselect edubuntu-desktop-gnome
|
||||
@ -98,7 +87,7 @@ d-i localechooser/translation/warn-light boolean true
|
||||
# Policy to upgrade: none
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# Upgrade after installation: no
|
||||
# UPgrade after installation: no
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
# Language pack selection
|
||||
@ -112,16 +101,16 @@ d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-
|
||||
|
||||
# Adding libreoffice and ansible
|
||||
{% if ansible_bios_version == 'VirtualBox' %}
|
||||
d-i pkgsel/include string epoptes-client dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude geogebra geogebra-gnome gnome-search-tool ocrfeeder openshot freeplane gtk-recordmydesktop vokoscreen virtualbox-guest-dkms
|
||||
d-i pkgsel/include string epoptes-client dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude virtualbox-guest-dkms
|
||||
{% else %}
|
||||
d-i pkgsel/include string epoptes-client dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude geogebra geogebra-gnome gnome-search-tool ocrfeeder openshot freeplane gtk-recordmydesktop vokoscreen
|
||||
d-i pkgsel/include string epoptes-client dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude
|
||||
{% endif %}
|
||||
|
||||
# Post installation tasks
|
||||
# Update system
|
||||
d-i preseed/late_command string in-target apt-get -y upgrade; \
|
||||
in-target apt-get -y dist-upgrade; \
|
||||
in-target apt-get -y purge unity-webapps-common zeitgeist-core zeitgeist-datahub webbrowser-app epoptes; \
|
||||
in-target apt-get -y purge libnss-mdns unity-webapps-common zeitgeist-core zeitgeist-datahub epoptes; \
|
||||
in-target apt-get -y autoremove; \
|
||||
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
||||
in-target /bin/bash -c "/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-client.sh | /bin/bash >/root/postseed.log 2>&1";
|
||||
|
@ -25,21 +25,20 @@ d-i mirror/http/hostname string {{ mirror_host }}
|
||||
d-i mirror/http/directory string {{ mirror_path }}
|
||||
d-i mirror/http/proxy string
|
||||
d-i mirror/suite string trusty
|
||||
d-i mirror/udeb/components multiselect main, restricted, universe, multiverse
|
||||
|
||||
# Apt-setup additional repos
|
||||
d-i apt-setup/extras boolean false
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/backports boolean true
|
||||
d-i apt-setup/non-free boolean true
|
||||
d-i apt-setup/contrib boolean true
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||
|
||||
# Additional repos
|
||||
d-i apt-setup/multiverse boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/partner boolean true
|
||||
|
||||
# Setup and enable libreoffice PPA
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||
|
||||
@ -48,11 +47,6 @@ d-i apt-setup/local1/repository string http://{{ execpath }}ppa.launchpad.net/a
|
||||
d-i apt-setup/local1/comment string Ansible Official PPA
|
||||
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
||||
|
||||
# Setup and enable geogebra repository
|
||||
d-i apt-setup/local2/repository string http://{{ execpath }}/www.geogebra.net/linux stable main
|
||||
d-i apt-setup/local2/comment string Geogebra Official repository
|
||||
d-i apt-setup/local2/key string http://www.geogebra.net/linux/office@geogebra.org.gpg.key.new
|
||||
|
||||
# Time and date
|
||||
d-i clock-setup/utc boolean true
|
||||
d-i time/zone string Europe/Rome
|
||||
@ -62,7 +56,7 @@ d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
||||
# User creation
|
||||
d-i passwd/user-fullname string BgLUG User
|
||||
d-i passwd/username string bglug
|
||||
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||
d-i passwd/user-password-crypted string $1$33bB/LIt$MEHmvzVIgYRJs/5L4z34L/
|
||||
|
||||
# Partitioning
|
||||
d-i partman-auto/init_automatically_partition select biggest_free
|
||||
@ -80,7 +74,6 @@ d-i user-setup/encrypt-home boolean false
|
||||
|
||||
# Kernel installation
|
||||
d-i base-installer/kernel/image string linux-generic
|
||||
d-i base-installer/kernel/altmeta string lts-xenial
|
||||
|
||||
# Install the Edubuntu desktop.
|
||||
tasksel tasksel/first multiselect edubuntu-desktop-gnome
|
||||
@ -94,7 +87,7 @@ d-i localechooser/translation/warn-light boolean true
|
||||
# Policy to upgrade: none
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# Upgrade after installation: no
|
||||
# UPgrade after installation: no
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
# Language pack selection
|
||||
@ -108,16 +101,16 @@ d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-
|
||||
|
||||
# Adding libreoffice and ansible
|
||||
{% if ansible_bios_version == 'VirtualBox' %}
|
||||
d-i pkgsel/include string epoptes-client dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude virtualbox-guest-dkms
|
||||
d-i pkgsel/include string epoptes-client dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude virtualbox-guest-dkms
|
||||
{% else %}
|
||||
d-i pkgsel/include string epoptes-client dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude
|
||||
d-i pkgsel/include string epoptes-client dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude
|
||||
{% endif %}
|
||||
|
||||
# Post installation tasks
|
||||
# Update system
|
||||
d-i preseed/late_command string in-target apt-get -y upgrade; \
|
||||
in-target apt-get -y dist-upgrade; \
|
||||
in-target apt-get -y purge unity-webapps-common zeitgeist-core zeitgeist-datahub epoptes; \
|
||||
in-target apt-get -y purge libnss-mdns unity-webapps-common zeitgeist-core zeitgeist-datahub epoptes; \
|
||||
in-target apt-get -y autoremove; \
|
||||
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
||||
in-target /bin/bash -c "/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-client.sh | /bin/bash >/root/postseed.log 2>&1";
|
||||
|
@ -25,21 +25,20 @@ d-i mirror/http/hostname string {{ mirror_host }}
|
||||
d-i mirror/http/directory string {{ mirror_path }}
|
||||
d-i mirror/http/proxy string
|
||||
d-i mirror/suite string trusty
|
||||
d-i mirror/udeb/components multiselect main, restricted, universe, multiverse
|
||||
|
||||
# Apt-setup additional repos
|
||||
d-i apt-setup/extras boolean false
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/backports boolean true
|
||||
d-i apt-setup/non-free boolean true
|
||||
d-i apt-setup/contrib boolean true
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||
|
||||
# Additional repos
|
||||
d-i apt-setup/multiverse boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/partner boolean true
|
||||
|
||||
# Setup and enable libreoffice PPA
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||
|
||||
@ -48,11 +47,6 @@ d-i apt-setup/local1/repository string http://{{ execpath }}ppa.launchpad.net/a
|
||||
d-i apt-setup/local1/comment string Ansible Official PPA
|
||||
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
||||
|
||||
# Setup and enable geogebra repository
|
||||
d-i apt-setup/local2/repository string http://{{ execpath }}/www.geogebra.net/linux stable main
|
||||
d-i apt-setup/local2/comment string Geogebra Official repository
|
||||
d-i apt-setup/local2/key string http://www.geogebra.net/linux/office@geogebra.org.gpg.key.new
|
||||
|
||||
# Time and date
|
||||
d-i clock-setup/utc boolean true
|
||||
d-i time/zone string Europe/Rome
|
||||
@ -62,7 +56,7 @@ d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
||||
# User creation
|
||||
d-i passwd/user-fullname string BgLUG User
|
||||
d-i passwd/username string bglug
|
||||
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||
d-i passwd/user-password-crypted string $1$33bB/LIt$MEHmvzVIgYRJs/5L4z34L/
|
||||
|
||||
# Partitioning
|
||||
d-i partman-auto/init_automatically_partition select biggest_free
|
||||
@ -80,7 +74,6 @@ d-i user-setup/encrypt-home boolean false
|
||||
|
||||
# Kernel installation
|
||||
d-i base-installer/kernel/image string linux-generic
|
||||
d-i base-installer/kernel/altmeta lts-xenial
|
||||
|
||||
# Install the Edubuntu desktop.
|
||||
tasksel tasksel/first multiselect edubuntu-desktop-gnome
|
||||
@ -94,7 +87,7 @@ d-i localechooser/translation/warn-light boolean true
|
||||
# Policy to upgrade: none
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# Upgrade after installation: no
|
||||
# UPgrade after installation: no
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
# Language pack selection
|
||||
@ -108,16 +101,16 @@ d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-
|
||||
|
||||
# Adding libreoffice and ansible
|
||||
{% if ansible_bios_version == 'VirtualBox' %}
|
||||
d-i pkgsel/include string epoptes dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude virtualbox-guest-dkms
|
||||
d-i pkgsel/include string epoptes dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude virtualbox-guest-dkms
|
||||
{% else %}
|
||||
d-i pkgsel/include string epoptes dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude
|
||||
d-i pkgsel/include string epoptes dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude
|
||||
{% endif %}
|
||||
|
||||
# Post installation tasks
|
||||
# Update system
|
||||
d-i preseed/late_command string in-target apt-get -y upgrade; \
|
||||
in-target apt-get -y dist-upgrade; \
|
||||
in-target apt-get -y purge unity-webapps-common zeitgeist-core zeitgeist-datahub epoptes-client; \
|
||||
in-target apt-get -y purge libnss-mdns unity-webapps-common zeitgeist-core zeitgeist-datahub epoptes-client; \
|
||||
in-target apt-get -y autoremove; \
|
||||
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
||||
in-target bash -c "/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-docenti.sh | /bin/bash >/root/postseed.log 2>&1";
|
||||
|
@ -27,18 +27,18 @@ d-i mirror/http/proxy string
|
||||
d-i mirror/suite string trusty
|
||||
|
||||
# Apt-setup additional repos
|
||||
d-i apt-setup/extras boolean false
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/backports boolean true
|
||||
d-i apt-setup/non-free boolean true
|
||||
d-i apt-setup/contrib boolean true
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||
|
||||
# Additional repos
|
||||
d-i apt-setup/multiverse boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/partner boolean true
|
||||
|
||||
# Setup and enable libreoffice PPA
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||
|
||||
@ -47,16 +47,6 @@ d-i apt-setup/local1/repository string http://{{ execpath }}ppa.launchpad.net/a
|
||||
d-i apt-setup/local1/comment string Ansible Official PPA
|
||||
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get
|
||||
|
||||
# Setup and enable epoptes PPA
|
||||
d-i apt-setup/local2/repository string http://{{ execpath }}ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local2/comment string Epoptes stable repository
|
||||
d-i apt-setup/local2/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x2D9B9274D3DF9D7CD7281A3E49F26CB30350B375&op=get
|
||||
|
||||
# Setup and enable geogebra repository
|
||||
d-i apt-setup/local3/repository string http://{{ execpath }}/www.geogebra.net/linux stable main
|
||||
d-i apt-setup/local3/comment string Geogebra Official repository
|
||||
d-i apt-setup/local3/key string http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/office_geogebra.gpg.key
|
||||
|
||||
# Time and date
|
||||
d-i clock-setup/utc boolean true
|
||||
d-i time/zone string Europe/Rome
|
||||
@ -66,7 +56,7 @@ d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
||||
# User creation
|
||||
d-i passwd/user-fullname string BgLUG User
|
||||
d-i passwd/username string bglug
|
||||
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||
d-i passwd/user-password-crypted string $1$33bB/LIt$MEHmvzVIgYRJs/5L4z34L/
|
||||
|
||||
# Partitioning
|
||||
d-i partman-auto/init_automatically_partition select biggest_free
|
||||
@ -84,7 +74,6 @@ d-i user-setup/encrypt-home boolean false
|
||||
|
||||
# Kernel installation
|
||||
d-i base-installer/kernel/image string linux-generic
|
||||
d-i base-installer/kernel/altmeta string lts-xenial
|
||||
|
||||
# Install the Edubuntu desktop.
|
||||
tasksel tasksel/first multiselect edubuntu-desktop-gnome
|
||||
@ -98,7 +87,7 @@ d-i localechooser/translation/warn-light boolean true
|
||||
# Policy to upgrade: none
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# Upgrade after installation: no
|
||||
# UPgrade after installation: no
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
# Language pack selection
|
||||
@ -112,16 +101,16 @@ d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-
|
||||
|
||||
# Adding libreoffice and ansible
|
||||
{% if ansible_bios_version == 'VirtualBox' %}
|
||||
d-i pkgsel/include string epoptes dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude geogebra geogebra-gnome gnome-search-tool ocrfeeder openshot freeplane gtk-recordmydesktop vokoscreen virtualbox-guest-dkms
|
||||
d-i pkgsel/include string epoptes dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude virtualbox-guest-dkms
|
||||
{% else %}
|
||||
d-i pkgsel/include string epoptes dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-{{ edu_package }} python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude geogebra geogebra-gnome gnome-search-tool ocrfeeder openshot freeplane gtk-recordmydesktop vokoscreen
|
||||
d-i pkgsel/include string epoptes dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary python3-uno libreoffice ansible libnss-myhostname sysv-rc-conf unattended-upgrades update-notifier-common aptitude
|
||||
{% endif %}
|
||||
|
||||
# Post installation tasks
|
||||
# Update system
|
||||
d-i preseed/late_command string in-target apt-get -y upgrade; \
|
||||
in-target apt-get -y dist-upgrade; \
|
||||
in-target apt-get -y purge unity-webapps-common zeitgeist-core zeitgeist-datahub webbrowser-app epoptes-client; \
|
||||
in-target apt-get -y purge libnss-mdns unity-webapps-common zeitgeist-core zeitgeist-datahub epoptes-client; \
|
||||
in-target apt-get -y autoremove; \
|
||||
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
||||
in-target bash -c "/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-docenti.sh | /bin/bash >/root/postseed.log 2>&1";
|
||||
|
@ -28,17 +28,18 @@ d-i mirror/http/proxy string
|
||||
d-i mirror/suite string trusty
|
||||
|
||||
# Apt-setup additional repos
|
||||
d-i apt-setup/extras boolean true
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/backports boolean true
|
||||
d-i apt-setup/non-free boolean true
|
||||
d-i apt-setup/contrib boolean true
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
d-i apt-setup/security_host string {{ mirror_security_host }}
|
||||
d-i apt-setup/security_path string {{ mirror_security_path }}
|
||||
|
||||
# Additional repos
|
||||
d-i apt-setup/restricted boolean true
|
||||
d-i apt-setup/universe boolean true
|
||||
d-i apt-setup/multiverse boolean true
|
||||
|
||||
# Setup and enable libreoffice PPA
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
d-i apt-setup/local0/repository string http://{{ execpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
d-i apt-setup/local0/comment string LibreOffice Official PPA
|
||||
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get
|
||||
|
||||
@ -69,7 +70,6 @@ d-i user-setup/encrypt-home boolean false
|
||||
|
||||
# Kernel installation
|
||||
d-i base-installer/kernel/image string linux-generic
|
||||
d-i base-installer/kernel/altmeta string lts-xenial
|
||||
|
||||
# Install the Edubuntu desktop.
|
||||
tasksel tasksel/first multiselect edubuntu-desktop-gnome
|
||||
@ -83,7 +83,7 @@ d-i localechooser/translation/warn-light boolean true
|
||||
# Policy to upgrade: none
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# Upgrade after installation: no
|
||||
# UPgrade after installation: no
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
# Language pack selection
|
||||
@ -97,16 +97,16 @@ d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-
|
||||
|
||||
# Adding libreoffice and ansible
|
||||
{% if ansible_bios_version == 'VirtualBox' %}
|
||||
d-i pkgsel/include string openssh-server libreoffice ansible vim screen git curl cifs-utils ubuntu-edu-{{ edu_package }} libnss-myhostname geogebra geogebra-gnome sysv-rc-conf virtualbox-guest-dkms
|
||||
d-i pkgsel/include string openssh-server libreoffice ansible vim screen git curl cifs-utils ubuntu-edu-secondary libnss-myhostname geogebra geogebra-gnome sysv-rc-conf virtualbox-guest-dkms
|
||||
{% else %}
|
||||
d-i pkgsel/include string openssh-server libreoffice ansible vim screen git curl cifs-utils ubuntu-edu-{{ edu_package }} libnss-myhostname geogebra geogebra-gnome sysv-rc-conf
|
||||
d-i pkgsel/include string openssh-server libreoffice ansible vim screen git curl cifs-utils ubuntu-edu-secondary libnss-myhostname geogebra geogebra-gnome sysv-rc-conf
|
||||
{% endif %}
|
||||
|
||||
# Post installation tasks
|
||||
# Update system
|
||||
d-i preseed/late_command string in-target apt-get -y upgrade; \
|
||||
in-target apt-get -y dist-upgrade; \
|
||||
in-target apt-get -y purge unity-webapps-common zeitgeist-core zeitgeist-datahub; \
|
||||
in-target apt-get -y purge libnss-mdns unity-webapps-common zeitgeist-core zeitgeist-datahub; \
|
||||
in-target apt-get -y autoremove; \
|
||||
in-target sed -i'' -e 's/ubuntu/gnome-fallback/g' /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Cambio username con quello fornito da servizio
|
||||
TARGETHOSTNAME=$(/usr/bin/wget -qO- http://{{ ansible_local.domain.serverfqdn }}:3000/whatsmyhostname?role=aula)
|
||||
echo $TARGETHOSTNAME > /etc/hostname
|
||||
/bin/sed -i'' -e "s/kickseed/$TARGETHOSTNAME/g" /etc/hosts
|
||||
|
||||
# Installo i file necessari per ansible.
|
||||
/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/init-ansible.sh | /bin/bash
|
27
roles/preseed/templates/preseed/pulseaudio-perms.sh
Executable file
27
roles/preseed/templates/preseed/pulseaudio-perms.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
domaingroup="domain users"
|
||||
localgroups="pulse pulse-access"
|
||||
|
||||
baseusers="bglug"
|
||||
domainusers="$(getent group "${domaingroup}" | awk 'BEGIN { FS = ":" } ; { print $4 }' | sed -e 's/,/ /g')"
|
||||
|
||||
users="${baseusers} ${domainusers}"
|
||||
|
||||
for group in ${localgroups}; do
|
||||
actualusers=$(getent group '${group}' | awk 'BEGIN { FS = ":" }; { print $4 }' | sed -e 's/,/ /g')
|
||||
|
||||
# Removing users not in the group
|
||||
for user in ${actualusers}; do
|
||||
whuser=${user//[[:space:]]/}
|
||||
echo "removing ${user}"
|
||||
[[ "${users}" =~ "${whuser}" ]] || gpasswd -d "${whuser}" "${group}"
|
||||
unset whuser
|
||||
done
|
||||
|
||||
# Adding users to group
|
||||
for user in ${users}; do
|
||||
whuser=${user//[[:space:]]/}
|
||||
[[ "${actualusers}" =~ "${whuser}" ]] || gpasswd -a "${whuser}" "${group}"
|
||||
done
|
||||
done
|
@ -1,3 +0,0 @@
|
||||
# Repo BgLUG
|
||||
deb http://{{ execpath }}repo.bglug.it/ubuntu trusty main
|
||||
#deb-src http://{{ execpath }}repo.bglug.it/ubuntu trusty main
|
@ -1,2 +0,0 @@
|
||||
deb http://{{ execpath }}ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
||||
#deb-src http://{{ execpath }}ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
@ -1 +0,0 @@
|
||||
deb http://{{ execpath }}www.geogebra.net/linux stable main
|
@ -1,2 +0,0 @@
|
||||
deb http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
#deb-src http://{{ execpath }}ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
@ -1,19 +0,0 @@
|
||||
# Base repositories for Ubuntu 14.04 - Trusty Tahr
|
||||
deb http://{{ mirror_host }}{{ mirror_path }} trusty main restricted universe multiverse
|
||||
deb http://{{ mirror_host }}{{ mirror_path }} trusty-security main restricted universe multiverse
|
||||
deb http://{{ mirror_host }}{{ mirror_path }} trusty-updates main restricted universe multiverse
|
||||
deb http://{{ mirror_host }}{{ mirror_path }} trusty-backports main restricted universe multiverse
|
||||
|
||||
# Sources
|
||||
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty main restricted universe multiverse
|
||||
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty-security main restricted universe multiverse
|
||||
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty-updates main restricted universe multiverse
|
||||
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty-backports main restricted universe multiverse
|
||||
|
||||
# Security
|
||||
deb http://{{ mirror_security_host }}{{ mirror_security_path }} trusty-security main restricted universe multiverse
|
||||
#deb-src http://{{ mirror_security_host }}{{ mirror_security_path }} trusty-security main restricted universe multiverse
|
||||
|
||||
# Extras
|
||||
deb http://{{ execpath }}extras.ubuntu.com/ubuntu trusty main
|
||||
deb http://{{ execpath }}archive.canonical.com/ trusty partner
|
@ -13,7 +13,7 @@
|
||||
|
||||
- name: pxelinux.0
|
||||
get_url:
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/utopic-netboot/pxelinux.0"
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-i386/current/images/netboot/pxelinux.0"
|
||||
dest: /var/lib/tftpboot/pxelinux.0
|
||||
|
||||
- name: pxelinux.cfg/default
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
- name: vesamenu.c32
|
||||
get_url:
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-i386/current/images/netboot/ubuntu-installer/i386/boot-screens/vesamenu.c32"
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-i386/current/images/netboot/ubuntu-installer/i386/boot-screens/vesamenu.c32"
|
||||
dest: /var/lib/tftpboot/utils/vesamenu.c32
|
||||
|
||||
- name: chain.c32
|
||||
@ -45,22 +45,22 @@
|
||||
|
||||
- name: linux i386
|
||||
get_url:
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-i386/current/images/netboot/ubuntu-installer/i386/linux"
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-i386/current/images/netboot/ubuntu-installer/i386/linux"
|
||||
dest: /var/lib/tftpboot/ubuntu/14.04/i386/linux
|
||||
|
||||
- name: initrd.gz i386
|
||||
get_url:
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-i386/current/images/netboot/ubuntu-installer/i386/initrd.gz"
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-i386/current/images/netboot/ubuntu-installer/i386/initrd.gz"
|
||||
dest: /var/lib/tftpboot/ubuntu/14.04/i386/initrd.gz
|
||||
|
||||
- name: linux amd64
|
||||
get_url:
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux"
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux"
|
||||
dest: /var/lib/tftpboot/ubuntu/14.04/amd64/linux
|
||||
|
||||
- name: initrd.gz amd64
|
||||
get_url:
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz"
|
||||
url: "http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz"
|
||||
dest: /var/lib/tftpboot/ubuntu/14.04/amd64/initrd.gz
|
||||
|
||||
- name: memdisk
|
||||
|
@ -14,8 +14,8 @@
|
||||
|
||||
- name: Configuring TFTP
|
||||
shell: /sbin/e-smith/db configuration setprop dnsmasq tftp-status enabled dhcp-boot pxelinux.0
|
||||
when: chk_tftp_enabled is changed
|
||||
when: chk_tftp_enabled|changed
|
||||
|
||||
- name: Activating tftp
|
||||
shell: /sbin/e-smith/signal-event nethserver-dnsmasq-save
|
||||
when: chk_tftp_enabled is changed
|
||||
when: chk_tftp_enabled|changed
|
||||
|
@ -56,28 +56,6 @@ LABEL return-docenti
|
||||
MENU EXIT
|
||||
MENU END
|
||||
|
||||
MENU BEGIN
|
||||
MENU TITLE Installa nuova macchina AULA
|
||||
|
||||
LABEL aula-32bit
|
||||
MENU LABEL ^32 bit
|
||||
LINUX /ubuntu/14.04/i386/linux
|
||||
INITRD /ubuntu/14.04/i386/initrd.gz
|
||||
APPEND vga=normal auto=true hostname=kickseed url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/aula-trusty.seed -- quiet
|
||||
|
||||
LABEL aula-64bit
|
||||
MENU LABEL ^64 bit
|
||||
LINUX /ubuntu/14.04/amd64/linux
|
||||
INITRD /ubuntu/14.04/amd64/initrd.gz
|
||||
APPEND vga=normal auto=true hostname=kickseed url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/aula-trusty.seed -- quiet
|
||||
|
||||
MENU SEPARATOR
|
||||
|
||||
LABEL return-aula
|
||||
MENU LABEL ^Torna al menu principale
|
||||
MENU EXIT
|
||||
MENU END
|
||||
|
||||
MENU SEPARATOR
|
||||
|
||||
MENU BEGIN
|
||||
|
@ -1,35 +0,0 @@
|
||||
---
|
||||
# Cambio nome interfacce
|
||||
|
||||
- name: Removing old interface names
|
||||
file:
|
||||
path: /etc/udev/rules.d/70-persistent-net.rules
|
||||
state: absent
|
||||
become: yes
|
||||
|
||||
- name: Forcing recreation of {{ extnic }}
|
||||
shell: "INTERFACE=eth0 MATCHADDR={{ ansible_eth0.macaddress }} INTERFACE_NAME={{ extnic }} /lib/udev/write_net_rules"
|
||||
become: yes
|
||||
|
||||
- name: Forcing recreation of {{ intnic }}
|
||||
shell: "INTERFACE=eth1 MATCHADDR={{ ansible_eth1.macaddress }} INTERFACE_NAME={{ intnic }} /lib/udev/write_net_rules"
|
||||
become: yes
|
||||
|
||||
- name: Pulizia vecchie interfacce
|
||||
shell: "/sbin/e-smith/db networks delete {{ item }}"
|
||||
become: yes
|
||||
with_items:
|
||||
- eth0
|
||||
- eth1
|
||||
|
||||
- name: Creo interfaccia esterna in NethServer
|
||||
shell: /sbin/e-smith/db networks set {{ extnic }} ethernet bootproto dhcp device {{ extnic }} hwaddr {{ ansible_eth0.macaddress }} onboot yes peerdns yes role red
|
||||
become: yes
|
||||
|
||||
- name: Creo interfaccia interna in NethServer
|
||||
shell: /sbin/e-smith/db networks set {{ intnic }} ethernet bootproto none device {{ intnic }} hwaddr {{ ansible_eth1.macaddress }} ipaddr 172.16.254.1 netmask 255.255.255.0 onboot yes role green
|
||||
become: yes
|
||||
|
||||
- name: Trigger interfaces configuration
|
||||
shell: "ifdown eth0; ifdown eth1; udevadm control --reload-rules && udevadm trigger; /sbin/e-smith/signal-event interface-update"
|
||||
become: yes
|
@ -20,10 +20,10 @@
|
||||
|
||||
- name: Installazione python-argparse
|
||||
yum:
|
||||
name: python-argparse
|
||||
name: "ftp://fr2.rpmfind.net/linux/centos/6.7/extras/i386/Packages/python-argparse-1.2.1-2.el6.centos.noarch.rpm"
|
||||
state: present
|
||||
become: yes
|
||||
when: check_argparse is changed
|
||||
when: check_argparse|changed
|
||||
tags: ansible
|
||||
|
||||
#- name: Download della gestione client con ansible
|
||||
|
@ -9,7 +9,7 @@
|
||||
- name: Installo epel-release
|
||||
yum: name=epel-release state=present
|
||||
become: yes
|
||||
when: check_epel is failed
|
||||
when: check_epel|failed
|
||||
register: epel_installed
|
||||
ignore_errors: yes
|
||||
|
||||
@ -18,20 +18,20 @@
|
||||
name: "http://dl.fedoraproject.org/pub/epel/6/{{ ansible_architecture }}/epel-release-6-8.noarch.rpm"
|
||||
state: present
|
||||
become: yes
|
||||
when: epel_installed is failed
|
||||
when: epel_installed|failed
|
||||
register: rpm_epel_installed
|
||||
|
||||
- name: Abilito il repo EPEL
|
||||
shell: yum-config-manager --enable epel
|
||||
become: yes
|
||||
when: epel_installed is changed or epel_installed is succeeded or rpm_epel_installed is changed
|
||||
when: epel_installed|changed or epel_installed|success or rpm_epel_installed|changed
|
||||
changed_when: "'[epel]' in epel_enabled.stdout and epel_enabled.rc == 0"
|
||||
register: epel_enabled
|
||||
|
||||
- name: Pulizia e ricaricam. repo
|
||||
shell: yum clean all && yum repolist
|
||||
become: yes
|
||||
when: epel_enabled is changed
|
||||
when: epel_enabled|changed
|
||||
tags: repo
|
||||
|
||||
- name: Aggiorno il sistema
|
||||
|
@ -8,11 +8,16 @@
|
||||
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
|
||||
- name: Locking nethserver-release version to 6.6
|
||||
shell: yum versionlock add nethserver-release
|
||||
when: chk_locked_nethrelease is changed
|
||||
when: chk_locked_nethrelease|changed
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
- name: Creazione directory .ssh
|
||||
shell: mkdir -p $HOME/.ssh
|
||||
when: check_sshdir is failed
|
||||
when: check_sshdir|failed
|
||||
|
||||
- name: Verifica chiave ssh
|
||||
shell: test -f $HOME/.ssh/id_rsa
|
||||
@ -17,4 +17,4 @@
|
||||
|
||||
- name: Gestione creazione chiave ssh
|
||||
shell: ssh-keygen -t rsa -b 1024 -f $HOME/.ssh/id_rsa -N ''
|
||||
when: check_key is failed
|
||||
when: check_key|failed
|
||||
|
@ -16,3 +16,4 @@
|
||||
- name: Determining mirror_security_path
|
||||
set_fact: spath="{{ ansible_local.domain.mirror_security_path }}"
|
||||
when: ansible_local.domain.mirror_security_path is defined
|
||||
|
||||
|
@ -23,14 +23,14 @@
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
when: chk_mount_nfs is changed
|
||||
when: chk_mount_nfs|changed
|
||||
|
||||
- name: Adding mountpoint to fstab
|
||||
lineinfile:
|
||||
dest: /etc/fstab
|
||||
line: "{{ ansible_local.domain.mirror_nfs_share }} /var/spool/apt-mirror/mirror nfs4 defaults 0 0"
|
||||
when: chk_mount_nfs is changed
|
||||
when: chk_mount_nfs|changed
|
||||
|
||||
- name: Mounting share
|
||||
shell: mount /var/spool/apt-mirror/mirror
|
||||
when: chk_mount_nfs is changed
|
||||
when: chk_mount_nfs|changed
|
||||
|
@ -1,2 +1,3 @@
|
||||
---
|
||||
# Managing a remote mirror - Doing nothing ;)
|
||||
|
||||
|
@ -22,26 +22,31 @@ set _tilde 0
|
||||
deb-i386 http://{{ host }}{{ path }} trusty main restricted universe multiverse
|
||||
deb-i386 http://{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
||||
deb-i386 http://{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
||||
deb-i386 http://{{ host }}{{ path }} trusty-proposed main restricted universe multiverse
|
||||
deb-i386 http://{{ host }}{{ path }} trusty-backports main restricted universe multiverse
|
||||
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty main restricted universe multiverse
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty-proposed main restricted universe multiverse
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty-backports main restricted universe multiverse
|
||||
|
||||
deb-src http://{{ host }}{{ path }} trusty main restricted universe multiverse
|
||||
deb-src http://{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
||||
deb-src http://{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
||||
deb-src http://{{ host }}{{ path }} trusty-proposed main restricted universe multiverse
|
||||
deb-src http://{{ host }}{{ path }} trusty-backports main restricted universe multiverse
|
||||
|
||||
deb-i386 http://{{ host }}{{ path }} trusty main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-i386 http://{{ host }}{{ path }} trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-i386 http://{{ host }}{{ path }} trusty-updates main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-i386 http://{{ host }}{{ path }} trusty-proposed main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-i386 http://{{ host }}{{ path }} trusty-backports main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty-updates main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty-proposed main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
deb-amd64 http://{{ host }}{{ path }} trusty-backports main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
|
||||
deb-i386 http://extras.ubuntu.com/ubuntu trusty main
|
||||
@ -49,8 +54,10 @@ deb-amd64 http://extras.ubuntu.com/ubuntu trusty main
|
||||
deb-src http://extras.ubuntu.com/ubuntu trusty main
|
||||
|
||||
deb-i386 http://archive.canonical.com/ trusty partner
|
||||
deb-i386 http://archive.canonical.com/ trusty-proposed partner
|
||||
|
||||
deb-amd64 http://archive.canonical.com/ trusty partner
|
||||
deb-amd64 http://archive.canonical.com/ trusty-proposed partner
|
||||
|
||||
deb-i386 http://{{ shost }}{{ spath }} trusty-security main restricted universe multiverse
|
||||
deb-i386 http://{{ shost }}{{ spath }} trusty-security main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
|
||||
@ -63,19 +70,9 @@ deb-i386 http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
deb-amd64 http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
||||
|
||||
# LibreOffice PPA
|
||||
deb-i386 http://ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
deb-amd64 http://ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
deb-src http://ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
|
||||
|
||||
# Epoptes stable
|
||||
deb-i386 http://ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
||||
deb-amd64 http://ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
||||
deb-src http://ppa.launchpad.net/epoptes/ppa/ubuntu trusty main
|
||||
|
||||
# Geogebra Official repository
|
||||
deb-i386 http://www.geogebra.net/linux stable main
|
||||
deb-amd64 http://www.geogebra.net/linux stable main
|
||||
deb-src http://www.geogebra.net/linux stable main
|
||||
deb-i386 http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
deb-amd64 http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
deb-src http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main
|
||||
|
||||
# BgLUG
|
||||
deb-i386 http://repo.bglug.it/ubuntu trusty main
|
||||
@ -87,7 +84,5 @@ clean http://extras.ubuntu.com/ubuntu
|
||||
clean http://archive.canonical.com
|
||||
clean http://{{ shost }}{{ spath }}
|
||||
clean http://ppa.launchpad.net/ansible/ansible/ubuntu
|
||||
clean http://ppa.launchpad.net/libreoffice/ppa/ubuntu
|
||||
clean http://ppa.launchpad.net/epoptes/ppa/ubuntu
|
||||
clean http://www.geogebra.net/linux
|
||||
clean http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu
|
||||
clean http://repo.bglug.it/ubuntu
|
||||
|
3
vagrant/hosts
Normal file
3
vagrant/hosts
Normal file
@ -0,0 +1,3 @@
|
||||
# Generated by Vagrant
|
||||
[vagrant]
|
||||
NethServer ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user=vagrant
|
40
vagrant/roles/rename-nic/tasks/rename-nic.yml
Normal file
40
vagrant/roles/rename-nic/tasks/rename-nic.yml
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
# Cambio nome interfacce
|
||||
- name: Rinomino interfaccia esterna
|
||||
replace:
|
||||
dest: /etc/udev/rules.d/70-persistent-net.rules
|
||||
regexp: 'eth0'
|
||||
replace: '{{ extnic }}'
|
||||
become: yes
|
||||
|
||||
- name: Creo interfaccia esterna in NethServer
|
||||
shell: /sbin/e-smith/db networks set {{ extnic }} ethernet bootproto dhcp device {{ extnic }} hwaddr {{ ansible_eth0.macaddress }} onboot yes peerdns yes role red
|
||||
become: yes
|
||||
|
||||
- name: Pulizia vecchia interfaccia esterna
|
||||
shell: /sbin/e-smith/db networks delete eth0
|
||||
become: yes
|
||||
|
||||
- name: Rinomino interfaccia interna
|
||||
replace:
|
||||
dest: /etc/udev/rules.d/70-persistent-net.rules
|
||||
regexp: 'eth1'
|
||||
replace: '{{ intnic }}'
|
||||
become: yes
|
||||
|
||||
- name: Creo interfaccia interna in NethServer
|
||||
shell: /sbin/e-smith/db networks set {{ intnic }} ethernet bootproto none device {{ intnic }} hwaddr {{ ansible_eth1.macaddress }} ipaddr 192.168.1.1 netmask 255.255.255.0 onboot yes role green
|
||||
become: yes
|
||||
|
||||
- name: Pulizia vecchia interfaccia interna
|
||||
shell: /sbin/e-smith/db networks delete eth1
|
||||
become: yes
|
||||
|
||||
# Forzo il processo a tornare zero, altrimenti non va.
|
||||
- name: Ricreo le interfacce
|
||||
shell: udevadm control --reload-rules && udevadm trigger --attr-match=subsystem=net
|
||||
become: yes
|
||||
|
||||
- name: Segnalo il cambiamento a livello di interfacce
|
||||
shell: /sbin/e-smith/signal-event interface-update
|
||||
become: yes
|
@ -2,4 +2,4 @@
|
||||
# Vagrant provisioning playbook
|
||||
- hosts: vagrant
|
||||
roles:
|
||||
- rename-nic
|
||||
- rename-nic
|
Loading…
x
Reference in New Issue
Block a user