Skip to content
Snippets Groups Projects
Commit 58f7edae authored by alexandr.benzonan's avatar alexandr.benzonan
Browse files

fix iface restart

parent b168d9f2
No related branches found
No related tags found
No related merge requests found
- name: Set eth0 static
hosts: all
vars_files:
- vars.yml
tasks:
- name: Set iface static
template:
src: static_iface.j2
dest: /etc/network/interfaces.d/ansible.conf
mode: 0644
- name: Restart networking eth0
hosts: all
tasks:
- name: Restart networking eth0
shell: ifdown eth0 && ifup eth0
- name: Restart networking eth1
hosts: routers
tasks:
- name: Restart networking eth1
shell: ifdown eth1 && ifup eth1
notify: Restart networking
handlers:
- name: Restart networking
service:
name: networking
state: restarted
- name: Test config by pinging
hosts: H1
tasks:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment