forked from LibreSchool/server-config
Gestisco meglio il riconoscimento di NethServer.
This commit is contained in:
parent
dd56ee9a7d
commit
acbded39e1
4
roles/init/handlers/main.yml
Normal file
4
roles/init/handlers/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
- name: interface update
|
||||
shell: /sbin/e-smith/signal-event interface-update
|
||||
sudo: yes
|
@ -1,13 +1,7 @@
|
||||
---
|
||||
- name: Verifica di NethServer
|
||||
shell: /sbin/e-smith/config getprop sysconfig ProductName
|
||||
register: sysconfig_productname
|
||||
|
||||
- name: Configuro la scheda secondaria
|
||||
shell: /sbin/e-smith/db networks setprop eth1 bootproto none device eth1 ipaddr 10.0.0.1 netmask 255.255.255.0 onboot yes role green
|
||||
when: "'NethServer' in sysconfig_productname.stdout"
|
||||
register: eth1_enabled
|
||||
|
||||
- name: Attivo la configurazione
|
||||
shell: signal-event interface-update
|
||||
when: eth1_enabled|success
|
||||
notify:
|
||||
- interface update
|
||||
|
@ -1,8 +1,12 @@
|
||||
---
|
||||
- name: Verifica di NethServer
|
||||
shell: /sbin/e-smith/config getprop sysconfig ProductName
|
||||
register: sysconfig_productname
|
||||
changed_when: "'NethServer' in sysconfig_productname.stdout"
|
||||
ignore_errors: yes
|
||||
|
||||
# solo se è virtualbox, procedo a configurare la seconda scheda di rete
|
||||
- include: configure-networks.yml
|
||||
when: ansible_bios_version == "VirtualBox"
|
||||
when: sysconfig_productname|changed
|
||||
|
||||
- include: selinux-binding.yml
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user