17 lines
333 B
YAML
17 lines
333 B
YAML
---
|
|
- name: get int name
|
|
shell: ip -o addr show to {{ item }} | awk '{print $2}'
|
|
register: int_name
|
|
|
|
|
|
- name: add interface ip
|
|
blockinfile:
|
|
path: /etc/frr/frr.conf
|
|
block: |
|
|
!
|
|
interface {{ int_name.stdout }}
|
|
ip address {{ item }}
|
|
ip ospf cost 20
|
|
exit
|
|
marker: ""
|
|
notify: restart frr |