{"id":1736,"date":"2025-05-21T02:27:50","date_gmt":"2025-05-21T00:27:50","guid":{"rendered":"https:\/\/olvas.dev\/?p=1736"},"modified":"2025-05-21T02:27:51","modified_gmt":"2025-05-21T00:27:51","slug":"%d0%ba%d0%b0%d0%ba-%d0%b7%d0%b0%d0%bf%d0%b8%d0%bb%d0%b8%d1%82%d1%8c-%d0%b3%d0%be%d0%b4%d0%bd%d1%83%d1%8e-%d1%80%d0%be%d0%bb%d1%8e%d1%85%d1%83-%d0%b2-ansible","status":"publish","type":"post","link":"https:\/\/olvas.dev\/?p=1736","title":{"rendered":"\u041a\u0430\u043a \u0437\u0430\u043f\u0438\u043b\u0438\u0442\u044c \u0433\u043e\u0434\u043d\u0443\u044e \u0440\u043e\u043b\u044e\u0445\u0443 \u0432 Ansible"},"content":{"rendered":"\n<p>\u0413\u0430\u0439\u0434\u043e\u0432 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u043a \u043f\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e &#8212; \u043a\u0443\u0447\u0430. \u0412\u0441\u0435 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0439\u0442\u0438 &#8212; \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0445 \u043d\u0435 \u0431\u0443\u0434\u0443. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u043e\u0438 \u0448\u0438\u0448\u043a\u0438, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0440\u043e\u043b\u0435\u0439 Ansible \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a&nbsp;<s>\u043b\u0435\u0433\u043a\u043e<\/s>&nbsp;\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u043e\u043b\u044c&nbsp;<s>\u0431\u0435\u0437 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0421\u041c\u0421<\/s>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0440\u043e\u043b\u0438 \u0432 Ansible<\/h2>\n\n\n\n<p>\u0425\u043e\u0440\u043e\u0448\u0430\u044f \u0440\u043e\u043b\u044c Ansible \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c&nbsp;<strong>\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0439, \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439<\/strong>. \u0412\u043e\u0442 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u043e\u043b\u0438:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0440\u043e\u043b\u0438<\/h3>\n\n\n\n<p>\u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0439 \u0441\u0432\u043e\u044e \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0438 \u043e\u0442\u0432\u0435\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 &#171;\u0427\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u0430 \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u043e\u043b\u044c&#187;?<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0441\u0435\u0440\u0432\u0438\u0441 (Nginx, PostgreSQL, Docker \u0438 \u0442. \u0434.).<\/li>\n\n\n\n<li>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,\u00a0<code>sysctl<\/code>,\u00a0<code>limits.conf<\/code>).<\/li>\n\n\n\n<li>\u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, WordPress, Prometheus).<\/li>\n\n\n\n<li>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441.<\/li>\n\n\n\n<li>\u0412\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0438 \u043f\u0440. \u0438 \u0434\u0440.<\/li>\n<\/ul>\n\n\n\n<p>\u041f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Nginx + \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0411\u0414).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041d\u044e\u0430\u043d\u0441\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u043e\u043b\u044e\u0445\u0438.<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 \u043f\u043e\u0434\u0437\u0430\u0434\u0430\u0447\u0438 (<code>include_tasks<\/code>) \u0438\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<strong>\u0442\u0435\u0433\u0438\u00a0(<\/strong><code><strong>tags<\/strong><\/code><strong>)<\/strong>\u00a0\u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/li>\n\n\n\n<li>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0441\u0435\u043a\u0440\u0435\u0442\u0430\u043c\u0438 \u0432 Ansible:\u00a0no_log: true.<\/li>\n\n\n\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0435\u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442\u043e\u0432 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/li>\n\n\n\n<li>\u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u0438 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430,\u00a0<strong>\u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/strong>\u00a0(\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435) \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441\u00a0<strong>\u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 \u0438\u043c\u0435\u043d\u0438 \u0440\u043e\u043b\u0438<\/strong>.<\/li>\n\n\n\n<li>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 Ansible (block\/rescue).<\/li>\n\n\n\n<li>\u041d\u0435\u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u0430\u044f \u0440\u043e\u043b\u044c &#8212; \u0432\u044b\u0441\u0442\u0440\u0435\u043b \u0432 \u043d\u043e\u0433\u0443.<\/li>\n\n\n\n<li>\u041d\u0435 \u043b\u0435\u043d\u0438\u0441\u044c &#8212; \u043f\u0438\u0448\u0438 \u043c\u043e\u0434\u0443\u043b\u0438.<\/li>\n\n\n\n<li>\u041f\u043e\u043c\u043d\u0438 \u043e \u0445\u0435\u043d\u0434\u043b\u0435\u0440\u0430\u0445.<\/li>\n\n\n\n<li>\u0425\u043e\u0447\u0435\u0448\u044c \u043c\u0438\u0440\u0430 &#8212; \u043f\u0438\u0448\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e.<\/li>\n\n\n\n<li>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0439 \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>---<br>- name: Check variables<br>  include_tasks:<br>    file: pre_task.yml<br>    apply:<br>      tags: always<br>  tags: always<br><br>- name: Install Nginx<br>  apt:<br>    name: nginx<br>    state: present<br>  tags: install<br><br>- name: Copy Nginx config<br>  template:<br>    src: nginx.conf.j2<br>    dest: \/etc\/nginx\/nginx.conf<br>  notify: restart nginx<br>  tags: config<br><br>- name: Flush handlers at end<br>  meta: flush_handlers<br>  tags: always<\/code><\/pre>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043f\u043e \u0442\u0435\u0433\u0430\u043c<\/h3>\n\n\n\n<p>\u0422\u0435\u0433\u0438 &#8212; \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0422\u0435\u0433\u0438<\/strong>\u00a0\u0434\u0430\u044e\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u044d\u0442\u0430\u043f\u0430\u043c\u0438:\u00a0<code>install|update|config|certs|remove<\/code>.<\/li>\n\n\n\n<li><strong>\u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u0447\u0435\u0442\u043a\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447<\/strong>, \u0447\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443.<\/li>\n\n\n\n<li><strong>\u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/strong>: \u0422\u0435\u0433\u00a0<code>remove<\/code>\u00a0\u043d\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0443\u0435\u0442 \u0441\u00a0<code>install<\/code>.<\/li>\n\n\n\n<li><strong>\u0413\u0438\u0431\u043a\u043e\u0441\u0442\u044c<\/strong>: \u041c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c (<code>deploy = install + config + certs<\/code>).<\/li>\n<\/ul>\n\n\n\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0442\u0435\u0433\u043e\u0432:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>\u0422\u0435\u0433<\/th><th>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/th><\/tr><tr><td><code>install<\/code><\/td><td>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u041f\u041e<\/td><\/tr><tr><td><code>update<\/code><\/td><td>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 (\u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c)<\/td><\/tr><tr><td><code>config<\/code><\/td><td>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432<\/td><\/tr><tr><td><code>certs<\/code><\/td><td>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 TLS\/SSL<\/td><\/tr><tr><td><code>remove, never<\/code><\/td><td>\u041f\u043e\u043b\u043d\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u041f\u041e<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u041e\u0441\u043e\u0431\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0441\u0442\u043e\u0438\u0442 \u0443\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044e (apply) \u0442\u0435\u0433\u043e\u0432, \u0442\u0443\u0442 \u0432\u0430\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0440\u043e\u043b\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0432&nbsp;<em>dryrun (check_mode)&nbsp;<\/em>\u043f\u0435\u0440\u0435\u0434 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043b\u044e\u0431\u043e\u0433\u043e \u0438\u0437 \u0442\u0435\u0433\u043e\u0432.&nbsp;<em><\/em>\u0415\u0441\u043b\u0438 \u043b\u0435\u043d\u0438\u0432\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u0442\u0430\u0441\u043a\u0443 \u0442\u0435\u0433\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>- name: Check variables<br>  include_tasks:<br>    file: pre_task.yml<br>    apply:<br>      tags: check # \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0442\u0435\u0433 \u043a\u043e \u0432\u0441\u0435\u043c \u0442\u0430\u0441\u043a\u0430\u043c \u0432 \u0444\u0430\u0439\u043b\u0435<br>  tags: check<\/code><\/pre>\n\n\n\n<p><strong>\u0418\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>my_app\/  <br>\u251c\u2500\u2500 tasks\/  <br>\u2502   \u251c\u2500\u2500 install.yml  <br>\u2502   \u251c\u2500\u2500 update.yml  <br>\u2502   \u251c\u2500\u2500 config.yml  <br>\u2502   \u251c\u2500\u2500 certs.yml  <br>\u2502   \u251c\u2500\u2500 remove.yml  <br>\u2502   \u2514\u2500\u2500 main.yml  # \u0438\u043c\u043f\u043e\u0440\u0442 \u0432\u0441\u0435\u0445 \u0437\u0430\u0434\u0430\u0447 \u0441 \u0442\u0435\u0433\u0430\u043c\u0438  <\/code><\/pre>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0441\u0435\u043a\u0440\u0435\u0442\u0430\u043c\u0438 \u0432 Ansible:&nbsp;no_log: true<\/h3>\n\n\n\n<p>\u0414\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043f\u0430\u0440\u043e\u043b\u0438, \u043a\u043b\u044e\u0447\u0438, \u0442\u043e\u043a\u0435\u043d\u044b) \u0432 \u043b\u043e\u0433\u0430\u0445 Ansible \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c&nbsp;<code><strong>no_log: true<\/strong><\/code>. \u042d\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044c \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 \u0432:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434<\/li>\n\n\n\n<li>\u0424\u0430\u0439\u043b\u044b \u043b\u043e\u0433\u043e\u0432<\/li>\n\n\n\n<li>\u0421\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code># \u0414\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0441 \u0441\u0435\u043a\u0440\u0435\u0442\u0430\u043c\u0438<br>- name: Set database password<br>  ansible.builtin.lineinfile:<br>    path: \/etc\/app.conf<br>    line: \"DB_PASSWORD={{ db_password }}\"<br>  no_log: true  # \u2190 \u0412\u0430\u0436\u043d\u043e!<br><br># \u0414\u043b\u044f \u0446\u0435\u043b\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432<br>- name: Secrets handling block<br>  block:<br>    - name: Create API key<br>      ansible.builtin.command: generate-key.sh<br>      register: api_key_result<br>      <br>    - name: Deploy key to vault<br>      ansible.builtin.uri:<br>        url: \"https:\/\/vault.example.com\"<br>        body: \"{{ api_key_result.stdout }}\"<br>  no_log: true  # \u0421\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0412\u0415\u0421\u042c \u0432\u044b\u0432\u043e\u0434 \u0431\u043b\u043e\u043a<br><br># \u041a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0435\u043a\u0440\u0435\u0442:<br>- name: Configure secret token<br>  ansible.builtin.template:<br>    src: token.j2<br>    dest: \/etc\/secrets\/token<br>  vars:<br>    secret_token: \"{{ vaulted_token }}\"  # \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u0437 vault<br>  no_log: <strong>true<\/strong><br><br># \u0414\u043b\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 (register):<br>- name: Get sensitive data<br>  ansible.builtin.command: decrypt.sh<br>  register: decrypted_data<br>  no_log: <strong>true<\/strong><br><br>- name: Use secured data<br>  debug:<br>    msg: \"Data processed successfully\"<br>  when: decrypted_data.rc == 0<br><br># \u0414\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0441 \u0441\u0435\u043a\u0440\u0435\u0442\u0430\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 uri):<br>- name: Auth request<br>  ansible.builtin.uri:<br>    url: \"https:\/\/api.example.com\/login\"<br>    body:<br>      username: admin<br>      password: \"{{ vaulted_pass }}\"<br>  no_log: <strong>true<\/strong><br><br># \u041a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0441 Ansible Vault:<br>vars:<br>  db_password: !vault |<br>    $ANSIBLE_VAULT;1.1;AES256<br>    643865...<br><br># \u041a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0441 Hashicorp Vault<br>vars:<br>  msql_password: \"{{ lookup('community.hashi_vault.hashi_vault', 'secret=secret\/data\/hello token=my_vault_token url=http:\/\/myvault_url:8200') }}\"<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u041a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0437\u0430\u0449\u0438\u0442\u0443?<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u043b\u0435\u0439\u0431\u0443\u043a \u0441\u00a0<code>-vvv<\/code><\/li>\n\n\n\n<li>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0447\u0442\u043e \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u043d\u0435\u0442:<code>- \"Changed\": true, \"DB_PASSWORD\": \"s3cr3t\" + \"output\": \"********\"<\/code><\/li>\n<\/ol>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0435\u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442\u043e\u0432 \u0432&nbsp;pre_tasks<\/h3>\n\n\n\n<p>\u0427\u0442\u043e\u0431\u044b \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0440\u043e\u043b\u0438, \u0432\u0441\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f&nbsp;<strong>\u0434\u043e<\/strong>&nbsp;\u0435\u0451 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c&nbsp;<code>pre_tasks<\/code>&nbsp;\u0432 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0435 tasks\/main.yml.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>---<br>- name: \"1. Check OS compatibility (Ubuntu\/Debian)\"<br>  ansible.builtin.fail:<br>    msg: \"Unsupported OS. Required: Ubuntu\/Debian\"<br>  when: ansible_facts&#91;'distribution'] not in &#91;'Ubuntu', 'Debian']<br><br>- name: \"2. Verify free disk space &gt; 1GB\"<br>  ansible.builtin.command: df -BG \/<br>  register: disk_space<br>  changed_when: <strong>false<\/strong><br>  failed_when:<br>    - disk_space.rc != 0<br>    or (disk_space.stdout | regex_search('\\\\d+G')) | int &lt; 1<br><br># \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0440\u0442\u043e\u0432<br>- name: \"3. Check ports 80\/443 are available\"<br>  ansible.builtin.wait_for:<br>    port: \"{{ item }}\"<br>    state: stopped<br>    timeout: 1<br>  loop: &#91;80, 443]<br>  ignore_errors: <strong>true<\/strong><br>  register: ports_check<br>  failed_when: ports_check.results | selectattr('failed') | list | length &gt; 0<br><br># \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430)<br>- name: \"Ensure curl is installed\"<br>  apt:<br>    name: curl<br>    state: present<br><br># \u0411\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<br>- name: \"Fail if Docker not found\"<br>  ansible.builtin.command: docker --version<br>  register: docker_check<br>  failed_when: docker_check.rc != 0 <br><br># \u041d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f<br>- name: \"Warn about low RAM\"<br>  ansible.builtin.debug:<br>    msg: \"Recommended: 4GB RAM (found {{ ansible_memtotal_mb }}MB)\"<br>  changed_when: <strong>false<\/strong><br>  when: ansible_memtotal_mb &lt; 4096<br><br># \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f assert<br><br>- name: After version 2.7 both O(msg) and O(fail_msg) can customize failing assertion message<br>  ansible.builtin.assert:<br>    that:<br>      - my_param &lt;= 100<br>      - my_param &gt;= 0<br>    fail_msg: \"'my_param' must be between 0 and 100\"<br>    success_msg: \"'my_param' is between 0 and 100\"<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u041d\u044e\u0430\u043d\u0441\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0443\u043b\u0435\u0439\u00a0<code>fail<\/code>\u00a0\u0438\u00a0<code>assert<\/code>\u00a0\u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445. \u0421\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u044d\u0442\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 \u0440\u043e\u043b\u0438 &#8212; \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u0430\u0441\u0438\u0432\u0435\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0434\u0435\u0431\u0430\u0436\u0438\u0442\u044c.<\/li>\n\n\n\n<li>\u0412\u0441\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c\u00a0<code>changed_when: false<\/code>.<\/li>\n\n\n\n<li>\u0414\u043b\u044f &#171;\u0442\u044f\u0436\u0435\u043b\u044b\u0445&#187; \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435\u00a0<code>run_once: true<\/code>.<\/li>\n\n\n\n<li>\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0432\u0441\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u00a0<a href=\"http:\/\/readme.md\/\" target=\"_blank\" rel=\"noreferrer noopener\"><code>README.md<\/code><\/a><\/li>\n<\/ol>\n\n\n\n<p><strong>\u0418\u0442\u043e\u0433:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0420\u043e\u043b\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439<\/li>\n\n\n\n<li>\u0427\u0435\u0442\u043a\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445<\/li>\n\n\n\n<li>\u041d\u0435\u0442 &#171;\u0442\u0438\u0445\u0438\u0445&#187; \u0441\u0431\u043e\u0435\u0432 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/li>\n<\/ul>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 Ansible (block\/rescue)<\/h3>\n\n\n\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u043e\u043b\u044c&nbsp;<strong>\u043d\u0435 \u043f\u0430\u0434\u0430\u043b\u0430<\/strong>&nbsp;\u043f\u0440\u0438 \u043d\u0435\u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0432\u044f\u0437\u043a\u0443&nbsp;<code><strong>block<\/strong><\/code><strong>&nbsp;+&nbsp;<\/strong><code><strong>rescue<\/strong><\/code>.<br>\u042d\u0442\u043e \u0430\u043d\u0430\u043b\u043e\u0433&nbsp;<code>try\/catch<\/code>&nbsp;\u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445.<\/p>\n\n\n\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043c\u044b&nbsp;<strong>\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433<\/strong>&nbsp;\u0438&nbsp;<strong>\u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441<\/strong>, \u043d\u043e \u0445\u043e\u0442\u0438\u043c:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/strong>, \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0444\u0438\u0433 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f, \u043d\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f.<\/li>\n\n\n\n<li><strong>\u0417\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443<\/strong>\u00a0\u0432 \u043b\u043e\u0433, \u043d\u043e \u043d\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u0440\u043e\u043b\u044c.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>---<br>- name: Critical operations block<br>  block:<br>    - name: Task 1 - Copy config<br>      ansible.builtin.template:<br>        src: config.j2<br>        dest: \/etc\/app\/config.conf<br>      register: taskresult<br>      notify: restart app<br><br>    - name: Task 2 - Validate config<br>      ansible.builtin.command: app --validate<br>      register: taskresult<br>      changed_when: <strong>false<\/strong><br><br>  rescue:<br>    - name: Add error to list<br>      set_fact:<br>        role_errors: \"{{ role_errors | default(&#91;]) + &#91;{<br>          'task': ansible_failed_task.name,<br>          'error': ansible_failed_result.msg<br>        }] }}\"<br><br>    - name: Continue execution<br>      meta: continue<br><br>- name: Print all errors (if any)<br>  ansible.builtin.debug:<br>    var: role_errors<br>  failed_when: role_errors | length &gt; 0<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0431\u043b\u043e\u043a (block)<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u041a\u0430\u0436\u0434\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u00a0<code>taskresult<\/code><\/li>\n\n\n\n<li>\u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 &#8212; \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432\u00a0<code>rescue<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a (rescue)<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a.<\/li>\n\n\n\n<li>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (<code>meta: continue<\/code>)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0447\u0435\u0442<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u041f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u0437\u0430\u0434\u0430\u0447 \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0448\u0438\u0431\u043e\u043a (\u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c) \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c \u0432\u044b\u0434\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\"role_errors\": &#91;<br>  {<br>    \"task\": \"Task 2 - Validate config\",<br>    \"error\": \"Command 'app --validate' returned 1: ERROR: Invalid config\"<br>  }<br>]<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430:<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u041f\u043e\u043b\u043d\u0430\u044f \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a<\/strong>\u00a0&#8212; \u0432\u0438\u0434\u043d\u043e \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0434\u0430\u0447\u0438 \u0443\u043f\u0430\u043b\u0438<\/li>\n\n\n\n<li><strong>\u0410\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434<\/strong>\u00a0&#8212; \u0432\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435<\/li>\n\n\n\n<li><strong>\u0413\u0438\u0431\u043a\u043e\u0441\u0442\u044c<\/strong>\u00a0&#8212; \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f (\u0432\u0440\u0435\u043c\u044f, \u0445\u043e\u0441\u0442 \u0438 \u0442.\u0434.)<\/li>\n\n\n\n<li><strong>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438\u00a0<\/strong>&#8212; \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/li>\n<\/ol>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041d\u0435\u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u0430\u044f \u0440\u043e\u043b\u044c &#8212; \u0432\u044b\u0441\u0442\u0440\u0435\u043b \u0432 \u043d\u043e\u0433\u0443<\/h3>\n\n\n\n<p>\u0418\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u2014 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u043a Ansible-\u0440\u043e\u043b\u044f\u043c. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e:<br>\u2714 \u041f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0440\u043e\u043b\u0438&nbsp;<strong>\u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<\/strong><br>\u2714 \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430&nbsp;<strong>\u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/strong><\/p>\n\n\n\n<p>\u041a\u0430\u043a \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438?<\/p>\n\n\n\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 Ansible&nbsp;<strong>\u0443\u0436\u0435 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u044b<\/strong>&nbsp;(apt, yum, template \u0438 \u0434\u0440.). \u041d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 (<strong>\u0414\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/strong>&nbsp;(<code>command<\/code>,&nbsp;<code>shell<\/code>,&nbsp;<code>raw<\/code>) \u0432\u0441\u0435\u0433\u0434\u0430) \u043d\u0443\u0436\u043d\u043e \u0440\u0443\u0447\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>changed_when: false # \u0412\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 &#171;ok&#187; (\u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u043b)<\/li>\n\n\n\n<li>changed_when: \u0443\u0441\u043b\u043e\u0432\u0438\u0435 # \u041a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f &#171;changed&#187;<\/li>\n<\/ul>\n\n\n\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u041a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435<br>- name: Check service stataus<br>  command: systemctl is-active nginx<br>  register: nginx_status<br>  changed_when: false  # \u2190 \u041d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \"ok\"<br>  <br>- name: Force reload (\u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e)<br>  command: systemctl reload nginx<br>  when: nginx_status.stdout != \"active\"<br><br># \u041a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<br>- name: Apply config if changed<br>  template:<br>    src: app.conf.j2<br>    dest: \/etc\/app.conf<br>  register: config_result<br>  changed_when: config_result.changed  # \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 (\u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c)<br><br># \u0423\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \"changed\" \u0434\u043b\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432<br>- name: Run database migration<br>  command: \/opt\/app\/migrate.py<br>  register: migration_result<br>  changed_when: <br>    - \"'Success' in migration_result.stdout\"  # \u2190 \"changed\" \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0445\u0435<br>    - migration_result.rc == 0<br><br># \u0414\u043b\u044f \u0437\u0430\u0434\u0430\u0447 \u0441&nbsp;always_run<br>- name: Validate config (\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430)<br>  command: validate_config.sh<br>  changed_when: <strong>false<\/strong><br>  check_mode: <strong>no<\/strong><br>  always_run: <strong>yes<\/strong><br><br># \u0414\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 (handlers) handlers\/main.yml:<br>- name: migrate app<br>  command: \/opt\/app\/migrate.py<br>  changed_when: false  # \u2190 \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b \"changed\" \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435<br><br># \u0414\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435&nbsp;failed_when&nbsp;\u0432\u043c\u0435\u0441\u0442\u0435 \u0441&nbsp;changed_when:<br>- name: Check license<br>  command: check_license.sh<br>  register: license_check<br>  changed_when: <strong>false<\/strong><br>  failed_when: <br>    - license_check.rc != 0<br>    - \"'Expired' in license_check.stdout\"<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u041a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0440\u043e\u043b\u044c \u0434\u0432\u0430\u0436\u0434\u044b<\/li>\n\n\n\n<li>ansible-playbook playbook.yml &amp;&amp; ansible-playbook playbook.yml<\/li>\n\n\n\n<li>\u0418\u0449\u0438\u0442\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441\u00a0<code>changed!=0<\/code>\u00a0\u043f\u0440\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u2014 \u044d\u0442\u043e \u0442\u043e\u0447\u043a\u0438 \u043d\u0435\u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438.<\/li>\n<\/ul>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u0412\u044b\u043d\u043e\u0441 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u0432 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 Ansible<\/h3>\n\n\n\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432 \u0440\u043e\u043b\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f&nbsp;<strong>\u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 API<\/strong>, \u0438\u0445 \u043b\u0443\u0447\u0448\u0435 \u0432\u044b\u043d\u043e\u0441\u0438\u0442\u044c \u0432&nbsp;<strong>\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438<\/strong>. \u042d\u0442\u043e:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0423\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043a\u043e\u0434\u0430<\/li>\n\n\n\n<li>\u041f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c (\u043c\u043e\u0434\u0443\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0430 Python)<\/li>\n\n\n\n<li>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443<\/li>\n<\/ul>\n\n\n\n<p>\u041a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043d\u043e\u0441\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0432 \u043c\u043e\u0434\u0443\u043b\u044c?<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u0421\u043b\u043e\u0436\u043d\u0430\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f &#8212;\u00a0<\/strong>\u041f\u0430\u0440\u0441\u0438\u043d\u0433 JSON\/XML, \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432\/\u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439<\/li>\n\n\n\n<li><strong>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 API &#8212;\u00a0<\/strong>\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043a Kubernetes, AWS, Database<\/li>\n\n\n\n<li><strong>\u0413\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f &#8212;\u00a0<\/strong>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438<\/li>\n\n\n\n<li><strong>\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 &#8212;\u00a0<\/strong>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438<\/li>\n<\/ol>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>roles\/  <br>\u2514\u2500\u2500 my_role\/  <br>    \u251c\u2500\u2500 library\/          # \u0421\u044e\u0434\u0430 \u043a\u043b\u0430\u0434\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u0438  <br>    \u2502   \u2514\u2500\u2500 cert_validator.py  <br>    \u251c\u2500\u2500 tasks\/  <br>    \u2502   \u2514\u2500\u2500 main.yml  <br>    \u2514\u2500\u2500 defaults\/  <br>        \u2514\u2500\u2500 main.yml  <\/code><\/pre>\n\n\n\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0434\u0443\u043b\u044f (<code>library\/cert_validator.py<\/code>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/usr\/bin\/python3<br><br># \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435&nbsp;AnsibleModule<br><strong>from<\/strong> ansible.module_utils.basic <strong>import<\/strong> AnsibleModule<br><strong>import<\/strong> OpenSSL.crypto<br><strong>from<\/strong> datetime <strong>import<\/strong> datetime<br><br># \u041f\u0438\u0448\u0438\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043a \u043c\u043e\u0434\u0443\u043b\u044e<br>DOCUMENTATION = r'''<br>module: cert_validator<br>description: Check SSL certificate expiry<br>options:<br>  cert_path:<br>    description: Path to PEM certificate<br>    required: true<br>    type: str<br>'''<br><br><strong>def<\/strong> check_cert(cert_path):<br>    # \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0439\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0438<br>    <strong>try<\/strong>:<br>        <strong>with<\/strong> open(cert_path, 'rb') <strong>as<\/strong> f:<br>            cert = OpenSSL.crypto.load_certificate(<br>                OpenSSL.crypto.FILETYPE_PEM, f.read()<br>            )<br>        expiry_date = datetime.strptime(<br>            cert.get_notAfter().decode('utf-8'), '%Y%m%d%H%M%SZ'<br>        )<br>        <strong>return<\/strong> {<br>            'valid': datetime.now() &lt; expiry_date,<br>            'expiry_date': expiry_date.isoformat()<br>        }<br>    <strong>except<\/strong> Exception <strong>as<\/strong> e:<br>        <strong>return<\/strong> {'error': str(e)}<br><br><strong>def<\/strong> main():<br>    module = AnsibleModule(<br>        argument_spec=dict(<br>            cert_path=dict(type='str', required=<strong>True<\/strong>)<br>        )<br>    )<br>    result = check_cert(module.params&#91;'cert_path'])<br>    <strong>if<\/strong> 'error' <strong>in<\/strong> result:<br>        module.fail_json(msg=result&#91;'error'])<br>    module.exit_json(**result)<br><br><strong>if<\/strong> __name__ == '__main__':<br>    main()<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u0440\u043e\u043b\u0438<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>---<br>- name: Validate SSL certificate  <br>  cert_validator:  <br>    cert_path: \"{{ nginx__ssl_cert }}\"  <br>  register: cert_check  <br><br>- name: Fail if cert invalid  <br>  ansible.builtin.fail:  <br>    msg: \"Certificate expires on {{ cert_check.expiry_date }}\"  <br>  when: not cert_check.valid  <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0430<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c &#8212;\u00a0<\/strong>\u041c\u043e\u0434\u0443\u043b\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u0443\u0447\u0443 \u043a\u043e\u043c\u0430\u043d\u0434 \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 set_fact \u0438 \u0446\u0438\u043a\u043b\u043e\u0432 ansible).<\/li>\n\n\n\n<li><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c &#8212;\u00a0<\/strong>\u041d\u0435\u0442 \u0440\u0438\u0441\u043a\u0430 \u0438\u043d\u044a\u0435\u043a\u0446\u0438\u0439 (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0441\u044b\u0440\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434).<\/li>\n\n\n\n<li><strong>\u0418\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c &#8212;\u00a0<\/strong>\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430\u00a0<code>changed<\/code>\/<code>failed<\/code>\u00a0\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439.<\/li>\n\n\n\n<li><strong>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c &#8212;\u00a0<\/strong>\u041c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u0440\u043e\u043b\u0438.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u0421\u043e\u0432\u0435\u0442\u044b \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/li>\n\n\n\n<li>\u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0439\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0438<\/li>\n\n\n\n<li>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e<code>python library\/cert_validator.py '{\"cert_path\":\"\/tmp\/cert.pem\"}'<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432<\/h4>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c \u2014 \u044d\u0442\u043e overkill, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code><strong>ansible.builtin.script<\/strong><\/code><code>- name: Run validation script<br>ansible.builtin.script:<br>cmd: scripts\/validate_cert.sh {{ cert_path }}<\/code><\/li>\n\n\n\n<li><strong>\u0424\u0438\u043b\u044c\u0442\u0440\u044b Jinja2<\/strong><code>- set_fact:<br>is_valid: \"{{ cert_data | regex_search('VALID') }}\"<\/code><\/li>\n<\/ol>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 (handlers\/main.yml)<\/h3>\n\n\n\n<p><strong>\u0425\u0435\u043d\u0434\u043b\u0435\u0440\u044b \u2013 \u044d\u0442\u043e &#171;\u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438&#187;<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445<\/strong>\u00a0(\u0435\u0441\u043b\u0438 \u0431\u044b\u043b\u00a0<code>notify<\/code>).<\/li>\n\n\n\n<li><strong>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437<\/strong>, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0438\u0445 \u0432\u044b\u0437\u0432\u0430\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437.<\/li>\n\n\n\n<li><strong>\u041f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439<\/strong>\u00a0(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0430).<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0445\u0435\u043d\u0434\u043b\u0435\u0440\u044b?<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432<\/strong>\u00a0\u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432.<\/li>\n\n\n\n<li><strong>\u041f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/strong>\u00a0\u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432.<\/li>\n\n\n\n<li><strong>\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0435\u043c\u043e\u043d\u043e\u0432<\/strong>\u00a0\u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/li>\n\n\n\n<li><strong>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439<\/strong>\u00a0(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u043f\u043e\u0447\u0442\u0443 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445).<\/li>\n<\/ul>\n\n\n\n<p>\u0418 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u044c \u0432 \u043a\u043e\u043d\u0435\u0446 \u0440\u043e\u043b\u0438 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0445\u0435\u043d\u0434\u043b\u0435\u0440\u043e\u0432. \u0418 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 &#8212; \u0430 \u043f\u043e\u0447\u0435\u043c\u0443, \u0437\u0430\u0447\u0435\u043c? \u041e\u0442\u0432\u0435\u0442: \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432\u0441\u0435 \u0445\u0435\u043d\u0434\u043b\u0435\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u043d\u0435 \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e \u0440\u043e\u043b\u0438, \u0430 \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e \u043f\u043b\u0435\u044f. \u0418 \u0435\u0441\u043b\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u043b\u0435\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u043e\u043b\u0435\u0439 \u0435\u0441\u0442\u044c \u0441\u0435\u043a\u0446\u0438\u044f tasks \u0438 post_task, \u0438 \u043e\u043d\u0438 \u0437\u0430\u0432\u044f\u0437\u0430\u043d\u044b \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0440\u043e\u043b\u0438, \u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0434\u043e \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u0435\u043d\u0434\u043b\u0435\u0440\u044b \u0432 \u043a\u043e\u043d\u0446\u0435 \u044d\u0442\u043e\u0439 \u0440\u043e\u043b\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c. ( \u041e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e&nbsp;<a href=\"https:\/\/habr.com\/ru\/users\/FactorT\/\">FactorT<\/a>&nbsp;)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>- name: Flush handlers at end\n  meta: flush_handlers\n  tags: always\n<a target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Ansible-\u0440\u043e\u043b\u0438 (README.md)<\/h3>\n\n\n\n<p>\u0425\u043e\u0440\u043e\u0448\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u043c \u0431\u0440\u0430\u0442\u044c\u044f\u043c-\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u043e\u043b\u044c (\u0438 \u043d\u0435 \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u0430\u0442\u044c \u043a \u0442\u0435\u0431\u0435 \u0441 \u0433\u043b\u0443\u043f\u044b\u043c\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438, \u043e\u0442\u0432\u043b\u0435\u043a\u0430\u044f \u043e\u0442 \u0440\u0430\u0437\u043c\u044b\u0448\u043b\u0435\u043d\u0438\u044f \u043e \u0432\u0435\u0447\u043d\u043e\u043c). \u0412\u043e\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430&nbsp;<code>README.md<\/code>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0440\u043e\u043b\u0438<\/li>\n\n\n\n<li>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/li>\n\n\n\n<li>\u0422\u0435\u0433\u0438<\/li>\n\n\n\n<li>\u041f\u0440\u0435\u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442\u044b<\/li>\n\n\n\n<li>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n\n\n\n<li>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432\u00a0defaults\/main.yml<\/li>\n\n\n\n<li>\u0421\u043e\u0432\u0435\u0442\u044b \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e<a target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u043e\u043b\u0438<\/h3>\n\n\n\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u043e\u043b\u0435\u0439 Ansible \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435, \u0442\u0430\u043a \u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 (standalone) \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u043e\u043b\u0435\u0439 \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0438 \u043d\u0430 \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u0445.<br>\u0415\u0441\u043b\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0435 \u0440\u043e\u043b\u0435\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043f\u0435\u0440\u0435\u0434 \u0441\u043b\u0438\u044f\u043d\u0438\u0435\u043c (\u043c\u0435\u0440\u0436\u0435\u043c) \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Molecule \u0438&nbsp;<strong>\u044f\u0432\u043d\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b<\/strong>. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u043e\u0432\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435 \u043d\u0430\u0440\u0443\u0448\u0430\u044e\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0447\u0442\u043e \u0440\u043e\u043b\u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. \u0427\u0443\u0432\u0441\u0442\u0432\u0443\u044e \u0442\u0432\u043e\u0439 \u043f\u0440\u0430\u0432\u043e\u043c\u0435\u0440\u043d\u044b\u0439 \u0433\u043d\u0435\u0432 &#8212; &#171;\u0437\u0430\u0447\u0435\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432\u0435\u0434\u044c&nbsp;<s>\u0443 \u043c\u0435\u043d\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e<\/s>&nbsp;\u043d\u0430 \u043c\u043e\u0435\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442&#187;, \u043d\u043e \u0435\u0441\u043b\u0438 \u0440\u043e\u043b\u044c \u0442\u044b \u043f\u0438\u0448\u0435\u0448\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u0435\u0431\u044f, \u0442\u043e \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b.<\/p>\n\n\n\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0432\u044b\u0448\u0435\u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0442\u0435\u0431\u0435 \u0432 \u0442\u0440\u0443\u0434\u043e\u0432\u044b\u0435\u0431\u0443\u0434\u043d\u044f\u0445.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0413\u0430\u0439\u0434\u043e\u0432 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u043a \u043f\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e &#8212; \u043a\u0443\u0447\u0430. \u0412\u0441\u0435 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0439\u0442\u0438 &#8212; \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0445 \u043d\u0435 \u0431\u0443\u0434\u0443. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u043e\u0438 \u0448\u0438\u0448\u043a\u0438, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0440\u043e\u043b\u0435\u0439 Ansible \u0438 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1737,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[26,467],"class_list":["post-1736","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-likbez","tag-ansible","tag-ansible-roles","entry-card--wide"],"_links":{"self":[{"href":"https:\/\/olvas.dev\/index.php?rest_route=\/wp\/v2\/posts\/1736","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/olvas.dev\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/olvas.dev\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/olvas.dev\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/olvas.dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1736"}],"version-history":[{"count":1,"href":"https:\/\/olvas.dev\/index.php?rest_route=\/wp\/v2\/posts\/1736\/revisions"}],"predecessor-version":[{"id":1738,"href":"https:\/\/olvas.dev\/index.php?rest_route=\/wp\/v2\/posts\/1736\/revisions\/1738"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/olvas.dev\/index.php?rest_route=\/wp\/v2\/media\/1737"}],"wp:attachment":[{"href":"https:\/\/olvas.dev\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/olvas.dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/olvas.dev\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}