Gestisco meglio il riconoscimento di NethServer.

This commit is contained in:
Emiliano Vavassori 2015-04-21 17:45:27 +02:00
parent dd56ee9a7d
commit acbded39e1
3 changed files with 12 additions and 10 deletions

View File

@ -0,0 +1,4 @@
---
- name: interface update
shell: /sbin/e-smith/signal-event interface-update
sudo: yes

View File

@ -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

View File

@ -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