Python for Network Engineers Question per device text file

@Khawar. I did not want to help up the first session on it. What I was asking about was if you were going to cover a scenario such as this.

Let us say that we needed for add loopback 10 for every device in our network. We want to use the same script for every device but need a way to separate the device information. So Router 1 would have a text file for it that has the new loopback 10 IP Address, Router 2 would have a text file for it that would have its own loopback 10 IP Address. This way the script could just reference a list of routers and for each router go into its text file to know what IP Address to use for it. So one text file with the list of host for the script to run on and say we have 10 Routers to configure. We would have 10 text files with the name of each router with its IP address information. Then next week we determine we need to change the timezone for each device to match up with its location. We could again use the same script but just add the timezone portion to look for the timezone that is specified in each Routers text file. Files would be hosts.txt which list the IP Addresses of the host. router1.txt would be the file where we put its ip address and time zone. router2.txt would be its ip address and time zone. That way we can later on do any kind of script and can keep the script simple and just add the device specifics to each host files text file. Hope that makes sense.