{"id":54564,"date":"2019-12-29T00:00:00","date_gmt":"2019-12-28T21:00:00","guid":{"rendered":"https:\/\/prohoster.info\/blog\/blog_prohoster\/avtogeneratsiya-i-zalivka-elementov-konfiguratsij-setevyh-ustrojstv-s-pomoshhyu-nornir"},"modified":"2020-02-18T14:02:35","modified_gmt":"2020-02-18T11:02:35","slug":"avtogeneratsiya-i-zalivka-elementov-konfiguratsij-setevyh-ustrojstv-s-pomoshhyu-nornir","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/avtogeneratsiya-i-zalivka-elementov-konfiguratsij-setevyh-ustrojstv-s-pomoshhyu-nornir","title":{"rendered":"Autogjenerimi dhe ngarkimi i elementeve t\u00eb konfigurimeve t\u00eb pajisjeve rrjetore me ndihm\u00ebn e Nornir","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"\u0410\u0432\u0442\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438 \u0437\u0430\u043b\u0438\u0432\u043a\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Nornir\" src=\"\/wp-content\/uploads\/2019\/12\/cd75ad6f4adb8ca5aed7866305204a46.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! <\/p>\n<p><\/p>\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0441\u043a\u043e\u0447\u0438\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u044f <noindex><a rel=\"nofollow\" href=\"http:\/\/https:\/\/habr.com\/en\/post\/480404\/\">Mikrotik \u0438 Linux. \u0420\u0443\u0442\u0438\u043d\u0430 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/a><\/noindex> \u0433\u0434\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0435\u0448\u0430\u043b\u0438 \u0438\u0441\u043a\u043e\u043f\u0430\u0435\u043c\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438. \u0418 \u0445\u043e\u0442\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0442\u0438\u043f\u043e\u0432\u0430\u044f, \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043f\u0440\u043e \u043d\u0435\u0435 \u043a\u0430\u043a \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0438 \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f. \u041e\u0441\u043c\u0435\u043b\u044e\u0441\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u043e\u043c\u0443 \u0418\u0422-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443 \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. <\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p>\u042d\u0442\u043e \u043d\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0434\u043b\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u044b\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0435\u0449\u0435 \u043d\u0430 <em>ansible<\/em> \u0432\u0435\u0440\u0441\u0438\u0438 1.x.\u0445. \u0412\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0440\u0435\u0434\u043a\u043e \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0440\u0436\u0430\u0432\u0435\u043b. \u0412 \u0442\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435, \u0447\u0442\u043e \u0441\u0430\u043c\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u043a\u0430\u043a \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0435\u0440\u0441\u0438\u0438 <em>ansible<\/em>. \u0418 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0435\u0445\u0430\u0442\u044c, \u0442\u043e \u0446\u0435\u043f\u044c \u0441\u043f\u0430\u0434\u0435\u0442, \u0442\u043e \u043a\u043e\u043b\u0435\u0441\u043e \u043e\u0442\u0432\u0430\u043b\u0438\u0442\u0441\u044f. \u0412\u043f\u0440\u043e\u0447\u0435\u043c \u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u2014 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0430\u0435\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0447\u0435\u043d\u044c \u0447\u0435\u0442\u043a\u043e, \u0431\u043b\u0430\u0433\u043e <em>jinja2<\/em> \u0434\u0432\u0438\u0436\u043e\u043a \u0434\u0430\u0432\u043d\u043e \u0443\u0441\u0442\u043e\u044f\u0432\u0448\u0438\u0439\u0441\u044f. \u0410 \u0432\u043e\u0442 \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u2014 \u0440\u0430\u0441\u043a\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043f\u0440\u0435\u043f\u043e\u0434\u043d\u043e\u0441\u0438\u043b\u0430 \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u044b. \u0410 \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0430\u0441\u043a\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433 \u043c\u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e \u043d\u0430 \u043f\u043e\u043b \u0441\u043e\u0442\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0442\u044b\u0441\u044f\u0447\u0430\u0445 \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440\u043e\u0432, \u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0431\u044b\u043b\u043e \u0441\u043b\u0435\u0433\u043a\u0430 \u0441\u0441\u044b\u043a\u043e\u0442\u043d\u043e. <\/p>\n<p><\/p>\n<p>\u0422\u0443\u0442 \u043d\u0430\u0434\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u043e\u044f \u043d\u0435\u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u0441\u043a\u043e\u0440\u0435\u0439 \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0435 \u043c\u0435\u043d\u044f \u0441 <em>ansible<\/em>, \u0447\u0435\u043c \u0432 \u0435\u0433\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430\u0445. \u0418 \u0432\u043e\u0442 \u044d\u0442\u043e, \u043a\u0441\u0442\u0430\u0442\u0438, \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. <em>ansible<\/em> \u2014 \u044d\u0442\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f, \u0441\u0432\u043e\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0437\u043d\u0430\u043d\u0438\u0439 \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c DSL (Domain Specific Language), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0430 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435. \u041d\u0443 \u0438 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u0447\u0442\u043e <em>ansible<\/em> \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u0440\u0438\u0447\u0435\u043c \u0431\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0439 \u043e\u0433\u043b\u044f\u0434\u043a\u0438 \u043d\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c, \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442.<\/p>\n<p><\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u0431\u044b\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0430. \u041d\u0430 \u044d\u0442\u043e \u0440\u0430\u0437 \u043d\u0430 <em>python<\/em>, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u043d\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u043d\u0430 <em>python<\/em> \u0438 \u0434\u043b\u044f <em>python<\/em> \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <noindex><a rel=\"nofollow\" href=\"https:\/\/nornir.readthedocs.io\/\">Nornir<\/a><\/noindex><\/p>\n<p><\/p>\n<p>\u0418\u0442\u0430\u043a \u2014 <em>Nornir<\/em> \u044d\u0442\u043e \u043c\u0438\u043a\u0440\u043e\u0444\u0440\u0435\u0439\u043c\u043e\u043a, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 <em>python<\/em> \u0438 \u0434\u043b\u044f <em>python<\/em> \u0438 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u0422\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <em>ansible<\/em>, \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u0437\u0434\u0435\u0441\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u0430\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442.\u0435. \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0445\u043e\u0441\u0442\u043e\u0432 \u0438 \u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0430 \u0432\u043e\u0442 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u043f\u0438\u0448\u0443\u0442\u0441\u044f \u043d\u0435 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c DSL, \u0430 \u0432\u0441\u0435 \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0430\u0440\u043e\u043c, \u043d\u043e \u0432\u0435\u0441\u044c\u043c\u0430 \u0434\u043e\u0431\u0440\u043e\u043c \u043f[\u0438|\u0430\u0439]\u0442\u043e\u043d\u0435.<\/p>\n<p><\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043e\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0436\u0438\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435. <\/p>\n<p><\/p>\n<p>\u0415\u0441\u0442\u044c \u0443 \u043c\u0435\u043d\u044f \u0444\u0438\u043b\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0434\u0435\u0441\u044f\u0442\u043a\u0430\u043c\u0438 \u043e\u0444\u0438\u0441\u043e\u0432 \u043f\u043e \u0432\u0441\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0435. \u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0444\u0438\u0441\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 WAN-\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0441\u0432\u044f\u0437\u0438 \u043e\u0442 \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432. \u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 BGP. WAN-\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0431\u044b\u0432\u0430\u044e\u0442 \u0434\u0432\u0443\u0445 \u0442\u0438\u043f\u043e\u0432: Cisco ISG \u0438\u043b\u0438 Juniper SRX.<\/p>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0434\u0430\u0447\u0430: \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u0441\u0435\u0445 WAN-\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u0445 \u0444\u0438\u043b\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u0434\u043b\u044f \u0412\u0438\u0434\u0435\u043e\u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u0442\u0443 \u2014 \u0430\u043d\u043e\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u0432 BGP \u2014 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430.<\/p>\n<p><\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0443\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u043e Cisco \u0438 Juniper. \u0410 \u0442\u0430\u043a \u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0442.\u0435. \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0442\u043e \u0441\u0430\u043c\u043e\u0435 inventory<\/p>\n<p><\/p>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f Cisco:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ cat templates\/ios\/base.j2 \nclass-map match-all VIDEO_SURV\n match access-group 111\n\npolicy-map VIDEO_SURV\n class VIDEO_SURV\n    police 1500000 conform-action transmit  exceed-action drop\n\ninterface {{ host.task_data.ifname }}\n  description VIDEOSURV\n  ip address 10.10.{{ host.task_data.ipsuffix }}.254 255.255.255.0\n  service-policy input VIDEO_SURV\n\nrouter bgp {{ host.task_data.asn }}\n  network 10.40.{{ host.task_data.ipsuffix }}.0 mask 255.255.255.0\n\naccess-list 11 permit 10.10.{{ host.task_data.ipsuffix }}.0 0.0.0.255\naccess-list 111 permit ip 10.10.{{ host.task_data.ipsuffix }}.0 0.0.0.255 any<\/code><\/pre>\n<p><\/p>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f Juniper:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ cat templates\/junos\/base.j2 \nset interfaces {{ host.task_data.ifname }} unit 0 description \"Video surveillance\"\nset interfaces {{ host.task_data.ifname }} unit 0 family inet filter input limit-in\nset interfaces {{ host.task_data.ifname }} unit 0 family inet address 10.10.{{ host.task_data.ipsuffix }}.254\/24\nset policy-options policy-statement export2bgp term 1 from route-filter 10.10.{{ host.task_data.ipsuffix }}.0\/24 exact\nset security zones security-zone WAN interfaces {{ host.task_data.ifname }}\nset firewall policer policer-1m if-exceeding bandwidth-limit 1m\nset firewall policer policer-1m if-exceeding burst-size-limit 187k\nset firewall policer policer-1m then discard\nset firewall policer policer-1.5m if-exceeding bandwidth-limit 1500000\nset firewall policer policer-1.5m if-exceeding burst-size-limit 280k\nset firewall policer policer-1.5m then discard\nset firewall filter limit-in term 1 then policer policer-1.5m\nset firewall filter limit-in term 1 then count limiter<\/code><\/pre>\n<p><\/p>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d\u044b, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u043d\u0435 \u0441 \u043f\u043e\u0442\u043e\u043b\u043a\u0430. \u042d\u0442\u043e \u043f\u043e \u0441\u0443\u0442\u0438 diff-\u044b \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0431\u044b\u043b\u043e-\u0441\u0442\u0430\u043b\u043e \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 \u0434\u0432\u0443\u0445 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.<\/p>\n<p><\/p>\n<p>\u0418\u0437 \u043d\u0430\u0448\u0438\u0445 \u0448\u0430\u0431\u043e\u043d\u043e\u0432 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u0432\u0443\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f Juniper \u0438 3 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0434\u043b\u044f Cisco. \u0432\u043e\u0442 \u043e\u043d\u0438:<\/p>\n<p><\/p>\n<ul>\n<li>ifname<\/li>\n<li>ipsuffix<\/li>\n<li>asn<\/li>\n<\/ul>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u044d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0442.\u0435. \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e \u0441\u0430\u043c\u043e\u0435 <em>inventory<\/em>. <\/p>\n<p><\/p>\n<p>\u0414\u043b\u044f <em>inventory<\/em> \u0431\u0443\u0434\u0435\u043c \u0447\u0435\u0442\u043a\u043e \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <noindex><a rel=\"nofollow\" href=\"https:\/\/nornir.readthedocs.io\/en\/latest\/tutorials\/intro\/initializing_nornir.html\">Initializing Nornir<\/a><\/noindex> <\/p>\n<p><\/p>\n<p>\u0442.\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0441\u043a\u0435\u043b\u0435\u0442: <\/p>\n<p><\/p>\n<pre><code class=\"bash\">.\n\u251c\u2500\u2500 config.yaml\n\u251c\u2500\u2500 inventory\n\u2502   \u251c\u2500\u2500 defaults.yaml\n\u2502   \u251c\u2500\u2500 groups.yaml\n\u2502   \u2514\u2500\u2500 hosts.yaml<\/code><\/pre>\n<p><\/p>\n<p>\u0424\u0430\u0439\u043b config.yaml \u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 nornir<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">$ cat config.yaml \n---\ncore:\n    num_workers: 10\n\ninventory:\n    plugin: nornir.plugins.inventory.simple.SimpleInventory\n    options:\n        host_file: \"inventory\/hosts.yaml\"\n        group_file: \"inventory\/groups.yaml\"\n        defaults_file: \"inventory\/defaults.yaml\"<\/code><\/pre>\n<p><\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0431\u0443\u0434\u0435\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u0444\u0430\u0439\u043b\u0435 <em>hosts.yaml<\/em>, \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0435 (\u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043b\u043e\u0433\u0438\u043d\u044b\/\u043f\u0430\u0440\u043e\u043b\u0438) \u0432 <em>groups.yaml<\/em>, \u0430 \u0432 <em>defaults.yaml<\/em> \u043d\u0438\u0447\u0435\u0433\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043d\u043e \u0442\u0443\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0440\u0438 \u043c\u0438\u043d\u0443\u0441\u0430 \u2014 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0435, \u043d\u0430 \u0442\u043e \u0447\u0442\u043e \u044d\u0442\u043e <em>yaml<\/em> \u0444\u0430\u0439\u043b \u0445\u043e\u0442\u044c \u0438 \u043f\u0443\u0441\u0442\u043e\u0439. <\/p>\n<p><\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 hosts.yaml:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">---\nsrx-test:\n    hostname: srx-test\n    groups: \n        - juniper\n    data:\n        task_data:\n            ifname: fe-0\/0\/2\n            ipsuffix: 111\n\ncisco-test:\n    hostname: cisco-test\n    groups: \n        - cisco\n    data:\n        task_data:\n            ifname: GigabitEthernet0\/1\/1\n            ipsuffix: 222\n            asn: 65111<\/code><\/pre>\n<p><\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0442\u0430\u043a groups.yaml:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">---\ncisco:\n    platform: ios\n    username: admin1\n    password: cisco1\n\njuniper:\n    platform: junos\n    username: admin2\n    password: juniper2<\/code><\/pre>\n<p><\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u043b\u0443\u0438\u043b\u043e\u0441\u044c <em>inventory<\/em> \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 inventory-\u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u0430\u043f\u044f\u0442\u0441\u044f \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c <strong>InventoryElement<\/strong>. <\/p>\n<p>\n<b class=\"spoiler_title\">\u041f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c \u0441\u0445\u0435\u043c\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 InventoryElement<\/b><\/p>\n<pre><code class=\"json\">print(json.dumps(InventoryElement.schema(), indent=4))\n{\n    \"title\": \"InventoryElement\",\n    \"type\": \"object\",\n    \"properties\": {\n        \"hostname\": {\n            \"title\": \"Hostname\",\n            \"type\": \"string\"\n        },\n        \"port\": {\n            \"title\": \"Port\",\n            \"type\": \"integer\"\n        },\n        \"username\": {\n            \"title\": \"Username\",\n            \"type\": \"string\"\n        },\n        \"password\": {\n            \"title\": \"Password\",\n            \"type\": \"string\"\n        },\n        \"platform\": {\n            \"title\": \"Platform\",\n            \"type\": \"string\"\n        },\n        \"groups\": {\n            \"title\": \"Groups\",\n            \"default\": [],\n            \"type\": \"array\",\n            \"items\": {\n                \"type\": \"string\"\n            }\n        },\n        \"data\": {\n            \"title\": \"Data\",\n            \"default\": {},\n            \"type\": \"object\"\n        },\n        \"connection_options\": {\n            \"title\": \"Connection_Options\",\n            \"default\": {},\n            \"type\": \"object\",\n            \"additionalProperties\": {\n                \"$ref\": \"#\/definitions\/ConnectionOptions\"\n            }\n        }\n    },\n    \"definitions\": {\n        \"ConnectionOptions\": {\n            \"title\": \"ConnectionOptions\",\n            \"type\": \"object\",\n            \"properties\": {\n                \"hostname\": {\n                    \"title\": \"Hostname\",\n                    \"type\": \"string\"\n                },\n                \"port\": {\n                    \"title\": \"Port\",\n                    \"type\": \"integer\"\n                },\n                \"username\": {\n                    \"title\": \"Username\",\n                    \"type\": \"string\"\n                },\n                \"password\": {\n                    \"title\": \"Password\",\n                    \"type\": \"string\"\n                },\n                \"platform\": {\n                    \"title\": \"Platform\",\n                    \"type\": \"string\"\n                },\n                \"extras\": {\n                    \"title\": \"Extras\",\n                    \"type\": \"object\"\n                }\n            }\n        }\n    }\n}<\/code><\/pre>\n<p><\/p>\n<p>\u042d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u043e\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u0432 <strong>ipython<\/strong>. <\/p>\n<p><\/p>\n<pre><code class=\"bash\"> $ ipython3\nPython 3.6.9 (default, Nov  7 2019, 10:44:02) \nType 'copyright', 'credits' or 'license' for more information\nIPython 7.1.1 -- An enhanced Interactive Python. Type '?' for help.\n\nIn [1]: from nornir import InitNornir                                                                           \n\nIn [2]: nr = InitNornir(config_file=\"config.yaml\", dry_run=True)                                                \n\nIn [3]: nr.inventory.hosts                                                                                      \nOut[3]: \n{'srx-test': Host: srx-test, 'cisco-test': Host: cisco-test}\n\nIn [4]: nr.inventory.hosts['srx-test'].data                                                                                    \nOut[4]: {'task_data': {'ifname': 'fe-0\/0\/2', 'ipsuffix': 111}}\n\nIn [5]: nr.inventory.hosts['srx-test']['task_data']                                                     \nOut[5]: {'ifname': 'fe-0\/0\/2', 'ipsuffix': 111}\n\nIn [6]: nr.inventory.hosts['srx-test'].platform                                                                                \nOut[6]: 'junos'\n<\/code><\/pre>\n<p><\/p>\n<p>\u041d\u0443 \u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443. \u0422\u0443\u0442 \u043c\u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0433\u043e\u0440\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0447\u0435\u043c. \u042f \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u043b \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 <noindex><a rel=\"nofollow\" href=\"https:\/\/nornir.readthedocs.io\/en\/latest\/tutorials\/intro\/grouping_tasks.html\">\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430<\/a><\/noindex> \u0438 \u043f\u043e\u0447\u0442\u0438 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b. \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<p><\/p>\n<pre><code class=\"python\">from nornir import InitNornir\nfrom nornir.plugins.tasks import networking, text\nfrom nornir.plugins.functions.text import print_title, print_result\n\ndef config_and_deploy(task):\n    # Transform inventory data to configuration via a template file\n    r = task.run(task=text.template_file,\n                 name=\"Base Configuration\",\n                 template=\"base.j2\",\n                 path=f\"templates\/{task.host.platform}\")\n\n    # Save the compiled configuration into a host variable\n    task.host[\"config\"] = r.result\n\n    # Save the compiled configuration into a file\n    with open(f\"configs\/{task.host.hostname}\", \"w\") as f:\n        f.write(r.result)\n\n    # Deploy that configuration to the device using NAPALM\n    task.run(task=networking.napalm_configure,\n             name=\"Loading Configuration on the device\",\n             replace=False,\n             configuration=task.host[\"config\"])\n\nnr = InitNornir(config_file=\"config.yaml\", dry_run=True) # set dry_run=False, cross your fingers and run again\n\n# run tasks\nresult = nr.run(task=config_and_deploy)\nprint_result(result)<\/code><\/pre>\n<p><\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>dry_run=True<\/em> \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <strong>nr<\/strong>.<br \/>\n\u0422\u0443\u0442 \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 \u0432 <em>ansible<\/em> \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0433\u043e\u043d \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c, \u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0442\u0435\u043c \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c (\u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u0447\u043d\u043e; \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0432 NAPALM), \u043d\u043e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0414\u043b\u044f \u0431\u043e\u0435\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>dry_run<\/em> \u043b\u0438\u0431\u043e \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 <em>False<\/em>. <\/p>\n<p><\/p>\n<p>\u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f Nornir \u0432\u044b\u0434\u0430\u0435\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u043b\u043e\u0433\u0438. <\/p>\n<p>\n<b class=\"spoiler_title\">\u041f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c \u0432\u044b\u0432\u043e\u0434 \u0431\u043e\u0435\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u043e\u043d\u0430 \u043d\u0430 \u0434\u0432\u0443\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043c\u0430\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u0445:<\/b><\/p>\n<pre><code class=\"plaintext\">config_and_deploy***************************************************************\n* cisco-test ** changed : True *******************************************\nvvvv config_and_deploy ** changed : True vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO\n---- Base Configuration ** changed : True ------------------------------------- INFO\nclass-map match-all VIDEO_SURV\n match access-group 111\n\npolicy-map VIDEO_SURV\n class VIDEO_SURV\n    police 1500000 conform-action transmit  exceed-action drop\n\ninterface GigabitEthernet0\/1\/1\n  description VIDEOSURV\n  ip address 10.10.222.254 255.255.255.0\n  service-policy input VIDEO_SURV\n\nrouter bgp 65001\n  network 10.10.222.0 mask 255.255.255.0\n\naccess-list 11 permit 10.10.222.0 0.0.0.255\naccess-list 111 permit ip 10.10.222.0 0.0.0.255 any\n---- Loading Configuration on the device ** changed : True --------------------- INFO\n+class-map match-all VIDEO_SURV\n+ match access-group 111\n+policy-map VIDEO_SURV\n+ class VIDEO_SURV\n+interface GigabitEthernet0\/1\/1\n+  description VIDEOSURV\n+  ip address 10.10.222.254 255.255.255.0\n+  service-policy input VIDEO_SURV\n+router bgp 65001\n+  network 10.10.222.0 mask 255.255.255.0\n+access-list 11 permit 10.10.222.0 0.0.0.255\n+access-list 111 permit ip 10.10.222.0 0.0.0.255 any\n^^^^ END config_and_deploy ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n* srx-test ** changed : True *******************************************\nvvvv config_and_deploy ** changed : True vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO\n---- Base Configuration ** changed : True ------------------------------------- INFO\nset interfaces fe-0\/0\/2 unit 0 description \"Video surveillance\"\nset interfaces fe-0\/0\/2 unit 0 family inet filter input limit-in\nset interfaces fe-0\/0\/2 unit 0 family inet address 10.10.111.254\/24\nset policy-options policy-statement export2bgp term 1 from route-filter 10.10.111.0\/24 exact\nset security zones security-zone WAN interfaces fe-0\/0\/2\nset firewall policer policer-1m if-exceeding bandwidth-limit 1m\nset firewall policer policer-1m if-exceeding burst-size-limit 187k\nset firewall policer policer-1m then discard\nset firewall policer policer-1.5m if-exceeding bandwidth-limit 1500000\nset firewall policer policer-1.5m if-exceeding burst-size-limit 280k\nset firewall policer policer-1.5m then discard\nset firewall filter limit-in term 1 then policer policer-1.5m\nset firewall filter limit-in term 1 then count limiter\n---- Loading Configuration on the device ** changed : True --------------------- INFO\n[edit interfaces]\n+   fe-0\/0\/2 {\n+       unit 0 {\n+           description \"Video surveillance\";\n+           family inet {\n+               filter {\n+                   input limit-in;\n+               }\n+               address 10.10.111.254\/24;\n+           }\n+       }\n+   }\n[edit]\n+  policy-options {\n+      policy-statement export2bgp {\n+          term 1 {\n+              from {\n+                  route-filter 10.10.111.0\/24 exact;\n+              }\n+          }\n+      }\n+  }\n[edit security zones]\n     security-zone test-vpn { ... }\n+    security-zone WAN {\n+        interfaces {\n+            fe-0\/0\/2.0;\n+        }\n+    }\n[edit]\n+  firewall {\n+      policer policer-1m {\n+          if-exceeding {\n+              bandwidth-limit 1m;\n+              burst-size-limit 187k;\n+          }\n+          then discard;\n+      }\n+      policer policer-1.5m {\n+          if-exceeding {\n+              bandwidth-limit 1500000;\n+              burst-size-limit 280k;\n+          }\n+          then discard;\n+      }\n+      filter limit-in {\n+          term 1 {\n+              then {\n+                  policer policer-1.5m;\n+                  count limiter;\n+              }\n+          }\n+      }\n+  }\n^^^^ END config_and_deploy ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<\/code><\/pre>\n<p><\/p>\n<h3 id=\"pryachem-paroli-v-ansible_vault\">\u041f\u0440\u044f\u0447\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u0438 \u0432 ansible_vault<\/h3>\n<p><\/p>\n<p>\u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0435\u0445\u0430\u043b \u043d\u0430 <em>ansible<\/em>, \u043d\u043e \u0442\u0430\u043c \u043d\u0435 \u0432\u0441\u0435 \u0442\u0430\u043a \u043f\u043b\u043e\u0445\u043e. \u041e\u0447\u0435\u043d\u044c \u043c\u043d\u0435 \u0443 \u043d\u0438\u0445 <strong>vault<\/strong> \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0441\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0447\u0443\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441 \u0433\u043b\u0430\u0437 \u0434\u043e\u043b\u043e\u0439. \u0418 \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u043c\u043d\u043e\u0433\u0438\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435 \u043b\u043e\u0433\u0438\u043d\u044b\/\u043f\u0430\u0440\u043e\u043b\u0438 \u043a\u043e \u0432\u0441\u0435\u043c \u0431\u043e\u0435\u0432\u044b\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c \u0441\u0432\u0435\u0440\u043a\u0430\u044e\u0442 \u0432 \u043e\u0442\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435 \u0432 \u0444\u0430\u0439\u043b\u0435 <em>gorups.yaml<\/em>. \u041d\u0435\u043a\u0440\u0430\u0441\u0438\u0432\u043e \u044d\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0449\u0438\u0442\u0438\u043c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>vault<\/strong>.<\/p>\n<p><\/p>\n<p>\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 groups.yaml \u0432 creds.yaml, \u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u0443\u0435\u043c \u0435\u0433\u043e AES256 c 20-\u0437\u043d\u0430\u0447\u043d\u044b\u043c \u043f\u0430\u0440\u043e\u043b\u0435\u043c:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ cd inventory\n$ cat creds.yaml\n---\ncisco:\n    username: admin1\n    password: cisco1\n\njuniper:\n    username: admin2\n    password: juniper2\n\n$ pwgen 20 -N 1 &gt; vault.passwd\nansible-vault encrypt creds.yaml --vault-password-file vault.passwd  \nEncryption successful\n$ cat creds.yaml \n$ANSIBLE_VAULT;1.1;AES256\n39656463353437333337356361633737383464383231366233386636333965306662323534626131\n3964396534396333363939373539393662623164373539620a346565373439646436356438653965\n39643266333639356564663961303535353364383163633232366138643132313530346661316533\n6236306435613132610a656163653065633866626639613537326233653765353661613337393839\n62376662303061353963383330323164633162386336643832376263343634356230613562643533\n30363436343465306638653932366166306562393061323636636163373164613630643965636361\n34343936323066393763323633336366366566393236613737326530346234393735306261363239\n35663430623934323632616161636330353134393435396632663530373932383532316161353963\n31393434653165613432326636616636383665316465623036376631313162646435<\/code><\/pre>\n<p><\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0448 <em>Nornir<\/em>-\u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435.<br \/>\n\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <em>nr = InitNornir(config_file=&#8230;<\/em> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<p><\/p>\n<pre><code class=\"python\">...\nnr = InitNornir(config_file=\"config.yaml\", dry_run=True) # set dry_run=False, cross your fingers and run again\n\n# enrich Inventory with the encrypted vault data\nfrom ansible_vault import Vault\nvault_password_file=\"inventory\/vault.passwd\"\nvault_file=\"inventory\/creds.yaml\"\nwith open(vault_password_file, \"r\") as fp:\n    password = fp.readline().strip()   \n    vault = Vault(password)\n    vaultdata = vault.load(open(vault_file).read())\n\nfor a in nr.inventory.hosts.keys():\n    item = nr.inventory.hosts[a]\n    item.username = vaultdata[item.groups[0]]['username']\n    item.password = vaultdata[item.groups[0]]['password']\n    #print(\"hostname={}, username={}, password={}n\".format(item.hostname, item.username, item.password))\n\n# run tasks\n...<\/code><\/pre>\n<p><\/p>\n<p>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f vault.passwd \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043b\u0435\u0436\u0430\u0442\u044c \u0440\u044f\u0434\u043e\u043c \u0441 creds.yaml \u043a\u0430\u043a \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u041d\u043e \u0434\u043b\u044f \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u0439\u0434\u0435\u0442. <\/p>\n<p><\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e\u043a\u0430 \u0432\u0441\u0435. \u041d\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u0435\u0449\u0435 \u043f\u0430\u0440\u0430 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e Cisco + Zabbix, \u043d\u043e \u044d\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044e. \u0410 \u0432 \u043d\u0435\u0434\u0430\u043b\u0435\u043a\u043e\u043c \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e RESTCONF \u0432 Cisco.<\/p>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/482194\/\">habr.com<\/a><\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0441\u043a\u043e\u0447\u0438\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u044f Mikrotik \u0438 Linux. \u0420\u0443\u0442\u0438\u043d\u0430 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0434\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0435\u0448\u0430\u043b\u0438 \u0438\u0441\u043a\u043e\u043f\u0430\u0435\u043c\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438. \u0418 \u0445\u043e\u0442\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0442\u0438\u043f\u043e\u0432\u0430\u044f, \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043f\u0440\u043e \u043d\u0435\u0435 \u043a\u0430\u043a \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0438 \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f. \u041e\u0441\u043c\u0435\u043b\u044e\u0441\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u043e\u043c\u0443 \u0418\u0422-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443 \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u042d\u0442\u043e \u043d\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0434\u043b\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u044b\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0435\u0449\u0435 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":54565,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-54564","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0441\u043a\u043e\u0447\u0438\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u044f Mikrotik \u0438 Linux. \u0420\u0443\u0442\u0438\u043d\u0430 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0434\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0435\u0448\u0430\u043b\u0438 \u0438\u0441\u043a\u043e\u043f\u0430\u0435\u043c\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438. \u0418 \u0445\u043e\u0442\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0442\u0438\u043f\u043e\u0432\u0430\u044f, \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043f\u0440\u043e \u043d\u0435\u0435 \u043a\u0430\u043a \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0438 \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f. \u041e\u0441\u043c\u0435\u043b\u044e\u0441\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u043e\u043c\u0443 \u0418\u0422-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443 \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u042d\u0442\u043e \u043d\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0434\u043b\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u044b\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0435\u0449\u0435\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/avtogeneratsiya-i-zalivka-elementov-konfiguratsij-setevyh-ustrojstv-s-pomoshhyu-nornir\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0410\u0432\u0442\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438 \u0437\u0430\u043b\u0438\u0432\u043a\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Nornir | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0441\u043a\u043e\u0447\u0438\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u044f Mikrotik \u0438 Linux. \u0420\u0443\u0442\u0438\u043d\u0430 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0434\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0435\u0448\u0430\u043b\u0438 \u0438\u0441\u043a\u043e\u043f\u0430\u0435\u043c\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438. \u0418 \u0445\u043e\u0442\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0442\u0438\u043f\u043e\u0432\u0430\u044f, \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043f\u0440\u043e \u043d\u0435\u0435 \u043a\u0430\u043a \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0438 \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f. \u041e\u0441\u043c\u0435\u043b\u044e\u0441\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u043e\u043c\u0443 \u0418\u0422-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443 \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u042d\u0442\u043e \u043d\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0434\u043b\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u044b\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0435\u0449\u0435\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/avtogeneratsiya-i-zalivka-elementov-konfiguratsij-setevyh-ustrojstv-s-pomoshhyu-nornir\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-12-28T21:00:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-02-18T11:02:35+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Autogjenerimi dhe ngarkimi i elementeve t\u00eb konfigurimeve t\u00eb pajisjeve rrjeti me ndihm\u00ebn e Nornir | ProHoster","description":"P\u00ebrsh\u00ebndetje, Habr! Para disa koh\u00ebsh, k\u00ebtu kaloi nj\u00eb artikull mbi Mikrotik dhe Linux. Rutinat dhe automatizimi, ku nj\u00eb detyr\u00eb t\u00eb till\u00eb e zgjidh\u00ebn me mjete t\u00eb shkuar\u00ebs. Edhe pse detyra \u00ebsht\u00eb krejt tipike, n\u00eb Habr nuk ka ndonj\u00eb informacion t\u00eb ngjash\u00ebm. M\u00eb lejoni t\u00eb sugjeroj nj\u00eb bi\u00e7iklet\u00eb t\u00eb re p\u00ebr komunitetin e nderuar t\u00eb IT-s\u00eb. Kjo nuk \u00ebsht\u00eb bi\u00e7ikleta e par\u00eb p\u00ebr nj\u00eb detyr\u00eb t\u00eb till\u00eb. Varianti i par\u00eb u realizua disa vjet m\u00eb par\u00eb.","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/avtogeneratsiya-i-zalivka-elementov-konfiguratsij-setevyh-ustrojstv-s-pomoshhyu-nornir","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0410\u0432\u0442\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438 \u0437\u0430\u043b\u0438\u0432\u043a\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Nornir | ProHoster","og:description":"\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0441\u043a\u043e\u0447\u0438\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u044f Mikrotik \u0438 Linux. \u0420\u0443\u0442\u0438\u043d\u0430 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0434\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0435\u0448\u0430\u043b\u0438 \u0438\u0441\u043a\u043e\u043f\u0430\u0435\u043c\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438. \u0418 \u0445\u043e\u0442\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0442\u0438\u043f\u043e\u0432\u0430\u044f, \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043f\u0440\u043e \u043d\u0435\u0435 \u043a\u0430\u043a \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0438 \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f. \u041e\u0441\u043c\u0435\u043b\u044e\u0441\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u043e\u043c\u0443 \u0418\u0422-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443 \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u042d\u0442\u043e \u043d\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0434\u043b\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u044b\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0435\u0449\u0435","og:url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/avtogeneratsiya-i-zalivka-elementov-konfiguratsij-setevyh-ustrojstv-s-pomoshhyu-nornir","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-12-28T21:00:00+00:00","article:modified_time":"2020-02-18T11:02:35+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"54564","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-24 11:52:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 20:02:46","updated":"2026-01-24 11:52:19"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/54564","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=54564"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/54564\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/54565"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=54564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=54564"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=54564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}