Skip to content

Commit

Permalink
use correct address for ztp
Browse files Browse the repository at this point in the history
  • Loading branch information
iljarotar committed Oct 15, 2024
1 parent 74d28ee commit 0352132
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions partition/roles/ztp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Configures a server for providing zero-touch-provisioning scripts for switches.
| ztp_nginx_image_name | yes | the docker image to use to serve ztp scripts. |
| ztp_nginx_image_tag | yes | the tag of the docker image to use to serve ztp scripts. |
| ztp_host_dir_path | | the path to serve ztp scripts from. |
| ztp_listen_address | | the address used to serve ztp requests |
| ztp_port | | the port to serve ztp scripts on. |
| ztp_authorized_keys | yes | the authorized keys that should be installed by ztp. |
| ztp_admin_user | | the user for which the authorized keys will be provisioned. |
Expand Down
1 change: 1 addition & 0 deletions partition/roles/ztp/defaults/main/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ztp_host_dir_path: /ztp
ztp_authorized_keys:
ztp_admin_user: admin

ztp_listen_address: "{{ ansible_host }}"
ztp_port: 8080

ztp_additional_files: []
Expand Down
4 changes: 2 additions & 2 deletions partition/roles/ztp/templates/ztp.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"ztp": {
"02-user": {
"plugin": {
"url": "http://{{ ztp_host_dir_path }}/ztp.sh"
"url": "http://{{ ztp_listen_address }}:{{ ztp_port }}/ztp.sh"
}
},
"03-configdb-json": {
"url": {
"source": "http://{{ ztp_host_dir_path }}/config_db.json"
"source": "http://{{ ztp_listen_address }}:{{ ztp_port }}/config_db.json"
},
"clear-config": false
}
Expand Down

0 comments on commit 0352132

Please sign in to comment.