Compare commits
31 Commits
caravaggio
...
master
Author | SHA1 | Date | |
---|---|---|---|
2b85700990 | |||
a2e013674b | |||
3f421afbbe | |||
ed018db4c2 | |||
44a5ca6bae | |||
e72883abb5 | |||
bcb583cd84 | |||
14d50a0e07 | |||
8ec091bcbf | |||
81873ef6cb | |||
604460a6bd | |||
c769d5c4a4 | |||
965f7c90c4 | |||
65b2923b71 | |||
2881d042d9 | |||
0dbe53a796 | |||
3a0035c61e | |||
df1dcc532b | |||
baa5cd96c3 | |||
125c72e136 | |||
4fc6036eae | |||
02dd0eed95 | |||
782a0c4204 | |||
25695acc50 | |||
c32f5de1ea | |||
cf477c4476 | |||
|
1f502ec7d0 | ||
f62afbe30c | |||
9f144a497b | |||
dfadfe7ee7 | |||
638b753ee1 |
14
Vagrantfile
vendored
14
Vagrantfile
vendored
@ -10,12 +10,16 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
# please see the online documentation at vagrantup.com.
|
# please see the online documentation at vagrantup.com.
|
||||||
|
|
||||||
# Every Vagrant virtual environment requires a box to build off of.
|
# 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 = "syntaxerrormmm/nethserver-6.9"
|
||||||
config.vm.box_url = "https://vagrant.libreschool.org/nethserver-6.9"
|
config.vm.box_url = "https://vagrant.libreschool.org/nethserver-6.9"
|
||||||
config.vm.define "NethServer" do |nethserver|
|
config.vm.define myname do |nethserver|
|
||||||
end
|
end
|
||||||
config.vm.provider :virtualbox do |vb|
|
config.vm.provider :virtualbox do |vb|
|
||||||
vb.name = "NethServer"
|
vb.name = myname
|
||||||
end
|
end
|
||||||
|
|
||||||
# Disable automatic box update checking. If you disable this, then
|
# Disable automatic box update checking. If you disable this, then
|
||||||
@ -127,7 +131,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
#
|
#
|
||||||
# chef.validation_client_name = "ORGNAME-validator"
|
# chef.validation_client_name = "ORGNAME-validator"
|
||||||
config.vm.provision "ansible" do |ansible|
|
config.vm.provision "ansible" do |ansible|
|
||||||
ansible.inventory_path = "provision_hosts"
|
# Using default dynamic inventory
|
||||||
ansible.playbook = "provision.yml"
|
ansible.playbook = "provision.yml"
|
||||||
|
ansible.groups = {
|
||||||
|
"vagrant" => [ myname ]
|
||||||
|
}
|
||||||
|
ansible.compatibility_mode = "2.0"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
40
domain.yml
40
domain.yml
@ -1,25 +1,31 @@
|
|||||||
---
|
---
|
||||||
# Configurazione dominio
|
# Configurazione dominio
|
||||||
ntpserver: pdc.mastri.edu
|
ntpserver: pdc.topolin.ia
|
||||||
server: pdc
|
server: pdc
|
||||||
serverip: 192.168.1.1
|
serverip: 172.16.254.1
|
||||||
servernetmask: 255.255.255.0
|
servernetmask: 255.255.255.0
|
||||||
servernet: 192.168.1.0
|
servernet: 172.16.254.0
|
||||||
servergw: 192.168.1.1
|
servergw: 172.16.254.1
|
||||||
serverfqdn: pdc.mastri.edu
|
serverfqdn: pdc.topolin.ia
|
||||||
domainshort: MASTRI
|
domainshort: TOPOLIN
|
||||||
domainfull: mastri.edu
|
domainfull: topolin.ia
|
||||||
dhcprange_start: 192.168.1.10
|
dhcprange_start: 172.16.254.10
|
||||||
dhcprange_end: 192.168.1.50
|
dhcprange_end: 172.16.254.50
|
||||||
extdnsserver1: 208.67.222.222
|
extdnsserver1: 208.67.222.222
|
||||||
extdnsserver2: 208.67.220.220
|
extdnsserver2: 208.67.220.220
|
||||||
org_email: info@bglug.it
|
org_email: info@bglug.it
|
||||||
org_company: Istituto Comprensivo 'Mastri Caravaggini'
|
org_company: Accademia di SuperPippo
|
||||||
org_countrycode: IT
|
org_countrycode: IA
|
||||||
org_department: "Laboratorio 1"
|
org_department: "Laboratorio 1"
|
||||||
org_city: Caravaggio
|
org_city: Topolinia
|
||||||
org_phone: "+39 0363 50598"
|
org_phone: "313 113 176-167"
|
||||||
org_street: "Via Zenale e Butinone, 20"
|
org_street: "Piazza la bomba e scappa"
|
||||||
mirror_mode: local
|
edu_package: secondary
|
||||||
#remote_mirror: ubuntu.fastbull.org
|
mirror_mode: remote
|
||||||
client_gitbranch: caravaggio
|
#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
|
||||||
|
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
|
host_key_checking=false
|
||||||
|
|
||||||
[server]
|
[server]
|
||||||
192.168.1.1 ansible_ssh_user=amgmt
|
172.16.254.1 ansible_ssh_user=amgmt
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
# Generated by Vagrant
|
|
||||||
[vagrant]
|
|
||||||
NethServer ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user=vagrant
|
|
@ -1,14 +1,26 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# Creo directory dipendenti
|
||||||
echo "$(date --rfc-3339=seconds) Installing bin directory."
|
echo "$(date --rfc-3339=seconds) Installing bin directory."
|
||||||
/usr/bin/install -d -o root -g users /var/lib/{{ ansible_local.domain.domainfull }}/bin
|
/usr/bin/install -d -o root -g users ${basedir}/bin
|
||||||
/bin/chown -R root:users /var/lib/{{ ansible_local.domain.domainfull }}
|
|
||||||
|
# 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
|
||||||
|
|
||||||
# Installo ansible-pull.sh
|
# Installo ansible-pull.sh
|
||||||
echo "$(date --rfc-3339=seconds) Creating 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 /var/lib/{{ ansible_local.domain.domainfull }}/bin/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 /var/lib/{{ ansible_local.domain.domainfull }}/bin/ansible-pull.sh
|
chmod a+x ${basedir}/bin/ansible-pull.sh
|
||||||
|
|
||||||
|
# Fixing permissions on the main directory
|
||||||
|
/bin/chown -R root:users ${basedir}
|
||||||
|
|
||||||
# Installo il cronjob per ansible-pull
|
# Installo il cronjob per ansible-pull
|
||||||
echo "$(date --rfc-3339=seconds) Creating crontab"
|
echo "$(date --rfc-3339=seconds) Creating crontab"
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
shell: pushd /var/lib/git-daemon/repositories/client-pull-installation.git; git fetch -p origin; popd
|
shell: pushd /var/lib/git-daemon/repositories/client-pull-installation.git; git fetch -p origin; popd
|
||||||
become: yes
|
become: yes
|
||||||
become_user: git-daemon
|
become_user: git-daemon
|
||||||
when: chk_clientpullinstall_repo|success
|
when: chk_clientpullinstall_repo is succeeded
|
||||||
tags:
|
tags:
|
||||||
- git-daemon-update
|
- git-daemon-update
|
||||||
|
|
||||||
@ -51,7 +51,7 @@
|
|||||||
shell: git clone --mirror {{ client_gitrepo }} /var/lib/git-daemon/repositories/client-pull-installation.git
|
shell: git clone --mirror {{ client_gitrepo }} /var/lib/git-daemon/repositories/client-pull-installation.git
|
||||||
become: yes
|
become: yes
|
||||||
become_user: git-daemon
|
become_user: git-daemon
|
||||||
when: chk_clientpullinstall_repo|changed
|
when: chk_clientpullinstall_repo is changed
|
||||||
|
|
||||||
- name: Rendo il repository esportabile
|
- name: Rendo il repository esportabile
|
||||||
file:
|
file:
|
||||||
@ -94,7 +94,7 @@
|
|||||||
- name: Aggiungo servizio a gestione NethServer
|
- name: Aggiungo servizio a gestione NethServer
|
||||||
shell: /sbin/e-smith/db configuration set git-daemon service status enabled TCPPort 9418 access private
|
shell: /sbin/e-smith/db configuration set git-daemon service status enabled TCPPort 9418 access private
|
||||||
become: yes
|
become: yes
|
||||||
when: chk_gitdaemon_srv|changed
|
when: chk_gitdaemon_srv is changed
|
||||||
|
|
||||||
- name: Creazione directory defaults per NethServer
|
- name: Creazione directory defaults per NethServer
|
||||||
file:
|
file:
|
||||||
@ -102,7 +102,7 @@
|
|||||||
recurse: yes
|
recurse: yes
|
||||||
state: directory
|
state: directory
|
||||||
become: yes
|
become: yes
|
||||||
when: chk_gitdaemon_srv|changed
|
when: chk_gitdaemon_srv is changed
|
||||||
|
|
||||||
- name: Creazione tipo default per NethServer
|
- name: Creazione tipo default per NethServer
|
||||||
lineinfile:
|
lineinfile:
|
||||||
@ -112,7 +112,7 @@
|
|||||||
create: yes
|
create: yes
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: yes
|
||||||
when: chk_gitdaemon_srv|changed
|
when: chk_gitdaemon_srv is changed
|
||||||
|
|
||||||
- name: Creazione stato default per NethServer
|
- name: Creazione stato default per NethServer
|
||||||
lineinfile:
|
lineinfile:
|
||||||
@ -122,19 +122,19 @@
|
|||||||
create: yes
|
create: yes
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: yes
|
||||||
when: chk_gitdaemon_srv|changed
|
when: chk_gitdaemon_srv is changed
|
||||||
|
|
||||||
- name: Aggiunta servizio
|
- name: Aggiunta servizio
|
||||||
shell: /sbin/e-smith/signal-event runlevel-adjust
|
shell: /sbin/e-smith/signal-event runlevel-adjust
|
||||||
become: yes
|
become: yes
|
||||||
when: chk_gitdaemon_srv|changed
|
when: chk_gitdaemon_srv is changed
|
||||||
|
|
||||||
- name: Aggiunta servizio di rete e cambio firewall
|
- name: Aggiunta servizio di rete e cambio firewall
|
||||||
shell: /sbin/e-smith/signal-event firewall-adjust
|
shell: /sbin/e-smith/signal-event firewall-adjust
|
||||||
become: yes
|
become: yes
|
||||||
when: chk_gitdaemon_srv|changed
|
when: chk_gitdaemon_srv is changed
|
||||||
|
|
||||||
- name: Avvio servizio
|
- name: Avvio servizio
|
||||||
shell: service git-daemon start
|
shell: service git-daemon start
|
||||||
become: yes
|
become: yes
|
||||||
when: chk_gitdaemon_srv|changed
|
when: chk_gitdaemon_srv is changed
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
comment: "Ansible Management User"
|
comment: "Ansible Management User"
|
||||||
group: wheel
|
group: wheel
|
||||||
state: present
|
state: present
|
||||||
password: $6$rounds=100000$XvHuMoXtpCksx379$nhlfUn38.oBB7JrDrtwfUisw8T0Bg5InzFq1fw31mcEmGZ2AYFkFK2zC2g04lSfw.kpdSgqH3Dl5q9r1fY6.k.
|
password: $6$mVKMBMbAxeql$eqSe8tu2qKjtwmpiFy07b6nv2g4F80N.U9EzOmQTrNZwKZ61n6NLrSEQHQo1FOlQghOiB8as6Z35oTUUKN8y2.
|
||||||
|
|
||||||
- name: Concessione diritti all'utente di gestione Ansible
|
- name: Concessione diritti all'utente di gestione Ansible
|
||||||
template:
|
template:
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
---
|
---
|
||||||
extnic: wan0
|
|
||||||
intnic: lan0
|
intnic: lan0
|
||||||
force_regen_ca: false
|
force_regen_ca: false
|
||||||
force_ibay_shared: false
|
force_ibay_shared: false
|
||||||
|
@ -20,12 +20,12 @@
|
|||||||
|
|
||||||
- name: Configuring trusted networks
|
- name: Configuring trusted networks
|
||||||
shell: /sbin/e-smith/db networks set {{ ansible_local.domain.servernet }} network Description "Local LAN" Mask {{ ansible_local.domain.servernetmask }}
|
shell: /sbin/e-smith/db networks set {{ ansible_local.domain.servernet }} network Description "Local LAN" Mask {{ ansible_local.domain.servernetmask }}
|
||||||
when: check_trusted|changed
|
when: check_trusted is changed
|
||||||
tags: trustednet
|
tags: trustednet
|
||||||
|
|
||||||
- name: Activating trusted network
|
- name: Activating trusted network
|
||||||
shell: /sbin/e-smith/signal-event trusted-networks-modify
|
shell: /sbin/e-smith/signal-event trusted-networks-modify
|
||||||
when: check_trusted|changed
|
when: check_trusted is changed
|
||||||
tags: trustednet
|
tags: trustednet
|
||||||
|
|
||||||
# Preconfiguring DNS anyways
|
# Preconfiguring DNS anyways
|
||||||
@ -38,12 +38,12 @@
|
|||||||
|
|
||||||
- name: Configuring DNS resolution
|
- name: Configuring DNS resolution
|
||||||
shell: /sbin/e-smith/db configuration setprop dns NameServers {{ ansible_local.domain.extdnsserver1 }},{{ ansible_local.domain.extdnsserver2 }}
|
shell: /sbin/e-smith/db configuration setprop dns NameServers {{ ansible_local.domain.extdnsserver1 }},{{ ansible_local.domain.extdnsserver2 }}
|
||||||
when: chk_dns|changed
|
when: chk_dns is changed
|
||||||
tags: dns-preset
|
tags: dns-preset
|
||||||
|
|
||||||
- name: Activating correct DNS resolution
|
- name: Activating correct DNS resolution
|
||||||
shell: "/sbin/e-smith/signal-event nethserver-base-update"
|
shell: "/sbin/e-smith/signal-event nethserver-base-update"
|
||||||
when: chk_dns|changed
|
when: chk_dns is changed
|
||||||
|
|
||||||
# Hostname and domainname
|
# Hostname and domainname
|
||||||
|
|
||||||
@ -61,7 +61,7 @@
|
|||||||
|
|
||||||
- name: Activating hostname/domainname changes
|
- name: Activating hostname/domainname changes
|
||||||
shell: /sbin/e-smith/signal-event hostname-modify
|
shell: /sbin/e-smith/signal-event hostname-modify
|
||||||
when: chg_hostname|changed or chg_domainname|changed
|
when: chg_hostname is changed or chg_domainname is changed
|
||||||
tags:
|
tags:
|
||||||
- hostname
|
- hostname
|
||||||
- domainname
|
- domainname
|
||||||
@ -78,9 +78,9 @@
|
|||||||
- name: Configuring CA
|
- 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 }}"
|
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
|
tags: regen-ca
|
||||||
when: chk_crt|changed or force_regen_ca|bool
|
when: chk_crt is changed or force_regen_ca|bool
|
||||||
|
|
||||||
- name: Activating CA and regenerate
|
- name: Activating CA and regenerate
|
||||||
shell: /sbin/e-smith/signal-event certificate-update
|
shell: /sbin/e-smith/signal-event certificate-update
|
||||||
when: chk_crt|changed or force_regen_ca|bool
|
when: chk_crt is changed or force_regen_ca|bool
|
||||||
tags: regen-ca
|
tags: regen-ca
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
|
|
||||||
- name: Configuring DHCP
|
- 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
|
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|failed
|
when: chk_dhcp is failed
|
||||||
|
|
||||||
- name: Activating DHCP
|
- name: Activating DHCP
|
||||||
shell: /sbin/e-smith/signal-event nethserver-dnsmasq-save
|
shell: /sbin/e-smith/signal-event nethserver-dnsmasq-save
|
||||||
when: chk_dhcp|failed
|
when: chk_dhcp is failed
|
||||||
|
|
||||||
# DNS
|
# DNS
|
||||||
# Already preconfigured before (roles/nethcfg/tasks/base.yml)
|
# Already preconfigured before (roles/nethcfg/tasks/base.yml)
|
||||||
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
- name: Configuring DNS resolution
|
- name: Configuring DNS resolution
|
||||||
shell: /sbin/e-smith/db configuration setprop dns NameServers {{ ansible_local.domain.extdnsserver1 }},{{ ansible_local.domain.extdnsserver2 }}
|
shell: /sbin/e-smith/db configuration setprop dns NameServers {{ ansible_local.domain.extdnsserver1 }},{{ ansible_local.domain.extdnsserver2 }}
|
||||||
when: chk_dns|changed
|
when: chk_dns is changed
|
||||||
tags: force-resolvers
|
tags: force-resolvers
|
||||||
|
|
||||||
- name: Activating correct DNS resolution
|
- name: Activating correct DNS resolution
|
||||||
@ -41,7 +41,7 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- base
|
- base
|
||||||
- dnsmasq
|
- dnsmasq
|
||||||
when: chk_dns|changed
|
when: chk_dns is changed
|
||||||
tags: force-resolvers
|
tags: force-resolvers
|
||||||
|
|
||||||
# Avahi
|
# Avahi
|
||||||
|
@ -23,20 +23,20 @@
|
|||||||
|
|
||||||
- name: Configuring 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
|
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
|
when: chk_passstr is changed
|
||||||
tags: password-policy
|
tags: password-policy
|
||||||
|
|
||||||
- name: Activating password policy
|
- name: Activating password policy
|
||||||
shell: /sbin/e-smith/signal-event password-policy-update
|
shell: /sbin/e-smith/signal-event password-policy-update
|
||||||
when: chk_passstr|changed
|
when: chk_passstr is changed
|
||||||
tags: password-policy
|
tags: password-policy
|
||||||
|
|
||||||
# Organization configuration
|
# Organization configuration
|
||||||
|
|
||||||
- name: Configuring organization
|
- 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 }}"
|
shell: /sbin/e-smith/db configuration setprop OrganizationContact City "{{ ansible_local.domain.org_city }}" Company "{{ ansible_local.domain.org_company }}" CountryCode {{ ansible_local.domain.org_countrycode }} Department "{{ ansible_local.domain.org_department }}" PhoneNumber "{{ ansible_local.domain.org_phone }}" Street "{{ ansible_local.domain.org_street }}"
|
||||||
when: check_org|changed
|
when: check_org is changed
|
||||||
|
|
||||||
- name: Activating organization configuration
|
- name: Activating organization configuration
|
||||||
shell: /sbin/e-smith/signal-event organization-save
|
shell: /sbin/e-smith/signal-event organization-save
|
||||||
when: check_org|changed
|
when: check_org is changed
|
||||||
|
@ -10,11 +10,11 @@
|
|||||||
|
|
||||||
- name: domusers - Creating new group
|
- name: domusers - Creating new group
|
||||||
shell: /sbin/e-smith/db accounts set domusers group Description "Domain Users" Members admin Removable no
|
shell: /sbin/e-smith/db accounts set domusers group Description "Domain Users" Members admin Removable no
|
||||||
when: check_domusers|failed
|
when: check_domusers is failed
|
||||||
|
|
||||||
- name: domusers - Activating group
|
- name: domusers - Activating group
|
||||||
shell: /sbin/e-smith/signal-event group-create domusers
|
shell: /sbin/e-smith/signal-event group-create domusers
|
||||||
when: check_domusers|failed
|
when: check_domusers is failed
|
||||||
|
|
||||||
# Domain Operators
|
# Domain Operators
|
||||||
|
|
||||||
@ -25,11 +25,11 @@
|
|||||||
|
|
||||||
- name: domopers - Creating new group
|
- name: domopers - Creating new group
|
||||||
shell: /sbin/e-smith/db accounts set domopers group Description "Domain Operators" Removable no
|
shell: /sbin/e-smith/db accounts set domopers group Description "Domain Operators" Removable no
|
||||||
when: check_domopers|failed
|
when: check_domopers is failed
|
||||||
|
|
||||||
- name: domopers - Activating group
|
- name: domopers - Activating group
|
||||||
shell: /sbin/e-smith/signal-event group-create domopers
|
shell: /sbin/e-smith/signal-event group-create domopers
|
||||||
when: check_domopers|failed
|
when: check_domopers is failed
|
||||||
|
|
||||||
# Docenti
|
# Docenti
|
||||||
|
|
||||||
@ -40,8 +40,8 @@
|
|||||||
|
|
||||||
- name: docenti - Creating new group
|
- name: docenti - Creating new group
|
||||||
shell: /sbin/e-smith/db accounts set docenti group Description "Docenti" Removable no
|
shell: /sbin/e-smith/db accounts set docenti group Description "Docenti" Removable no
|
||||||
when: check_docenti|failed
|
when: check_docenti is failed
|
||||||
|
|
||||||
- name: docenti - Activating group
|
- name: docenti - Activating group
|
||||||
shell: /sbin/e-smith/signal-event group-create docenti
|
shell: /sbin/e-smith/signal-event group-create docenti
|
||||||
when: check_docenti|failed
|
when: check_docenti is failed
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
---
|
---
|
||||||
# Reconfiguring network interfaces
|
# Reconfiguring network interfaces
|
||||||
|
|
||||||
- name: Configuring external NIC
|
|
||||||
shell: /sbin/e-smith/db networks setprop {{ extnic }} role red bootproto dhcp
|
|
||||||
|
|
||||||
- name: Configuring internal NIC
|
- name: Configuring internal NIC
|
||||||
shell: /sbin/e-smith/db networks setprop {{ intnic }} role green ipaddr {{ ansible_local.domain.serverip }} netmask {{ ansible_local.domain.servernetmask }}
|
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
|
- name: Configuring NTP
|
||||||
shell: /sbin/e-smith/db configuration setprop ntpd NTPServer ntp1.inrim.it status enabled
|
shell: /sbin/e-smith/db configuration setprop ntpd NTPServer ntp1.inrim.it status enabled
|
||||||
become: yes
|
become: yes
|
||||||
when: chk_ntp|changed
|
when: chk_ntp is changed
|
||||||
|
|
||||||
- name: Activating NTP
|
- name: Activating NTP
|
||||||
shell: /sbin/e-smith/signal-event nethserver-ntp-update
|
shell: /sbin/e-smith/signal-event nethserver-ntp-update
|
||||||
become: yes
|
become: yes
|
||||||
when: chk_ntp|changed
|
when: chk_ntp is changed
|
||||||
|
@ -20,11 +20,11 @@
|
|||||||
|
|
||||||
- name: Configuring Squid
|
- name: Configuring Squid
|
||||||
shell: /sbin/e-smith/db configuration setprop squid BlueMode transparent GreenMode transparent PortBlock disabled status enabled DiskCache enabled DiskCacheSize 2000
|
shell: /sbin/e-smith/db configuration setprop squid BlueMode transparent GreenMode transparent PortBlock disabled status enabled DiskCache enabled DiskCacheSize 2000
|
||||||
when: chk_squid|changed
|
when: chk_squid is changed
|
||||||
|
|
||||||
- name: Activating Squid configuration
|
- name: Activating Squid configuration
|
||||||
shell: /sbin/e-smith/signal-event nethserver-squid-update
|
shell: /sbin/e-smith/signal-event nethserver-squid-update
|
||||||
when: chk_squid|changed
|
when: chk_squid is changed
|
||||||
|
|
||||||
# Squid-clamav
|
# Squid-clamav
|
||||||
|
|
||||||
@ -36,11 +36,11 @@
|
|||||||
|
|
||||||
- name: Configuring squidclamav
|
- name: Configuring squidclamav
|
||||||
shell: /sbin/e-smith/db configuration setprop squidclamav status enabled
|
shell: /sbin/e-smith/db configuration setprop squidclamav status enabled
|
||||||
when: chk_squidclamav|changed
|
when: chk_squidclamav is changed
|
||||||
|
|
||||||
- name: Activating squidclamav
|
- name: Activating squidclamav
|
||||||
shell: /sbin/e-smith/signal-event nethserver-squidclamav-update
|
shell: /sbin/e-smith/signal-event nethserver-squidclamav-update
|
||||||
when: chk_squidclamav|changed
|
when: chk_squidclamav is changed
|
||||||
|
|
||||||
# SquidGuard
|
# SquidGuard
|
||||||
|
|
||||||
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
- name: Configuring squidguard
|
- name: Configuring squidguard
|
||||||
shell: /sbin/e-smith/db configuration setprop squidguard Expressions enabled Lists shalla status enabled
|
shell: /sbin/e-smith/db configuration setprop squidguard Expressions enabled Lists shalla status enabled
|
||||||
when: check_squidguard|changed
|
when: check_squidguard is changed
|
||||||
|
|
||||||
- name: Activating squidguard configuration
|
- name: Activating squidguard configuration
|
||||||
shell: "/sbin/e-smith/signal-event nethserver-squidguard-{{ item }}"
|
shell: "/sbin/e-smith/signal-event nethserver-squidguard-{{ item }}"
|
||||||
@ -60,7 +60,7 @@
|
|||||||
- save
|
- save
|
||||||
- update
|
- update
|
||||||
- downloadlists
|
- downloadlists
|
||||||
when: check_squidguard|changed
|
when: check_squidguard is changed
|
||||||
|
|
||||||
# Content filtering settings
|
# Content filtering settings
|
||||||
|
|
||||||
@ -72,8 +72,8 @@
|
|||||||
- name: Configuring content filtering
|
- 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
|
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
|
register: cf_cat
|
||||||
when: check_cf|changed
|
when: check_cf is changed
|
||||||
|
|
||||||
- name: Activating content filtering as a whole
|
- name: Activating content filtering as a whole
|
||||||
shell: /sbin/e-smith/signal-event nethserver-squidguard-update
|
shell: /sbin/e-smith/signal-event nethserver-squidguard-update
|
||||||
when: check_cf|changed
|
when: check_cf is changed
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
state: directory
|
state: directory
|
||||||
when: check_tempcust|changed
|
when: check_tempcust is changed
|
||||||
|
|
||||||
- name: "Copying settings from default."
|
- name: "Copying settings from default."
|
||||||
copy:
|
copy:
|
||||||
@ -36,14 +36,14 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when: check_tempcust|changed
|
when: check_tempcust is changed
|
||||||
|
|
||||||
- name: "Enabling unix extensions on SAMBA"
|
- name: "Enabling unix extensions on SAMBA"
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/e-smith/templates-custom/etc/samba/smb.conf/10global
|
dest: /etc/e-smith/templates-custom/etc/samba/smb.conf/10global
|
||||||
regexp: '^unix extensions = no$'
|
regexp: '^unix extensions = no$'
|
||||||
replace: 'unix extensions = yes'
|
replace: 'unix extensions = yes'
|
||||||
when: check_tempcust|changed
|
when: check_tempcust is changed
|
||||||
|
|
||||||
- name: Adding server signing as mandatory
|
- name: Adding server signing as mandatory
|
||||||
lineinfile:
|
lineinfile:
|
||||||
@ -51,7 +51,7 @@
|
|||||||
line: "server signing = mandatory"
|
line: "server signing = mandatory"
|
||||||
insertafter: "^workgroup = "
|
insertafter: "^workgroup = "
|
||||||
state: present
|
state: present
|
||||||
when: check_tempcust|changed
|
when: check_tempcust is changed
|
||||||
|
|
||||||
- name: Checking SMB configuration
|
- name: Checking SMB configuration
|
||||||
shell: /sbin/e-smith/db configuration printprop smb RoamingProfiles
|
shell: /sbin/e-smith/db configuration printprop smb RoamingProfiles
|
||||||
@ -61,11 +61,11 @@
|
|||||||
|
|
||||||
- name: Configuring SMB
|
- name: Configuring SMB
|
||||||
shell: /sbin/e-smith/db configuration setprop smb RoamingProfiles yes ServerRole PDC Workgroup "{{ ansible_local.domain.domainshort }}" status enabled
|
shell: /sbin/e-smith/db configuration setprop smb RoamingProfiles yes ServerRole PDC Workgroup "{{ ansible_local.domain.domainshort }}" status enabled
|
||||||
when: chk_smb|changed
|
when: chk_smb is changed
|
||||||
|
|
||||||
- name: Activating SMB
|
- name: Activating SMB
|
||||||
shell: /sbin/e-smith/signal-event nethserver-samba-save
|
shell: /sbin/e-smith/signal-event nethserver-samba-save
|
||||||
when: chk_smb|changed
|
when: chk_smb is changed
|
||||||
|
|
||||||
# ibays
|
# ibays
|
||||||
|
|
||||||
@ -87,7 +87,7 @@
|
|||||||
|
|
||||||
- name: Copying default templates for shared template type
|
- 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
|
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|failed
|
when: force_ibay_shared|bool or chk_shared is failed
|
||||||
|
|
||||||
- name: Configuring ibay-shared template structure (directory mask)
|
- name: Configuring ibay-shared template structure (directory mask)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
@ -95,7 +95,7 @@
|
|||||||
line: 'directory mask = 0775'
|
line: 'directory mask = 0775'
|
||||||
insertafter: '^create mask'
|
insertafter: '^create mask'
|
||||||
state: present
|
state: present
|
||||||
when: force_ibay_shared|bool or chk_shared|failed
|
when: force_ibay_shared|bool or chk_shared is failed
|
||||||
|
|
||||||
- name: Configuring force create mode
|
- name: Configuring force create mode
|
||||||
lineinfile:
|
lineinfile:
|
||||||
@ -103,7 +103,7 @@
|
|||||||
line: 'force create mode = 0664'
|
line: 'force create mode = 0664'
|
||||||
insertafter: '^directory mask'
|
insertafter: '^directory mask'
|
||||||
state: present
|
state: present
|
||||||
when: force_ibay_shared|bool or chk_shared|failed
|
when: force_ibay_shared|bool or chk_shared is failed
|
||||||
|
|
||||||
- name: Configuring force directory mode
|
- name: Configuring force directory mode
|
||||||
lineinfile:
|
lineinfile:
|
||||||
@ -111,31 +111,31 @@
|
|||||||
line: 'force directory mode = 0775'
|
line: 'force directory mode = 0775'
|
||||||
insertafter: '^force create mode'
|
insertafter: '^force create mode'
|
||||||
state: present
|
state: present
|
||||||
when: force_ibay_shared|bool or chk_shared|failed
|
when: force_ibay_shared|bool or chk_shared is failed
|
||||||
|
|
||||||
- name: Configuring shared ibay
|
- 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
|
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|failed
|
when: chk_shared is failed
|
||||||
|
|
||||||
- name: Activating shared ibay
|
- name: Activating shared ibay
|
||||||
shell: /sbin/e-smith/signal-event ibay-create shared
|
shell: /sbin/e-smith/signal-event ibay-create shared
|
||||||
become: yes
|
become: yes
|
||||||
when: chk_shared|failed
|
when: chk_shared is failed
|
||||||
|
|
||||||
- name: Changing ibay profile for shared
|
- name: Changing ibay profile for shared
|
||||||
shell: /sbin/e-smith/db accounts setprop shared SmbProfileType shared
|
shell: /sbin/e-smith/db accounts setprop shared SmbProfileType shared
|
||||||
become: yes
|
become: yes
|
||||||
when: force_ibay_shared|bool or chk_shared|failed
|
when: force_ibay_shared|bool or chk_shared is failed
|
||||||
|
|
||||||
- name: Saving new version of smb.conf
|
- name: Saving new version of smb.conf
|
||||||
shell: /sbin/e-smith/signal-event nethserver-samba-save
|
shell: /sbin/e-smith/signal-event nethserver-samba-save
|
||||||
become: yes
|
become: yes
|
||||||
when: check_tempcust|changed
|
when: check_tempcust is changed
|
||||||
|
|
||||||
- name: Forcing regeneration of smb.conf
|
- name: Forcing regeneration of smb.conf
|
||||||
shell: /sbin/e-smith/signal-event nethserver-samba-update
|
shell: /sbin/e-smith/signal-event nethserver-samba-update
|
||||||
become: yes
|
become: yes
|
||||||
when: force_ibay_shared|bool or chk_shared|failed or check_tempcust|changed
|
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
|
# Fixing issue #3 - Configure sudo access for admin on server for operator
|
||||||
# access
|
# access
|
||||||
|
@ -8,5 +8,6 @@ mirror_security_host: security.ubuntu.com
|
|||||||
mirror_security_path: /ubuntu
|
mirror_security_path: /ubuntu
|
||||||
mirror_localpath: /ks/mirror
|
mirror_localpath: /ks/mirror
|
||||||
execpath: ""
|
execpath: ""
|
||||||
|
execsecurepath: ""
|
||||||
execmirrorpath: ""
|
execmirrorpath: ""
|
||||||
development: false
|
development: false
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
- include: mirror-cfg.yml
|
- include: mirror-cfg.yml
|
||||||
tags:
|
tags:
|
||||||
- preseed
|
- preseed
|
||||||
|
- repoconfig
|
||||||
|
|
||||||
- include: preseed.yml
|
- include: preseed.yml
|
||||||
tags:
|
tags:
|
||||||
@ -16,3 +17,8 @@
|
|||||||
- include: firefoxcert.yml
|
- include: firefoxcert.yml
|
||||||
tags:
|
tags:
|
||||||
- firefox
|
- firefox
|
||||||
|
|
||||||
|
- include: paperms.yml
|
||||||
|
tags:
|
||||||
|
- preseed
|
||||||
|
- paperms
|
||||||
|
@ -6,19 +6,27 @@
|
|||||||
when: "ansible_local.domain.mirror_mode is defined"
|
when: "ansible_local.domain.mirror_mode is defined"
|
||||||
|
|
||||||
- name: Determining mirror_host
|
- name: Determining mirror_host
|
||||||
set_fact: mirror_host="{{ ansible_local.domain.mirror_host }}"
|
set_fact:
|
||||||
|
mirror_host: "{{ ansible_local.domain.mirror_host }}"
|
||||||
|
orig_mirror_host: "{{ ansible_local.domain.mirror_host }}"
|
||||||
when: ansible_local.domain.mirror_host is defined
|
when: ansible_local.domain.mirror_host is defined
|
||||||
|
|
||||||
- name: Determining mirror_path
|
- name: Determining mirror_path
|
||||||
set_fact: mirror_path="{{ ansible_local.domain.mirror_path }}"
|
set_fact:
|
||||||
|
mirror_path: "{{ ansible_local.domain.mirror_path }}"
|
||||||
|
orig_mirror_path: "{{ ansible_local.domain.mirror_path }}"
|
||||||
when: ansible_local.domain.mirror_path is defined
|
when: ansible_local.domain.mirror_path is defined
|
||||||
|
|
||||||
- name: Determining mirror_security_host
|
- name: Determining mirror_security_host
|
||||||
set_fact: mirror_security_host="{{ ansible_local.domain.mirror_security_host }}"
|
set_fact:
|
||||||
|
mirror_security_host: "{{ ansible_local.domain.mirror_security_host }}"
|
||||||
|
orig_mirror_security_host: "{{ ansible_local.domain.mirror_security_host }}"
|
||||||
when: ansible_local.domain.mirror_security_host is defined
|
when: ansible_local.domain.mirror_security_host is defined
|
||||||
|
|
||||||
- name: Determining mirror_security_path
|
- name: Determining mirror_security_path
|
||||||
set_fact: mirror_security_path="{{ ansible_local.domain.mirror_security_path }}"
|
set_fact:
|
||||||
|
mirror_security_path: "{{ ansible_local.domain.mirror_security_path }}"
|
||||||
|
orig_mirror_security_path: "{{ ansible_local.domain.mirror_security_path }}"
|
||||||
when: ansible_local.domain.mirror_security_path is defined
|
when: ansible_local.domain.mirror_security_path is defined
|
||||||
|
|
||||||
- name: Determining mirror_localpath
|
- name: Determining mirror_localpath
|
||||||
@ -28,13 +36,10 @@
|
|||||||
# The remote option is already configured as it is.
|
# The remote option is already configured as it is.
|
||||||
|
|
||||||
# Configuring correctly local mirror
|
# Configuring correctly local mirror
|
||||||
- name: Determining variables for local and nfs mode
|
- name: Altering paths
|
||||||
set_fact:
|
set_fact:
|
||||||
orig_mirror_path: ”{{ mirror_path }}"
|
execmirrorpath: "{{ mirror_host }}{{ mirror_path }}"
|
||||||
orig_mirror_host: "{{ mirror_host }}"
|
execsecurepath: "{{ mirror_security_host }}{{ mirror_security_path }}"
|
||||||
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 }}/"
|
execpath: "{{ ansible_local.domain.serverfqdn }}{{ mirror_localpath }}/"
|
||||||
mirror_path: "{{ mirror_localpath }}/{{ mirror_host }}{{ mirror_path }}"
|
mirror_path: "{{ mirror_localpath }}/{{ mirror_host }}{{ mirror_path }}"
|
||||||
mirror_host: "{{ ansible_local.domain.serverfqdn }}"
|
mirror_host: "{{ ansible_local.domain.serverfqdn }}"
|
||||||
|
25
roles/preseed/tasks/paperms.yml
Normal file
25
roles/preseed/tasks/paperms.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
# 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
|
@ -14,12 +14,12 @@
|
|||||||
|
|
||||||
- name: Configurazione web preseed
|
- 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
|
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|failed
|
when: chk_ks_created is failed
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Attivazione web preseed
|
- name: Attivazione web preseed
|
||||||
shell: /sbin/e-smith/signal-event ibay-create ks
|
shell: /sbin/e-smith/signal-event ibay-create ks
|
||||||
when: chk_ks_created|failed
|
when: chk_ks_created is failed
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Verifica presenza directory mirror
|
- name: Verifica presenza directory mirror
|
||||||
@ -31,7 +31,7 @@
|
|||||||
- name: Collegamento directory mirror
|
- name: Collegamento directory mirror
|
||||||
file: path=/var/lib/nethserver/ibay/ks/mirror src=/var/spool/apt-mirror/mirror state=link
|
file: path=/var/lib/nethserver/ibay/ks/mirror src=/var/spool/apt-mirror/mirror state=link
|
||||||
become: yes
|
become: yes
|
||||||
when: chk_mirror_dir|success
|
when: chk_mirror_dir is succeeded
|
||||||
|
|
||||||
- name: Creazione directory preseed
|
- name: Creazione directory preseed
|
||||||
file:
|
file:
|
||||||
@ -74,6 +74,5 @@
|
|||||||
- postseed-client.sh
|
- postseed-client.sh
|
||||||
- postseed-docenti.sh
|
- postseed-docenti.sh
|
||||||
- postseed-aula.sh
|
- postseed-aula.sh
|
||||||
- pulseaudio-perms.sh
|
|
||||||
- checksum.fact
|
- checksum.fact
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -35,3 +35,10 @@
|
|||||||
- epoptes-ppa-trusty.list
|
- epoptes-ppa-trusty.list
|
||||||
- geogebra-stable.list
|
- geogebra-stable.list
|
||||||
become: yes
|
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
|
||||||
|
1
roles/preseed/templates/paperms/cronjob
Normal file
1
roles/preseed/templates/paperms/cronjob
Normal file
@ -0,0 +1 @@
|
|||||||
|
@reboot root /var/lib/{{ ansible_local.domain.domainfull }}/bin/paperms.sh >> /var/log/paperms.log 2>&1
|
7
roles/preseed/templates/paperms/logrotate
Normal file
7
roles/preseed/templates/paperms/logrotate
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/var/log/paperms.log {
|
||||||
|
rotate 7
|
||||||
|
daily
|
||||||
|
compress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
}
|
34
roles/preseed/templates/paperms/paperms.sh
Normal file
34
roles/preseed/templates/paperms/paperms.sh
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#!/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."
|
74
roles/preseed/templates/paperms/updategrp.py
Normal file
74
roles/preseed/templates/paperms/updategrp.py
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
#!/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()
|
@ -55,7 +55,7 @@ d-i apt-setup/local2/key string http://keyserver.ubuntu.com:11371/pks/lookup
|
|||||||
# Setup and enable geogebra repository
|
# 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/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/comment string Geogebra Official repository
|
||||||
d-i apt-setup/local3/key string http://www.geogebra.net/linux/office@geogebra.org.gpg.key.new
|
d-i apt-setup/local3/key string http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/office_geogebra.gpg.key
|
||||||
|
|
||||||
# Time and date
|
# Time and date
|
||||||
d-i clock-setup/utc boolean true
|
d-i clock-setup/utc boolean true
|
||||||
@ -66,7 +66,7 @@ d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
|||||||
# User creation
|
# User creation
|
||||||
d-i passwd/user-fullname string BgLUG User
|
d-i passwd/user-fullname string BgLUG User
|
||||||
d-i passwd/username string bglug
|
d-i passwd/username string bglug
|
||||||
d-i passwd/user-password-crypted string $1$33bB/LIt$MEHmvzVIgYRJs/5L4z34L/
|
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||||
|
|
||||||
# Partitioning
|
# Partitioning
|
||||||
d-i partman-auto/init_automatically_partition select biggest_free
|
d-i partman-auto/init_automatically_partition select biggest_free
|
||||||
|
@ -55,7 +55,7 @@ d-i apt-setup/local2/key string http://keyserver.ubuntu.com:11371/pks/lookup
|
|||||||
# Setup and enable geogebra repository
|
# 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/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/comment string Geogebra Official repository
|
||||||
d-i apt-setup/local3/key string http://www.geogebra.net/linux/office@geogebra.org.gpg.key.new
|
d-i apt-setup/local3/key string http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/office_geogebra.gpg.key
|
||||||
|
|
||||||
# Time and date
|
# Time and date
|
||||||
d-i clock-setup/utc boolean true
|
d-i clock-setup/utc boolean true
|
||||||
@ -66,7 +66,7 @@ d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
|||||||
# User creation
|
# User creation
|
||||||
d-i passwd/user-fullname string BgLUG User
|
d-i passwd/user-fullname string BgLUG User
|
||||||
d-i passwd/username string bglug
|
d-i passwd/username string bglug
|
||||||
d-i passwd/user-password-crypted string $1$33bB/LIt$MEHmvzVIgYRJs/5L4z34L/
|
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||||
|
|
||||||
# Partitioning
|
# Partitioning
|
||||||
d-i partman-auto/init_automatically_partition select biggest_free
|
d-i partman-auto/init_automatically_partition select biggest_free
|
||||||
|
@ -62,7 +62,7 @@ d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
|||||||
# User creation
|
# User creation
|
||||||
d-i passwd/user-fullname string BgLUG User
|
d-i passwd/user-fullname string BgLUG User
|
||||||
d-i passwd/username string bglug
|
d-i passwd/username string bglug
|
||||||
d-i passwd/user-password-crypted string $1$33bB/LIt$MEHmvzVIgYRJs/5L4z34L/
|
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||||
|
|
||||||
# Partitioning
|
# Partitioning
|
||||||
d-i partman-auto/init_automatically_partition select biggest_free
|
d-i partman-auto/init_automatically_partition select biggest_free
|
||||||
|
@ -62,7 +62,7 @@ d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
|||||||
# User creation
|
# User creation
|
||||||
d-i passwd/user-fullname string BgLUG User
|
d-i passwd/user-fullname string BgLUG User
|
||||||
d-i passwd/username string bglug
|
d-i passwd/username string bglug
|
||||||
d-i passwd/user-password-crypted string $1$33bB/LIt$MEHmvzVIgYRJs/5L4z34L/
|
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||||
|
|
||||||
# Partitioning
|
# Partitioning
|
||||||
d-i partman-auto/init_automatically_partition select biggest_free
|
d-i partman-auto/init_automatically_partition select biggest_free
|
||||||
|
@ -55,7 +55,7 @@ d-i apt-setup/local2/key string http://keyserver.ubuntu.com:11371/pks/lookup
|
|||||||
# Setup and enable geogebra repository
|
# 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/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/comment string Geogebra Official repository
|
||||||
d-i apt-setup/local3/key string http://www.geogebra.net/linux/office@geogebra.org.gpg.key.new
|
d-i apt-setup/local3/key string http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/office_geogebra.gpg.key
|
||||||
|
|
||||||
# Time and date
|
# Time and date
|
||||||
d-i clock-setup/utc boolean true
|
d-i clock-setup/utc boolean true
|
||||||
@ -66,7 +66,7 @@ d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }}
|
|||||||
# User creation
|
# User creation
|
||||||
d-i passwd/user-fullname string BgLUG User
|
d-i passwd/user-fullname string BgLUG User
|
||||||
d-i passwd/username string bglug
|
d-i passwd/username string bglug
|
||||||
d-i passwd/user-password-crypted string $1$33bB/LIt$MEHmvzVIgYRJs/5L4z34L/
|
d-i passwd/user-password-crypted password $6$S8u22loyR$RJZUtmnqmadvas13BxjPkBjdcF1o6P0xGtweZ9MkUCKIbyzmzQFxvwPTwoX1AaPgRyNmvdevyUgs/AMRGH8O./
|
||||||
|
|
||||||
# Partitioning
|
# Partitioning
|
||||||
d-i partman-auto/init_automatically_partition select biggest_free
|
d-i partman-auto/init_automatically_partition select biggest_free
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
#!/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,18 +1,18 @@
|
|||||||
# Base repositories for Ubuntu 14.04 - Trusty Tahr
|
# Base repositories for Ubuntu 14.04 - Trusty Tahr
|
||||||
deb http://{{ execpath }}{{ host }}{{ path }} trusty main restricted universe multiverse
|
deb http://{{ mirror_host }}{{ mirror_path }} trusty main restricted universe multiverse
|
||||||
deb http://{{ execpath }}{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
deb http://{{ mirror_host }}{{ mirror_path }} trusty-security main restricted universe multiverse
|
||||||
deb http://{{ execpath }}{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
deb http://{{ mirror_host }}{{ mirror_path }} trusty-updates main restricted universe multiverse
|
||||||
deb http://{{ execpath }}{{ host }}{{ path }} trusty-backports main restricted universe multiverse
|
deb http://{{ mirror_host }}{{ mirror_path }} trusty-backports main restricted universe multiverse
|
||||||
|
|
||||||
# Sources
|
# Sources
|
||||||
#deb-src http://{{ execpath }}{{ host }}{{ path }} trusty main restricted universe multiverse
|
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty main restricted universe multiverse
|
||||||
#deb-src http://{{ execpath }}{{ host }}{{ path }} trusty-security main restricted universe multiverse
|
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty-security main restricted universe multiverse
|
||||||
#deb-src http://{{ execpath }}{{ host }}{{ path }} trusty-updates main restricted universe multiverse
|
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty-updates main restricted universe multiverse
|
||||||
#deb-src http://{{ execpath }}{{ host }}{{ path }} trusty-backports main restricted universe multiverse
|
#deb-src http://{{ mirror_host }}{{ mirror_path }} trusty-backports main restricted universe multiverse
|
||||||
|
|
||||||
# Security
|
# Security
|
||||||
deb http://{{ execpath }}{{ shost }}{{ spath }} trusty-security main restricted universe multiverse
|
deb http://{{ mirror_security_host }}{{ mirror_security_path }} trusty-security main restricted universe multiverse
|
||||||
#deb-src http://{{ execpath }}{{ shost }}{{ spath }} trusty-security main restricted universe multiverse
|
#deb-src http://{{ mirror_security_host }}{{ mirror_security_path }} trusty-security main restricted universe multiverse
|
||||||
|
|
||||||
# Extras
|
# Extras
|
||||||
deb http://{{ execpath }}extras.ubuntu.com/ubuntu trusty main
|
deb http://{{ execpath }}extras.ubuntu.com/ubuntu trusty main
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
|
|
||||||
- name: Configuring TFTP
|
- name: Configuring TFTP
|
||||||
shell: /sbin/e-smith/db configuration setprop dnsmasq tftp-status enabled dhcp-boot pxelinux.0
|
shell: /sbin/e-smith/db configuration setprop dnsmasq tftp-status enabled dhcp-boot pxelinux.0
|
||||||
when: chk_tftp_enabled|changed
|
when: chk_tftp_enabled is changed
|
||||||
|
|
||||||
- name: Activating tftp
|
- name: Activating tftp
|
||||||
shell: /sbin/e-smith/signal-event nethserver-dnsmasq-save
|
shell: /sbin/e-smith/signal-event nethserver-dnsmasq-save
|
||||||
when: chk_tftp_enabled|changed
|
when: chk_tftp_enabled is changed
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
name: python-argparse
|
name: python-argparse
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: yes
|
||||||
when: check_argparse|changed
|
when: check_argparse is changed
|
||||||
tags: ansible
|
tags: ansible
|
||||||
|
|
||||||
#- name: Download della gestione client con ansible
|
#- name: Download della gestione client con ansible
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
- name: Installo epel-release
|
- name: Installo epel-release
|
||||||
yum: name=epel-release state=present
|
yum: name=epel-release state=present
|
||||||
become: yes
|
become: yes
|
||||||
when: check_epel|failed
|
when: check_epel is failed
|
||||||
register: epel_installed
|
register: epel_installed
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
@ -18,20 +18,20 @@
|
|||||||
name: "http://dl.fedoraproject.org/pub/epel/6/{{ ansible_architecture }}/epel-release-6-8.noarch.rpm"
|
name: "http://dl.fedoraproject.org/pub/epel/6/{{ ansible_architecture }}/epel-release-6-8.noarch.rpm"
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: yes
|
||||||
when: epel_installed|failed
|
when: epel_installed is failed
|
||||||
register: rpm_epel_installed
|
register: rpm_epel_installed
|
||||||
|
|
||||||
- name: Abilito il repo EPEL
|
- name: Abilito il repo EPEL
|
||||||
shell: yum-config-manager --enable epel
|
shell: yum-config-manager --enable epel
|
||||||
become: yes
|
become: yes
|
||||||
when: epel_installed|changed or epel_installed|success or rpm_epel_installed|changed
|
when: epel_installed is changed or epel_installed is succeeded or rpm_epel_installed is changed
|
||||||
changed_when: "'[epel]' in epel_enabled.stdout and epel_enabled.rc == 0"
|
changed_when: "'[epel]' in epel_enabled.stdout and epel_enabled.rc == 0"
|
||||||
register: epel_enabled
|
register: epel_enabled
|
||||||
|
|
||||||
- name: Pulizia e ricaricam. repo
|
- name: Pulizia e ricaricam. repo
|
||||||
shell: yum clean all && yum repolist
|
shell: yum clean all && yum repolist
|
||||||
become: yes
|
become: yes
|
||||||
when: epel_enabled|changed
|
when: epel_enabled is changed
|
||||||
tags: repo
|
tags: repo
|
||||||
|
|
||||||
- name: Aggiorno il sistema
|
- name: Aggiorno il sistema
|
||||||
|
@ -15,4 +15,4 @@
|
|||||||
|
|
||||||
- name: Locking nethserver-release version
|
- name: Locking nethserver-release version
|
||||||
shell: yum versionlock add nethserver-release
|
shell: yum versionlock add nethserver-release
|
||||||
when: chk_locked_nethrelease|changed
|
when: chk_locked_nethrelease is changed
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
- name: Creazione directory .ssh
|
- name: Creazione directory .ssh
|
||||||
shell: mkdir -p $HOME/.ssh
|
shell: mkdir -p $HOME/.ssh
|
||||||
when: check_sshdir|failed
|
when: check_sshdir is failed
|
||||||
|
|
||||||
- name: Verifica chiave ssh
|
- name: Verifica chiave ssh
|
||||||
shell: test -f $HOME/.ssh/id_rsa
|
shell: test -f $HOME/.ssh/id_rsa
|
||||||
@ -17,4 +17,4 @@
|
|||||||
|
|
||||||
- name: Gestione creazione chiave ssh
|
- name: Gestione creazione chiave ssh
|
||||||
shell: ssh-keygen -t rsa -b 1024 -f $HOME/.ssh/id_rsa -N ''
|
shell: ssh-keygen -t rsa -b 1024 -f $HOME/.ssh/id_rsa -N ''
|
||||||
when: check_key|failed
|
when: check_key is failed
|
||||||
|
@ -23,14 +23,14 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: chk_mount_nfs|changed
|
when: chk_mount_nfs is changed
|
||||||
|
|
||||||
- name: Adding mountpoint to fstab
|
- name: Adding mountpoint to fstab
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
line: "{{ ansible_local.domain.mirror_nfs_share }} /var/spool/apt-mirror/mirror nfs4 defaults 0 0"
|
line: "{{ ansible_local.domain.mirror_nfs_share }} /var/spool/apt-mirror/mirror nfs4 defaults 0 0"
|
||||||
when: chk_mount_nfs|changed
|
when: chk_mount_nfs is changed
|
||||||
|
|
||||||
- name: Mounting share
|
- name: Mounting share
|
||||||
shell: mount /var/spool/apt-mirror/mirror
|
shell: mount /var/spool/apt-mirror/mirror
|
||||||
when: chk_mount_nfs|changed
|
when: chk_mount_nfs is changed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user