Skip to content

Commit

Permalink
add frr.conf and remove iptables and resolv.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
iljarotar committed Dec 5, 2024
1 parent 66056b3 commit f7a2f44
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 30 deletions.
5 changes: 0 additions & 5 deletions partition/roles/ztp/defaults/main/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,3 @@ ztp_port: 8080
ztp_additional_files: []
# - name: foo.sh
# data: echo

ztp_sonic_nameservers: []
ztp_sonic_extended_cacl:
ipv4: []
ipv6: []
9 changes: 9 additions & 0 deletions partition/roles/ztp/files/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
frr defaults datacenter
password zebra
enable password zebra
!
log syslog informational
log facility local4
!
agentx
!
8 changes: 7 additions & 1 deletion partition/roles/ztp/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@
- ztp.json.j2
- ztp.sh.j2

- name: copy additional contents
- name: copy frr.conf
copy:
dest: "{{ ztp_host_dir_path }}/config/frr.conf"
src: frr.conf
mode: 0644

- name: copy additional files
copy:
dest: "{{ ztp_host_dir_path }}/config/{{ item.name }}"
content: "{{ item.data }}"
Expand Down
13 changes: 0 additions & 13 deletions partition/roles/ztp/templates/iptables.json.j2

This file was deleted.

3 changes: 0 additions & 3 deletions partition/roles/ztp/templates/resolv.conf.j2

This file was deleted.

10 changes: 2 additions & 8 deletions partition/roles/ztp/templates/ztp.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@
"files": [
{
"url": {
"source": "http://{{ ztp_listen_address }}:{{ ztp_port }}/resolv.conf",
"destination": "/etc/resolv.conf"
}
},
{
"url": {
"source": "http://{{ ztp_listen_address }}:{{ ztp_port }}/iptables.json",
"destination": "/etc/sonic/iptables.json"
"source": "http://{{ ztp_listen_address }}:{{ ztp_port }}/frr.conf",
"destination": "/etc/sonic/frr/frr.conf"
}
}
]
Expand Down

0 comments on commit f7a2f44

Please sign in to comment.