Добавить ansible_conf_frr.yml
This commit is contained in:
17
ansible_conf_frr.yml
Normal file
17
ansible_conf_frr.yml
Normal 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
|
||||
Reference in New Issue
Block a user