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