forked from LibreSchool/server-config
Compare commits
2 Commits
5342d1d2d3
...
daf8badd85
Author | SHA1 | Date | |
---|---|---|---|
daf8badd85 | |||
dc57a5639b |
4
Vagrantfile
vendored
4
Vagrantfile
vendored
@ -11,6 +11,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
nethserver.vm.box = "syntaxerrormmm/nethserver-7"
|
nethserver.vm.box = "syntaxerrormmm/nethserver-7"
|
||||||
nethserver.vm.box_url = "https://vagrant.libreschool.org/nethserver-7"
|
nethserver.vm.box_url = "https://vagrant.libreschool.org/nethserver-7"
|
||||||
|
|
||||||
|
nethserver.vm.provider :libvirt do |lv|
|
||||||
|
lv.keymap = 'it'
|
||||||
|
end
|
||||||
|
|
||||||
nethserver.vm.network :private_network,
|
nethserver.vm.network :private_network,
|
||||||
:ip => "172.16.253.1",
|
:ip => "172.16.253.1",
|
||||||
:auto_config => false
|
:auto_config => false
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
state: absent
|
state: absent
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Forcing recreation of {{ extnic }}
|
- name: Creo interfaccia esterna in NethServer
|
||||||
shell: "INTERFACE=eth0 MATCHADDR={{ ansible_eth0.macaddress }} INTERFACE_NAME={{ extnic }} /lib/udev/write_net_rules"
|
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
|
become: yes
|
||||||
|
|
||||||
- name: Forcing recreation of {{ intnic }}
|
- name: Creo interfaccia interna in NethServer
|
||||||
shell: "INTERFACE=eth1 MATCHADDR={{ ansible_eth1.macaddress }} INTERFACE_NAME={{ intnic }} /lib/udev/write_net_rules"
|
shell: /sbin/e-smith/db networks set {{ intnic }} ethernet bootproto none device {{ intnic }} hwaddr {{ ansible_eth1.macaddress }} ipaddr 172.16.253.1 netmask 255.255.255.0 onboot yes role green
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Pulizia vecchie interfacce
|
- name: Pulizia vecchie interfacce
|
||||||
@ -22,14 +22,8 @@
|
|||||||
- eth0
|
- eth0
|
||||||
- eth1
|
- 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.253.1 netmask 255.255.255.0 onboot yes role green
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Trigger interfaces configuration
|
- name: Trigger interfaces configuration
|
||||||
shell: "ifdown eth0; ifdown eth1; udevadm control --reload-rules && udevadm trigger; /sbin/e-smith/signal-event interface-update"
|
shell: "ip link set eth0 down; ip link set eth0 name {{ extnic }}; ip link set eth1 down; ip link set eth1 name {{ intnic }}; /sbin/e-smith/signal-event interface-update"
|
||||||
become: yes
|
become: yes
|
||||||
|
async: 30
|
||||||
|
poll: 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user