{"id":352557,"date":"2024-05-20T22:10:59","date_gmt":"2024-05-20T22:10:59","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=352557"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=352557","title":{"rendered":"<span>\u0410\u0432\u0442\u043e\u0432\u0430\u0439\u0442\u043b\u0438\u0441\u0442\u0438\u043c \u0432\u0430\u0448 Fortigate \u0441 Ansible<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f4e\/631\/2ba\/f4e6312ba118adfe24ba8345ae0d4cd4.png\" width=\"995\" height=\"741\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f4e\/631\/2ba\/f4e6312ba118adfe24ba8345ae0d4cd4.png\"\/><\/figure>\n<p>\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a! \u0412\u0441\u0435 \u043c\u044b \u0432 \u0430\u0439\u0442\u0438 \u0445\u043e\u0442\u0438\u043c \u0436\u0438\u0442\u044c \u0431\u0435\u0437 \u0437\u0430\u0431\u043e\u0442, \u0431\u0435\u0437 \u0430\u0442\u0430\u043a \u043d\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u041d\u0435 \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043b\u0435\u0432\u044b\u0435 \u043b\u044e\u0434\u0438 \u0438 \u0440\u043e\u0431\u043e\u0442\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0438 \u0432 \u043d\u0430\u0448\u0443 \u0441\u0435\u0442\u044c \u0438 \u0438\u043c\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0440\u0435\u0432\u043d\u0438\u043c\u0438 \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d\u0430\u043c\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d \u0432\u0435\u043b\u0438\u043a\u0438\u0439 \u0438 \u0443\u0436\u0430\u0441\u043d\u044b\u0439 \u0444\u0430\u0439\u0440\u0432\u043e\u043b. \u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u0445 \u0432\u0440\u043e\u0434\u0435 \u0442\u043e\u0433\u043e \u0436\u0435 Fortigate \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0438 \u043a\u0440\u0430\u0439\u043d\u0435 \u0442\u043e\u0447\u0435\u0447\u043d\u043e \u0440\u0443\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a, \u0434\u0430\u0432\u0430\u0442\u044c \u043b\u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u043c \u0438 \u0442\u0434.<\/p>\n<p>\u041d\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 &#8212; \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u044d\u0442\u043e \u0434\u043e\u0431\u0440\u043e \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043d\u0430\u0434\u043e \u0440\u0443\u0447\u043a\u0430\u043c\u0438. \u041a\u043e\u0433\u0434\u0430 \u0442\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0448\u044c \u043a\u043e\u0440\u043f \u0441\u0435\u0442\u044c \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0431\u043e\u043b\u044c\u043d\u043e, \u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0432 \u0442\u0432\u043e\u044e \u0441\u0435\u0442\u044c \u043d\u0430\u0434\u043e \u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043d\u043e\u0433\u043e \u043c\u0430\u0448\u0438\u043d \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438, \u0438\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0442\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430, \u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0433\u0440\u0443\u0441\u0442\u043d\u043e. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 \u0440\u0443\u043a\u0438 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0433 \u0431\u044b \u0438 \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438 \u0432\u0435\u0449\u0430\u043c\u0438 \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f.<\/p>\n<p>\u041d\u043e \u0438\u043d\u0436\u0435\u043d\u0435\u0440, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0432\u043e\u043f\u0441, \u043d\u0430 \u0442\u043e \u0438 \u0438\u043d\u0436\u0435\u043d\u0435\u0440. \u0412\u0438\u0434\u0438\u0448\u044c \u0447\u0442\u043e-\u0442\u043e, \u0447\u0442\u043e \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f &#8212; \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0439. \u041d\u0435 \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f? \u0414\u0432\u0438\u0433\u0430\u0439 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0439!<\/p>\n<h2>\u0414\u0432\u0438\u0433\u0430\u0439 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0439!<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/221\/2e9\/f64\/2212e9f642ecaf357803624e1f2c5748.png\" width=\"1920\" height=\"1000\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/221\/2e9\/f64\/2212e9f642ecaf357803624e1f2c5748.png\"\/><\/figure>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e \u043e \u043d\u0430\u0448\u0435\u043c \u043a\u0435\u0439\u0441\u0435: \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0430\u0439\u0440\u0432\u043e\u043b\u0430 \u0441\u0442\u043e\u0438\u0442 Fortigate; \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0448 \u043f\u043e\u0440\u0442\u0430\u043b \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 Jira \u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0441\u043a\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 CHG (Change). \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u044b \u0431\u0440\u0430\u043b\u0438 \u043d\u0430 \u0441\u0435\u0431\u044f \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443, \u0445\u043e\u0434\u0438\u043b\u0438 \u0432 fortigate, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0433\u0440\u0443\u043f\u043f\u0443 \u0438\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0438 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0438 \u0432 \u043d\u0435\u0435 \u0430\u0434\u0440\u0435\u0441\u0430, \u0430 \u0433\u0440\u0443\u043f\u043f\u0443 \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u043b\u0438\u0441\u0438, \u0432\u0435\u0434\u0443\u0449\u0443\u044e \u043a \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, RabbitMQ, TCP, SSH \u0438 \u0442\u0434)<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0443\u0442\u0438\u043d\u043d\u0430\u044f, \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u0430\u044f \u0432\u0441\u0435\u0433\u0434\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u044f\u0442\u044c \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>\u041d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u043c\u043e\u0433 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0442\u0430\u043a\u0436\u0435, \u0447\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0439 \u0440\u0443\u0442\u0438\u043d\u044b \u043b\u0435\u0436\u0430\u0442 \u043d\u0430 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 &#8212; fortigate \u0438 Jira \u0438\u043c\u0435\u044e\u0442 API . \u0411\u0438\u043d\u0433\u043e!<\/p>\n<p>\u0411\u0435\u0440\u0435\u043c \u0432 \u0440\u0443\u0447\u043a\u0438 \u043c\u043e\u0437\u0433\u0438, \u043d\u0430\u0432\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043f\u043e API \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432.<\/p>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0440\u043d\u043e\u0439 \u043c\u0430\u0433\u0438\u0438, <s>\u0433\u043e\u0432\u043d\u043e\u043a\u043e\u0434\u0430<\/s> \u0438 \u0432\u0441\u0451 \u0432\u0437\u043b\u0435\u0442\u0438\u0442. \u0425\u043e\u0442\u044f, \u0437\u0430\u0447\u0435\u043c \u043d\u0430\u043f\u0440\u044f\u0433\u0430\u0442\u044c\u0441\u044f? \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0448 \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u0432 \u0432\u0430\u043a\u0443\u0443\u043c\u0435 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0436\u0435 IaC. \u041a\u043e\u043f\u0430\u0435\u043c \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0435\u0449\u0435 \u043a\u043e\u0435-\u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u043e\u0435 &#8212; \u0438 \u0434\u043b\u044f Jira , \u0438 \u0434\u043b\u044f fortigate \u0443 Ansible \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 (\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u043e\u0431\u0435\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 API).<\/p>\n<p>\u041d\u0443, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043e\u0431\u044f\u0437\u0430\u043d\u044b \u044d\u0442\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c!<\/p>\n<p>\u041e\u0431\u0441\u0443\u0434\u0438\u043c <strong>\u0432\u043e\u0440\u043a\u0444\u043b\u043e\u0443<\/strong> \u043d\u0430\u0448\u0435\u0439 \u0431\u0443\u0434\u0443\u0449\u0435\u0439 \u043f\u043e\u0434\u0434\u0435\u043b\u043a\u0438 \u0438 \u043d\u0430\u0447\u043d\u0435\u043c \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u0432\u043e\u043f\u043b\u043e\u0449\u0430\u0442\u044c \u0435\u0435 \u0432 \u0436\u0438\u0437\u043d\u044c:<\/p>\n<ol>\n<li>\n<p>\u041a\u0442\u043e-\u0442\u043e (\u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440, \u043f\u0435\u0440\u0432\u0430\u044f \u043b\u0438\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438) \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 , \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 &#171;\u0425\u043e\u0447\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u0441 \u043c\u043e\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0430\u0434\u0440\u0435\u0441 \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f) \u0434\u043e \u0447\u0430\u0441\u0442\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 (\u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0451 &#171;\u0417\u0430\u043a\u0443\u043f\u043a\u0430 \u043a\u0435\u043a\u0441\u0438\u043a\u043e\u0432&#187;)&#187;<\/p>\n<\/li>\n<li>\n<p>\u041e\u043d \u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u0442\u0430\u0441\u043a \u0432 Jira, \u0441 \u0444\u043e\u0440\u043c\u043e\u0447\u043a\u043e\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044f (\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0449\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\/\u043f\u0440\u0435-\u043f\u0440\u043e\u0434 )<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u043c\u0430\u0440\u043a\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043b\u0435\u0439\u0431\u043b\u043e\u043c &#171;whitelisting&#187; \u0438 \u0435\u0435 \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 &#171;Ready to Dev&#187; (\u043b\u0435\u0439\u0431\u043b \u0438 \u0441\u0442\u0430\u0442\u0443\u0441 \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 Ansible)<\/p>\n<\/li>\n<li>\n<p>Scheduled task \u043d\u0430 AWX \u0445\u043e\u0434\u0438\u0442 \u0440\u0430\u0437 \u0432 30 \u043c\u0438\u043d\u0443\u0442 \u0432 Jira, \u0438\u0449\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u043b\u0435\u0439\u0431\u043b\u043e\u043c \u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u043c \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0447\u0435\u0440\u043d\u0443\u044e \u043c\u0430\u0433\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u0430\u0441\u043a\u0443 \u0438 \u043d\u0430 \u0435\u0433\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442 \u043d\u0430\u0442\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f Jira, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0430\u0441\u043a\u0443 \u0431\u043b\u0430\u0433\u043e\u043f\u043e\u043b\u0443\u0447\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0438\u043b\u0438 \u0442\u044d\u0433\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0430, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0440\u043e\u0434\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0439\u0442\u0438\u0441\u044c \u043f\u043e <strong>\u0448\u0430\u0433\u0430\u043c<\/strong> \u0441\u0430\u043c\u043e\u0433\u043e <strong>Ansible playbook<\/strong><\/p>\n<ol>\n<li>\n<p>\u0418\u0449\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0442\u0430\u0441\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u0437 \u043d\u0438\u0445 \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0432 Fortigate<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u0430 \u0442\u0443\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u0421\u0430\u043c\u0443 \u0433\u0440\u0443\u043f\u043f\u0443 \u043a\u043b\u0430\u0434\u0435\u043c \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\/\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438 \u0432 \u043d\u0443\u0436\u043d\u0443\u044e \u043f\u043e\u043b\u0438\u0441\u0438<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0438\u043b\u0438 \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432 Jira<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f<\/strong>: Python 3, Ansible, ansible collections (community.general , fortinet.fortios), AWX \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0438\u043b\u0438 \u0436\u0435 \u043b\u044e\u0431\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u043e\u043d\u0442\u0430\u0431\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u043b\u0435\u0439\u0431\u0443\u043a \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e<\/p>\n<h2>\u041a\u0440\u0443\u0442\u0438\u043c Ansible, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bc0\/ad7\/05d\/bc0ad705d1c12bdeeb01b8ba028fc7ba.png\" width=\"595\" height=\"566\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bc0\/ad7\/05d\/bc0ad705d1c12bdeeb01b8ba028fc7ba.png\"\/><\/figure>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0432 Ansible: <\/p>\n<ol>\n<li>\n<p>\u0418\u0449\u0435\u043c \u0442\u0430\u0441\u043a\u0438 \u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u0445 \u043d\u043e\u043c\u0435\u0440\u0430<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">--- # tasks for fetch whitelisting tasks from Jira - name: Search for an whitelisting issues   community.general.jira:     uri: '{{ jira_server }}'     username: '{{ jira_user }}'     password: '{{ jira_api_token }}'     operation: search     project: \"{{ target_project }}\"     maxresults: 5 #\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0434\u0430\u0447, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0437\u0430 \u0437\u0430\u043f\u0443\u0441\u043a                   #\u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0449\u0435 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c     jql: 'project=\"{{ target_project }}\" AND labels=\"{{ target_label }}\" AND status=\"{{ target_status }}\"'   args:     fields:       lastViewed: null   register: issues  - name: Search result   debug:     msg: \"Issues wasn't founded\"   when: issues.meta.total == 0  - name: Start Whitelisting   include_tasks: whitelisting.yml   with_items: '{{ issues.meta.issues }}'   when: issues.meta.total > 0<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043c\u043e\u044e <s>\u0433\u043e\u0432\u043d\u043e\u043a\u043e\u0434<\/s> \u0447\u0435\u0440\u043d\u0443\u044e \u043c\u0430\u0433\u0438\u044e. \u0426\u0438\u043a\u043b\u044b, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435, \u0432 Ansible \u044d\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u0430\u044f \u0442\u0435\u043c\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u0443\u0441\u043a\u0435 \u043c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0437\u0430\u0434\u0430\u0447\u0438 \u043a \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u0438\u0445 item&#8217;\u043e\u043c \u0432\u043e \u0432\u0442\u043e\u0440\u0443\u044e \u0442\u0430\u0441\u043a\u0443 (whitelisting.yaml) \u043d\u0430\u0448\u0435\u0439 \u0440\u043e\u043b\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u0436\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u0430\u0439\u0442\u043b\u0438\u0441\u0442\u0438\u043d\u0433 . \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u043e \u0438 \u0443\u0434\u043e\u0431\u043d\u043e, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043d\u0435 \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f item \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0448\u0430\u0433\u0430\u0445 \u0440\u043e\u043b\u0438.<\/p>\n<ol start=\"2\">\n<li>\n<p> \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u0434\u043e\u0441\u0442\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u044b \u0438\u0437 custom field&#8217;\u043e\u0432<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">- name: Retrieving payload from issues       community.general.jira:         uri: '{{ jira_server }}'         username: '{{ jira_user }}'         password: '{{ jira_api_token }}'         project: '{{ target_project }}'         operation: fetch         issue: '{{ item.key }}'       register: target      - name: Initiate WhiteList       set_fact:         target_data:            client: '{{ target.meta.fields.customfield_10863.replace(\" \", \"\") }}'           ips: '{{ target.meta.fields.customfield_11092.replace(\" \", \"\").split(\",\") }}'           enviroments: '{{ target.meta.fields.customfield_10865[0].value }}'           components: '{{ target.meta.fields.components[0].name }}'           #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439 \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0430\u0448\u0435\u0439 Jira           #\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u0441\u043a\u0430 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u0441\u043a\u0438<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c ipaddr \u0438 \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b &#8212; \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442 \u0432 Jira \u043e \u043f\u0440\u043e\u0432\u0430\u043b\u0435 \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u0438 \u0444\u0435\u0439\u043b\u0438\u043c \u043f\u043b\u0435\u0439\u0431\u0443\u043a<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">- name: Set wrong ips counter       set_fact:         wrong_ips: 0      - name: Validate IPs with ipaddr filter       set_fact:         wrong_ips={{ wrong_ips | int + 1 }}       with_items: \" {{ target_data.ips }} \"       when:  not (item | ipaddr)      - name: Fail play if we have wrong IPs in payload       block:         - name: Comment on issue           community.general.jira:             uri: '{{ jira_server }}'             username: '{{ jira_user }}'             password: '{{ jira_api_token }}'             issue: '{{ item.key }}'             operation: comment             comment: \"Task failed. Maybe IPs invalid format or other causes. Please, check logs and correct payload\/fix instance\"         - name: Fail the play           fail:             msg: \"Stop the play because payload wrong or we have some problems on AWX instance or local laptop\"       when: wrong_ips | int > 0<\/code><\/pre>\n<p>\u0412 Jira \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043a\u0440\u0443\u0447\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0441\u043b\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0441 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0430 \u0438 \u0435\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435<\/p>\n<ol start=\"4\">\n<li>\n<p>C\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0432 fortigate.\u00a0 \u0410\u0420I Fortigate \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0430\u0434\u0440\u0435\u0441\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0448\u0430\u043c\u0430\u043d\u0438\u0442\u044c \u0441 \u0442\u0435\u0440\u043d\u0430\u0440\u043d\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">- name: Create IP ADDRESSES       fortios_firewall_address:         vdom: '{{ vdom }}'         access_token: '{{ fortigate_token }}'         firewall_address:           name: 'IP-{{ item }}'           type: '{{ (item is search(\"-\"))|ternary(\"iprange\",\"ipmask\") }}'           subnet: '{{ (item is search(\"-\"))|ternary(omit,item+((item is search(\"\/\"))|ternary(omit,\"\/32\"))) }}'           start_ip: '{{ (item is search(\"-\"))|ternary(item.split(\"-\")[0],omit) }}'           end_ip: '{{ (item is search(\"-\"))|ternary(item.split(\"-\")[1],omit) }}'           associated_interface: '{{ interface }}'           comment: '{{ issue }}'         state: \"present\"       with_items: '{{ target_data.ips }}'       register: IPs<\/code><\/pre>\n<ol start=\"5\">\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0433\u0440\u0443\u043f\u043f\u0430, \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c, \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0432\u043e\u0439 \u043d\u0435\u0442. fortigate \u043d\u0435 \u0434\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443, \u0442\u0430\u043a \u0447\u0442\u043e \u043a\u043b\u0430\u0434\u0435\u043c \u0432 \u043d\u0435\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 (\u043b\u0438\u0431\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Null \u0430\u0434\u0440\u0435\u0441 \u0432 Fortigat\u0435, \u0442\u0443\u0442 \u043d\u0430 \u0432\u0430\u0448 \u0432\u044b\u0431\u043e\u0440)<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">- name: Check if client group already exists       fortinet.fortios.fortios_configuration_fact:         vdom: '{{ vdom }}'         access_token: \"{{ fortigate_token }}\"         selector: firewall_addrgrp         params:           name: \"GROUP_{{ target_data.client | upper }}\"       ignore_errors: true       register: group_not_exists      - name: Create CLIENT GROUP       fortinet.fortios.fortios_firewall_addrgrp:         vdom:  '{{ vdom }}'         state: \"present\"         access_token: '{{ fortigate_token }}'         firewall_addrgrp:           allow_routing: \"disable\"           category: \"default\"           color: \"5\"           comment: '{{ issue }}'           name: 'GROUP_{{ target_data.client | upper }}'           type: \"default\"           uuid: \"GROUP_{{ target_data.client | upper }}\"           visibility: \"enable\"           member:             - name: 'IP-{{ IPs.results[0].item }}'       when: group_not_exists.failed == true<\/code><\/pre>\n<ol start=\"6\">\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u0430 \u0432 \u043d\u0443\u0436\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">- name: Put target IPs in client group       fortinet.fortios.fortios_firewall_addrgrp:         vdom:  '{{ vdom }}'         state: \"present\"         access_token: '{{ fortigate_token }}'         member_path: member:name         member_state: present         firewall_addrgrp:           allow_routing: \"disable\"           category: \"default\"           color: \"5\"           comment: '{{ client_group_info.meta.results[0].comment  + \",\" + issue }}'           name: 'GROUP_{{ target_data.client | upper }}'           type: \"default\"           uuid: \"GROUP_{{ target_data.client | upper }}\"           visibility: \"enable\"           member:            - name: 'IP-{{ item.item }}'       with_items: ' {{ IPs.results }} '       loop_control:         label: ' {{ IPs.results }} '<\/code><\/pre>\n<ol start=\"7\">\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u0443 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 (\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0435 \u0437\u0430 \u0442\u0430\u0432\u0442\u043e\u043b\u043e\u0433\u0438\u044e) \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043d\u0430\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">- name: Put target client group in external COMPONENT GROUP in policy       fortinet.fortios.fortios_firewall_addrgrp:         vdom:  '{{ vdom }}'         state: \"present\"         access_token: '{{ fortigate_token }}'         member_path: member:name         member_state: present         firewall_addrgrp:           allow_routing: \"disable\"           category: \"default\"           color: \"5\"           comment: '{{ component_group_info.meta.results[0].comment  + \",\" + issue }}'           name: 'COMPONENT_{{ target_data.components | upper }}'           type: \"default\"           uuid: \"COMPONENT_{{ target_data.components | upper }}\"           visibility: \"enable\"           member:            - name: 'GROUP_{{ target_data.client | upper }}'<\/code><\/pre>\n<ol start=\"8\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043b\u0435\u0439\u0431\u043b\u044b \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u043a\u0430\u043a\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0432 \u043a\u0430\u043a\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u0438 \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438)<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">- name: Set the labels of created group for trace       community.general.jira:         uri: '{{ jira_server }}'         username: '{{ jira_user }}'         password: '{{ jira_api_token }}'         issue: '{{ item.key }}'         operation: edit       args:         fields:             labels:               - whitelisting               - 'GROUP_{{ target_data.client | upper }}'               - autocompleted      - name: Comment on issue       community.general.jira:         uri: '{{ jira_server }}'         username: '{{ jira_user }}'         password: '{{ jira_api_token }}'         issue: '{{ item.key }}'         operation: comment         comment: \" {{ 'AutoWhitelisted for ' + target_data.components | upper +  ' using, created\/updated GROUP_' +          target_data.client | upper  + ' group in firewall. Please check the results  \\n List of whitelisted IPs:\\n' + target_data.ips | join(',') | replace(',', ',\\n')}} \"<\/code><\/pre>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u0438\u0437 \u043a\u043e\u0434\u0430 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u0436\u0438\u0437\u043d\u044c \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438. \u0424\u043e\u0440\u043c\u0430 \u0432 \u0437\u0430\u0434\u0430\u0447\u0430\u0445 Jira \u0438\u043c\u0435\u0435\u0442 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0438\u0434<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/52e\/2bd\/7f6\/52e2bd7f61fcc6f3c8b22f1b408b26aa.png\" width=\"771\" height=\"391\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/52e\/2bd\/7f6\/52e2bd7f61fcc6f3c8b22f1b408b26aa.png\"\/><\/figure>\n<p>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430 ( \u0432 \u0442\u0435\u0441\u0442\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043c\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0438 \u0442\u043e\u043a\u0435\u043d):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cca\/ef9\/fd2\/ccaef9fd23cae670cb7a8f9ee0a16537.png\" width=\"973\" height=\"283\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cca\/ef9\/fd2\/ccaef9fd23cae670cb7a8f9ee0a16537.png\"\/><\/figure>\n<h2>\u0412\u043e\u0442 \u0438 \u0432\u0441\u0451!<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7c7\/190\/177\/7c7190177e2c9a0df6e8e675dcd961fc.png\" width=\"2560\" height=\"1327\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7c7\/190\/177\/7c7190177e2c9a0df6e8e675dcd961fc.png\"\/><\/figure>\n<p>\u0412\u0443\u0430\u043b\u044f! \u0416\u0438\u0437\u043d\u044c \u0443\u0434\u0430\u043b\u0430\u0441\u044c, \u0440\u0443\u0442\u0438\u043d\u044b \u0441\u0442\u0430\u043b\u043e \u043c\u0435\u043d\u044c\u0448\u0435. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0443\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u0440\u043e\u043b\u044c \u0438 \u043f\u043b\u0435\u0439\u0431\u0443\u043a \u043a \u043d\u0435\u0439 \u0432 AWX \u0438\u043b\u0438 \u043b\u044e\u0431\u0443\u044e \u0434\u0440\u0443\u0433\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 Ansible , \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c schedule \u0438 \u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u0412 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u0430\u044f \u0432\u0443\u043d\u0434\u0435\u0440\u0432\u0430\u0444\u0444\u043b\u044f \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u0435-\u043f\u0440\u043e\u0434 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u0435\u0431\u044f \u0447\u0443\u0432\u0441\u0442\u0432\u0443\u0435\u0442, \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044f\u0441\u044c \u0441 \u0440\u0430\u0431\u043e\u0442\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c (\u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0434\u0440\u0435\u0441\u043e\u0432) \u043c\u0438\u043d\u0443\u0442 20, \u0437\u0430 \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443. \u041e\u0442 \u043d\u0430\u0448\u0438\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u043e\u0432 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u043d\u0438 \u0438 \u0442\u0430\u043a \u0437\u0430\u0432\u043e\u0434\u0438\u043b\u0438, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0441 \u0444\u043e\u0440\u043c\u043e\u0439, \u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0432\u0430\u043c \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0438\u043b\u0438 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e.\u0412 \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430 \u0448\u0430\u0433\u043e\u0432, \u043d\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435, \u043d\u043e \u0432\u0441\u0435 \u043e\u043d\u0438 \u0438\u043c\u0435\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0440\u0435\u0439\u0441\u0430. \u041d\u0438\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043a\u043e\u0434\u043e\u043c \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 \u043f\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0443, \u0435\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u043e\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443 \u0441\u0435\u0431\u044f. \u0423\u0434\u0430\u0447\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438!<\/p>\n<p>Repo: <a href=\"https:\/\/github.com\/devops-engineer-gaming\/fortigate_whitelisting\/tree\/master\/whitelisting\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/devops-engineer-gaming\/fortigate_whitelisting\/tree\/master\/whitelisting<\/a><\/p>\n<p>P.S. \u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043a\u043e\u0442\u043e\u0432 \u0432\u0437\u044f\u0442\u044b \u0438\u0437 \u0433\u0440\u0443\u043f\u043f\u044b \u0432 \u0412\u041a &#171;\u043f\u0430\u0431\u043b\u0438\u043a \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u043e\u0432 5\/2&#187;<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/755536\/\"> https:\/\/habr.com\/ru\/articles\/755536\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a! \u0412\u0441\u0435 \u043c\u044b \u0432 \u0430\u0439\u0442\u0438 \u0445\u043e\u0442\u0438\u043c \u0436\u0438\u0442\u044c \u0431\u0435\u0437 \u0437\u0430\u0431\u043e\u0442, \u0431\u0435\u0437 \u0430\u0442\u0430\u043a \u043d\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u041d\u0435 \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043b\u0435\u0432\u044b\u0435 \u043b\u044e\u0434\u0438 \u0438 \u0440\u043e\u0431\u043e\u0442\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0438 \u0432 \u043d\u0430\u0448\u0443 \u0441\u0435\u0442\u044c \u0438 \u0438\u043c\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0440\u0435\u0432\u043d\u0438\u043c\u0438 \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d\u0430\u043c\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d \u0432\u0435\u043b\u0438\u043a\u0438\u0439 \u0438 \u0443\u0436\u0430\u0441\u043d\u044b\u0439 \u0444\u0430\u0439\u0440\u0432\u043e\u043b. \u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u0445 \u0432\u0440\u043e\u0434\u0435 \u0442\u043e\u0433\u043e \u0436\u0435 Fortigate \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0438 \u043a\u0440\u0430\u0439\u043d\u0435 \u0442\u043e\u0447\u0435\u0447\u043d\u043e \u0440\u0443\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a, \u0434\u0430\u0432\u0430\u0442\u044c \u043b\u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u043c \u0438 \u0442\u0434.<\/p>\n<p>\u041d\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 &#8212; \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u044d\u0442\u043e \u0434\u043e\u0431\u0440\u043e \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043d\u0430\u0434\u043e \u0440\u0443\u0447\u043a\u0430\u043c\u0438. \u041a\u043e\u0433\u0434\u0430 \u0442\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0448\u044c \u043a\u043e\u0440\u043f \u0441\u0435\u0442\u044c \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0431\u043e\u043b\u044c\u043d\u043e, \u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0432 \u0442\u0432\u043e\u044e \u0441\u0435\u0442\u044c \u043d\u0430\u0434\u043e \u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043d\u043e\u0433\u043e \u043c\u0430\u0448\u0438\u043d \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438, \u0438\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0442\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430, \u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0433\u0440\u0443\u0441\u0442\u043d\u043e. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 \u0440\u0443\u043a\u0438 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0433 \u0431\u044b \u0438 \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438 \u0432\u0435\u0449\u0430\u043c\u0438 \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f.<\/p>\n<p>\u041d\u043e \u0438\u043d\u0436\u0435\u043d\u0435\u0440, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0432\u043e\u043f\u0441, \u043d\u0430 \u0442\u043e \u0438 \u0438\u043d\u0436\u0435\u043d\u0435\u0440. \u0412\u0438\u0434\u0438\u0448\u044c \u0447\u0442\u043e-\u0442\u043e, \u0447\u0442\u043e \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f &#8212; \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0439. \u041d\u0435 \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f? \u0414\u0432\u0438\u0433\u0430\u0439 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0439!<\/p>\n<h2>\u0414\u0432\u0438\u0433\u0430\u0439 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0439!<\/h2>\n<figure class=\"full-width\"><\/figure>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e \u043e \u043d\u0430\u0448\u0435\u043c \u043a\u0435\u0439\u0441\u0435: \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0430\u0439\u0440\u0432\u043e\u043b\u0430 \u0441\u0442\u043e\u0438\u0442 Fortigate; \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0448 \u043f\u043e\u0440\u0442\u0430\u043b \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 Jira \u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0441\u043a\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 CHG (Change). \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u044b \u0431\u0440\u0430\u043b\u0438 \u043d\u0430 \u0441\u0435\u0431\u044f \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443, \u0445\u043e\u0434\u0438\u043b\u0438 \u0432 fortigate, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0433\u0440\u0443\u043f\u043f\u0443 \u0438\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0438 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0438 \u0432 \u043d\u0435\u0435 \u0430\u0434\u0440\u0435\u0441\u0430, \u0430 \u0433\u0440\u0443\u043f\u043f\u0443 \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u043b\u0438\u0441\u0438, \u0432\u0435\u0434\u0443\u0449\u0443\u044e \u043a \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, RabbitMQ, TCP, SSH \u0438 \u0442\u0434)<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0443\u0442\u0438\u043d\u043d\u0430\u044f, \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u0430\u044f \u0432\u0441\u0435\u0433\u0434\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u044f\u0442\u044c \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>\u041d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u043c\u043e\u0433 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0442\u0430\u043a\u0436\u0435, \u0447\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0439 \u0440\u0443\u0442\u0438\u043d\u044b \u043b\u0435\u0436\u0430\u0442 \u043d\u0430 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 &#8212; fortigate \u0438 Jira \u0438\u043c\u0435\u044e\u0442 API . \u0411\u0438\u043d\u0433\u043e!<\/p>\n<p>\u0411\u0435\u0440\u0435\u043c \u0432 \u0440\u0443\u0447\u043a\u0438 \u043c\u043e\u0437\u0433\u0438, \u043d\u0430\u0432\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043f\u043e API \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432.<\/p>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0440\u043d\u043e\u0439 \u043c\u0430\u0433\u0438\u0438, <s>\u0433\u043e\u0432\u043d\u043e\u043a\u043e\u0434\u0430<\/s> \u0438 \u0432\u0441\u0451 \u0432\u0437\u043b\u0435\u0442\u0438\u0442. \u0425\u043e\u0442\u044f, \u0437\u0430\u0447\u0435\u043c \u043d\u0430\u043f\u0440\u044f\u0433\u0430\u0442\u044c\u0441\u044f? \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0448 \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u0432 \u0432\u0430\u043a\u0443\u0443\u043c\u0435 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0436\u0435 IaC. \u041a\u043e\u043f\u0430\u0435\u043c \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0435\u0449\u0435 \u043a\u043e\u0435-\u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u043e\u0435 &#8212; \u0438 \u0434\u043b\u044f Jira , \u0438 \u0434\u043b\u044f fortigate \u0443 Ansible \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 (\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u043e\u0431\u0435\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 API).<\/p>\n<p>\u041d\u0443, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043e\u0431\u044f\u0437\u0430\u043d\u044b \u044d\u0442\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c!<\/p>\n<p>\u041e\u0431\u0441\u0443\u0434\u0438\u043c <strong>\u0432\u043e\u0440\u043a\u0444\u043b\u043e\u0443<\/strong> \u043d\u0430\u0448\u0435\u0439 \u0431\u0443\u0434\u0443\u0449\u0435\u0439 \u043f\u043e\u0434\u0434\u0435\u043b\u043a\u0438 \u0438 \u043d\u0430\u0447\u043d\u0435\u043c \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u0432\u043e\u043f\u043b\u043e\u0449\u0430\u0442\u044c \u0435\u0435 \u0432 \u0436\u0438\u0437\u043d\u044c:<\/p>\n<ol>\n<li>\n<p>\u041a\u0442\u043e-\u0442\u043e (\u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440, \u043f\u0435\u0440\u0432\u0430\u044f \u043b\u0438\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438) \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 , \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 &#171;\u0425\u043e\u0447\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u0441 \u043c\u043e\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0430\u0434\u0440\u0435\u0441 \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f) \u0434\u043e \u0447\u0430\u0441\u0442\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 (\u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0451 &#171;\u0417\u0430\u043a\u0443\u043f\u043a\u0430 \u043a\u0435\u043a\u0441\u0438\u043a\u043e\u0432&#187;)&#187;<\/p>\n<\/li>\n<li>\n<p>\u041e\u043d \u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u0442\u0430\u0441\u043a \u0432 Jira, \u0441 \u0444\u043e\u0440\u043c\u043e\u0447\u043a\u043e\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044f (\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0449\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\/\u043f\u0440\u0435-\u043f\u0440\u043e\u0434 )<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u043c\u0430\u0440\u043a\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043b\u0435\u0439\u0431\u043b\u043e\u043c &#171;whitelisting&#187; \u0438 \u0435\u0435 \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 &#171;Ready to Dev&#187; (\u043b\u0435\u0439\u0431\u043b \u0438 \u0441\u0442\u0430\u0442\u0443\u0441 \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 Ansible)<\/p>\n<\/li>\n<li>\n<p>Scheduled task \u043d\u0430 AWX \u0445\u043e\u0434\u0438\u0442 \u0440\u0430\u0437 \u0432 30 \u043c\u0438\u043d\u0443\u0442 \u0432 Jira, \u0438\u0449\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u043b\u0435\u0439\u0431\u043b\u043e\u043c \u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u043c \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0447\u0435\u0440\u043d\u0443\u044e \u043c\u0430\u0433\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u0430\u0441\u043a\u0443 \u0438 \u043d\u0430 \u0435\u0433\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442 \u043d\u0430\u0442\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f Jira, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0430\u0441\u043a\u0443 \u0431\u043b\u0430\u0433\u043e\u043f\u043e\u043b\u0443\u0447\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0438\u043b\u0438 \u0442\u044d\u0433\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0430, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0440\u043e\u0434\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0439\u0442\u0438\u0441\u044c \u043f\u043e <strong>\u0448\u0430\u0433\u0430\u043c<\/strong> \u0441\u0430\u043c\u043e\u0433\u043e <strong>Ansible playbook<\/strong><\/p>\n<ol>\n<li>\n<p>\u0418\u0449\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0442\u0430\u0441\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u0437 \u043d\u0438\u0445 \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0432 Fortigate<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u0430 \u0442\u0443\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u0421\u0430\u043c\u0443 \u0433\u0440\u0443\u043f\u043f\u0443 \u043a\u043b\u0430\u0434\u0435\u043c \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\/\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438 \u0432 \u043d\u0443\u0436\u043d\u0443\u044e \u043f\u043e\u043b\u0438\u0441\u0438<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0438\u043b\u0438 \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432 Jira<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f<\/strong>: Python 3, Ansible, ansible collections (community.general , fortinet.fortios), AWX \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0438\u043b\u0438 \u0436\u0435 \u043b\u044e\u0431\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u043e\u043d\u0442\u0430\u0431\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u043b\u0435\u0439\u0431\u0443\u043a \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e<\/p>\n<h2>\u041a\u0440\u0443\u0442\u0438\u043c Ansible, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c<\/h2>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0432 Ansible: <\/p>\n<ol>\n<li>\n<p>\u0418\u0449\u0435\u043c \u0442\u0430\u0441\u043a\u0438 \u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u0445 \u043d\u043e\u043c\u0435\u0440\u0430<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">--- # tasks for fetch whitelisting tasks from Jira - name: Search for an whitelisting issues   community.general.jira:     uri: '{{ jira_server }}'     username: '{{ jira_user }}'     password: '{{ jira_api_token }}'     operation: search     project: \"{{ target_project }}\"     maxresults: 5 #\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0434\u0430\u0447, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0437\u0430 \u0437\u0430\u043f\u0443\u0441\u043a                   #\u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0449\u0435 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c     jql: 'project=\"{{ target_project }}\" AND labels=\"{{ target_label }}\" AND status=\"{{ target_status }}\"'   args:     fields:       lastViewed: null   register: issues  - name: Search result   debug:     msg: \"Issues wasn't founded\"   when: issues.meta.total == 0  - name: Start Whitelisting   include_tasks: whitelisting.yml   with_items: '{{ issues.meta.issues }}'   when: issues.meta.total > 0<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043c\u043e\u044e <s>\u0433\u043e\u0432\u043d\u043e\u043a\u043e\u0434<\/s> \u0447\u0435\u0440\u043d\u0443\u044e \u043c\u0430\u0433\u0438\u044e. \u0426\u0438\u043a\u043b\u044b, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435, \u0432 Ansible \u044d\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u0430\u044f \u0442\u0435\u043c\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u0443\u0441\u043a\u0435 \u043c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0437\u0430\u0434\u0430\u0447\u0438 \u043a \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u0438\u0445 item&#8217;\u043e\u043c \u0432\u043e \u0432\u0442\u043e\u0440\u0443\u044e \u0442\u0430\u0441\u043a\u0443 (whitelisting.yaml) \u043d\u0430\u0448\u0435\u0439 \u0440\u043e\u043b\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u0436\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u0430\u0439\u0442\u043b\u0438\u0441\u0442\u0438\u043d\u0433 . \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u043e \u0438 \u0443\u0434\u043e\u0431\u043d\u043e, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043d\u0435 \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f item \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0448\u0430\u0433\u0430\u0445 \u0440\u043e\u043b\u0438.<\/p>\n<ol start=\"2\">\n<li>\n<p> \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u0434\u043e\u0441\u0442\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u044b \u0438\u0437 custom field&#8217;\u043e\u0432<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">- name: Retrieving payload from issues       community.general.jira:         uri: '{{ jira_server }}'         username: '{{ jira_user }}'         password: '{{ jira_api_token }}'         project: '{{ target_project }}'         operation: fetch         issue: '{{ item.key }}'       register: target      - name: Initiate WhiteList       set_fact:         target_data:            client: '{{ target.meta.fields.customfield_10863.replace(\" \", \"\") }}'           ips: '{{ target.meta.fields.customfield_11092.replace(\" \", \"\").split(\",\") }}'           enviroments: '{{ target.meta.fields.customfield_10865[0].value }}'           components: '{{ target.meta.fields.components[0].name }}'           #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439 \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0430\u0448\u0435\u0439 Jira           #\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u0441\u043a\u0430 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u0441\u043a\u0438<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c ipaddr \u0438 \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b &#8212; \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442 \u0432 Jira \u043e \u043f\u0440\u043e\u0432\u0430\u043b\u0435 \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u0438 \u0444\u0435\u0439\u043b\u0438\u043c \u043f\u043b\u0435\u0439\u0431\u0443\u043a<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">- name: Set wrong ips counter       set_fact:         wrong_ips: 0      - name: Validate IPs with ipaddr filter       set_fact:         wrong_ips={{ wrong_ips | int + 1 }}       with_items: \" {{ target_data.ips }} \"       when:  not (item | ipaddr)      - name: Fail play if we have wrong IPs in payload       block:         - name: Comment on issue           community.general.jira:             uri: '{{ jira_server }}'             username: '{{ jira_user }}'             password: '{{ jira_api_token }}'             issue: '{{ item.key }}'             operation: comment             comment: \"Task failed. Maybe IPs invalid format or other causes. Please, check logs and correct payload\/fix instance\"         - name: Fail the play           fail:             msg: \"Stop the play because payload wrong or we have some problems on AWX instance or local laptop\"       when: wrong_ips | int > 0<\/code><\/pre>\n<p>\u0412 Jira \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043a\u0440\u0443\u0447\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0441\u043b\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0441 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0430 \u0438 \u0435\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435<\/p>\n<ol start=\"4\">\n<li>\n<p>C\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0432 fortigate.\u00a0 \u0410\u0420I Fortigate \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0430\u0434\u0440\u0435\u0441\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0448\u0430\u043c\u0430\u043d\u0438\u0442\u044c \u0441 \u0442\u0435\u0440\u043d\u0430\u0440\u043d\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">- name: Create IP ADDRESSES       fortios_firewall_address:         vdom: '{{ vdom }}'         access_token: '{{ fortigate_token }}'         firewall_address:           name: 'IP-{{ item }}'           type: '{{ (item is search(\"-\"))|ternary(\"iprange\",\"ipmask\") }}'           subnet: '{{ (item is search(\"-\"))|ternary(omit,item+((item is search(\"\/\"))|ternary(omit,\"\/32\"))) }}'           start_ip: '{{ (item is search(\"-\"))|ternary(item.split(\"-\")[0],omit) }}'           end_ip: '{{ (item is search(\"-\"))|ternary(item.split(\"-\")[1],omit) }}'           associated_interface: '{{ interface }}'           comment: '{{ issue }}'         state: \"present\"       with_items: '{{ target_data.ips }}'       register: IPs<\/code><\/pre>\n<ol start=\"5\">\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0433\u0440\u0443\u043f\u043f\u0430, \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c, \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0432\u043e\u0439 \u043d\u0435\u0442. fortigate \u043d\u0435 \u0434\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443, \u0442\u0430\u043a \u0447\u0442\u043e \u043a\u043b\u0430\u0434\u0435\u043c \u0432 \u043d\u0435\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 (\u043b\u0438\u0431\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Null \u0430\u0434\u0440\u0435\u0441 \u0432 Fortigat\u0435, \u0442\u0443\u0442 \u043d\u0430 \u0432\u0430\u0448 \u0432\u044b\u0431\u043e\u0440)<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">- name: Check if client group already exists       fortinet.fortios.fortios_configuration_fact:         vdom: '{{ vdom }}'         access_token: \"{{ fortigate_token }}\"         selector: firewall_addrgrp         params:           name: \"GROUP_{{ target_data.client | upper }}\"       ignore_errors: true       register: group_not_exists      - name: Create CLIENT GROUP       fortinet.fortios.fortios_firewall_addrgrp:         vdom:  '{{ vdom }}'         state: \"present\"         access_token: '{{ fortigate_token }}'         firewall_addrgrp:           allow_routing: \"disable\"           category: \"default\"           color: \"5\"           comment: '{{ issue }}'           name: 'GROUP_{{ target_data.client | upper }}'           type: \"default\"           uuid: \"GROUP_{{ target_data.client | upper }}\"           visibility: \"enable\"           member:             - name: 'IP-{{ IPs.results[0].item }}'       when: group_not_exists.failed == true<\/code><\/pre>\n<ol start=\"6\">\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u0430 \u0432 \u043d\u0443\u0436\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">- name: Put target IPs in client group       fortinet.fortios.fortios_firewall_addrgrp:         vdom:  '{{ vdom }}'         state: \"present\"         access_token: '{{ fortigate_token }}'         member_path: member:name         member_state: present         firewall_addrgrp:           allow_routing: \"disable\"           category: \"default\"           color: \"5\"           comment: '{{ client_group_info.meta.results[0].comment  + \",\" + issue }}'           name: 'GROUP_{{ target_data.client | upper }}'           type: \"default\"           uuid: \"GROUP_{{ target_data.client | upper }}\"           visibility: \"enable\"           member:            - name: 'IP-{{ item.item }}'       with_items: ' {{ IPs.results }} '       loop_control:         label: ' {{ IPs.results }} '<\/code><\/pre>\n<ol start=\"7\">\n<li>\n<p>\u0414\u043e\u0431<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-352557","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/352557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=352557"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/352557\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=352557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=352557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=352557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}