diff --git a/roles/host-init/handlers/main.yml b/roles/host-init/handlers/main.yml index f3d1c56..531aa8c 100644 --- a/roles/host-init/handlers/main.yml +++ b/roles/host-init/handlers/main.yml @@ -17,7 +17,7 @@ become: yes - name: restart network - service: name=network state=restarted + service: name=NetworkManager state=restarted become: yes - name: restart resolved diff --git a/roles/host-init/tasks/publicInterface.yml b/roles/host-init/tasks/publicInterface.yml index 3dbd0dd..2e46665 100644 --- a/roles/host-init/tasks/publicInterface.yml +++ b/roles/host-init/tasks/publicInterface.yml @@ -1,4 +1,3 @@ - name: Configure the public network card - template: src=ifcfg-pip.j2 dest=/etc/sysconfig/network-scripts/ifcfg-pip0 owner=root group=root mode=644 - notify: restart network + shell: nmcli connection add type tun ifname pip0 con-name pip0 mode tap ip4 {{ advertise_address }}/24 tags: publicNetwork diff --git a/roles/host-init/templates/ifcfg-pip.j2 b/roles/host-init/templates/ifcfg-pip.j2 deleted file mode 100644 index 059fb0a..0000000 --- a/roles/host-init/templates/ifcfg-pip.j2 +++ /dev/null @@ -1,8 +0,0 @@ -DEVICE=pip0 -ONBOOT=yes -BOOTPROTO=static -IPADDR={{ advertise_address }} -NETMASK=255.255.255.255 -PERFIX=32 -USERCTL=no -TYPE=Tap