Добавить ansible_conf_frr.yml

This commit is contained in:
2026-03-22 21:15:49 +03:00
parent b5a0d85614
commit 9c1bc71dbf

17
ansible_conf_frr.yml Normal file
View File

@@ -0,0 +1,17 @@
---
- 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