I am trying to figure out how to put information from a switch config using ansible so it can be manipulated and used as data in your ansible playbook. For example, all switches have a configuration section similar to the following:
archival {
configuration {
transfer-on-commit;
archive-sites {
“ftp://ftpuser:ftppassword@10.120.255.150/subc/ftp/jnpr/cfg/dp-b284-agg”;
}
I’m trying to figure out how to put the ftp:// line and manipulate that string so i can replace the ip with a new/different ip, in addition i want to pull out the directory structure so i can use that path to create the needed directory structure on the new server. would any one have any tips on this?