Compare commits

..

No commits in common. "c0f62fe8a0e8b37e854c1f079ed93f7e5de9722b" and "daf8badd85f78c83f152f76bad3a6d80853b5611" have entirely different histories.

2 changed files with 13 additions and 14 deletions

View File

@ -2,7 +2,4 @@
host_key_checking=False
inventory=hosts
roles_path=roles
[ssh_connections]
#ssh_args= -o ServerAliveInterval=30 -o ControlMaster=auto -o ControlPersist=60s
pipelining=True

View File

@ -7,21 +7,23 @@
state: absent
become: yes
- name: Removing old interfaces from db networks
- 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: Pulizia vecchie interfacce
shell: "/sbin/e-smith/db networks delete {{ item }}"
become: yes
with_items:
- eth0
- eth1
- name: Configuring new external interface
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: Configuring new internal interface
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 change
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; /sbin/e-smith/signal-event firewall-adjust"
- name: Trigger interfaces configuration
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
async: 30
poll: 0