{"id":317416,"date":"2021-02-03T15:00:44","date_gmt":"2021-02-03T15:00:44","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=317416"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=317416","title":{"rendered":"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e Ansible"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4ff\/6b7\/a0c\/4ff6b7a0cc9c1f84473751705a0620bc\" width=\"780\" height=\"439\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u0447\u0435\u043d\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 Ansible. \u041d\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e Ansible \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u044b. \u0412 \u044d\u0442\u043e\u043c \u0435\u0441\u0442\u044c \u043a\u0430\u043a \u0441\u0432\u043e\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430, \u0442\u0430\u043a \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438. \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0440\u044f\u0434\u0443 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e, \u0430 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u2014 \u0432 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0438 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u043c \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 Ansible.<\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 (\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0438\u0436\u0435 &#171;Filesystem&#187;).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u0434\u0435 (\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0438\u0436\u0435 &#171;Code&#187;).<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0438\u0445 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442, \u0442\u043e \u0432\u0441\u0435 \u0432\u0441\u0442\u0430\u0435\u0442 \u043d\u0430 \u0441\u0432\u043e\u0438 \u043c\u0435\u0441\u0442\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/589\/4c1\/988\/5894c1988ef982ecfd09f3c223e7c015\" width=\"802\" height=\"373\"><figcaption><\/figcaption><\/figure>\n<p>Filesystem-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u0438\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 Code-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438. \u041e\u0431\u0440\u0430\u0442\u0438\u043b\u0438 \u043b\u0438 \u0432\u044b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u0443\u044e \u0432\u044b\u0448\u0435 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0438 \u0447\u0440\u0435\u0437\u043c\u0435\u0440\u043d\u0443\u044e \u0441\u0432\u043e\u0431\u043e\u0434\u0443? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0434\u0430\u043b\u0435\u0435 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u044d\u0442\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439.<\/p>\n<h4>1. \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445<\/h4>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043b\u0443\u0447\u0448\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 (<code>Inventory<\/code>, <code>group_vars<\/code><em>, <\/em><code>host_vars<\/code>, <code>role\/defaults\/main.yml<\/code> \u0438 <code>role\/vars\/main.yml<\/code>). \u0412\u0441\u0435 &#171;\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435&#187; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u044f\u0432\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b. \u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u2014 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0435 \u043d\u0430 \u0440\u043e\u043b\u044c \u0438\u043b\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0430. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 &#171;\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445&#187; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0443\u0444\u0435\u0440\u0430 \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0447\u0430\u0441\u0442\u043e \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 <code>vars<\/code>, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 <code>block<\/code>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"java\">- name: Variables scope   hosts: localhost   connection: local   vars:     MY_VAR: \"I am global var\"   tasks:     - block:       - name: Print variable inside the block.         debug:           var: MY_VAR         vars:           MY_VAR: \"I am local var\" - name: Print variable outside the block.   debug:     var: MY_VAR <\/code><\/pre>\n<pre><code class=\"java\">PLAY [Variables scope]  TASK [Gathering Facts]  ok: [localhost]  TASK [Print variable inside the block.]  ok: [localhost] =&gt; {  \"MY_VAR\": \"I am local var\"  }  TASK [Print variable outside the block.]  ok: [localhost] =&gt; {  \"MY_VAR\": \"I am global var\"  } <\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445. \u0418 \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u044f\u0432\u043d\u043e. \u0414\u043b\u044f \u0440\u043e\u043b\u0438 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b <code>defaults\/main.yml<\/code>. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0438\u043c\u0435\u044e\u0442 \u0441\u0430\u043c\u044b\u0439 \u043d\u0438\u0437\u043a\u0438\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. \u042d\u0442\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442 \u0436\u0438\u0437\u043d\u044c \u043a\u043e\u043d\u0442\u0440\u0438\u0431\u044c\u044e\u0442\u043e\u0440\u0430\u043c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0442\u0435\u043c, \u043a\u0442\u043e \u0432\u0438\u0434\u0438\u0442 \u043a\u043e\u0434 \u0432\u043f\u0435\u0440\u0432\u044b\u0435.<\/p>\n<h4>2. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 README<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u0440\u043e\u043b\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0441\u0435 \u043e\u043d\u0438 \u0434\u0430\u0436\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435, \u0442\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435 \u0438\u0445 \u0432 \u0444\u0430\u0439\u043b\u0435 README. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 ansible-galaxy init \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0432 \u044d\u0442\u043e\u043c, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0432 \u0448\u0430\u0431\u043b\u043e\u043d README. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0432\u0430\u043c \u0441\u0430\u043c\u043e\u043c\u0443, \u0432 \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c README \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u043e\u043b\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0438 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435. \u041f\u043b\u043e\u0445\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0434 \u0432 git, \u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 wiki-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u041d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438, \u0447\u0442\u043e \u043a\u043e\u043d\u0442\u0440\u0438\u0431\u044c\u044e\u0442\u043e\u0440\u044b \u043e\u0431\u043d\u043e\u0432\u044f\u0442 \u0438 \u043a\u043e\u0434, \u0438 wiki-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u041e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0443\u043b \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h4>3. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u044b<\/h4>\n<p>\u0423 \u0432\u0441\u0435\u0445 &#171;\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0445&#187; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043e\u0432\u0435\u0442\u0435) \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u044b. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u044f \u0440\u043e\u043b\u0438. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u043e\u043b\u0435\u0439 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0432 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0435 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0440\u043e\u043b\u044f\u043c\u0438, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0440\u043e\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e port? \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043f\u0440\u0435\u0444\u0438\u043a\u0441, \u043c\u044b \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u043c, \u0447\u0442\u043e \u043e\u0434\u043d\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0434\u0440\u0443\u0433\u0438\u043c\u0438. \u041f\u0440\u0438\u043c\u0435\u0440: \u0440\u043e\u043b\u044c \u2014 consul. \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u2014 url, \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u2014 consul_url.<\/p>\n<h4>4. \u041d\u0430\u0437\u044b\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438<\/h4>\n<p>\u0423 \u0437\u0430\u0434\u0430\u0447 \u0432 Ansible \u0435\u0441\u0442\u044c \u0438\u043c\u0435\u043d\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0434\u043b\u044f \u043d\u0438\u0445 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0432 \u0432\u044b\u0432\u043e\u0434\u0435. \u041f\u043e\u043c\u043d\u0438\u0442\u0435: \u044d\u0442\u043e \u0432\u0430\u0448 \u043b\u043e\u0433, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"java\"># No name\/description - copy: dest=\/tmp\/text.txt, content=\"bla-bla\" - name: Print variable global var.  debug:    var: MY_VAR<\/code><\/pre>\n<pre><code class=\"java\">TASK [copy] changed: [localhost] TASK [Print variable global var.] * ok: [localhost] =&gt; { \"MY_VAR\": \"I am global var\" }<\/code><\/pre>\n<h4>5. DRY (Don&#8217;t Repeat Yourself)<\/h4>\n<p>Ansible \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0418 \u043a\u0430\u043a \u0438 \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0432 Ansible \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 DRY (Don&#8217;t Repeat Yourself). \u041d\u043e \u044d\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u041f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u0434\u0443\u043c\u0430\u0439\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u041a\u0440\u0443\u043f\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"166\" width=\"166\">\n<p>NAME<\/p>\n<\/td>\n<td>\n<p>URL<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"166\" width=\"166\">\n<p><code>import_playbook<\/code><\/p>\n<\/td>\n<td>\n<p><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/modules\/import_playbook_module.html#import-playbook-module\"><u>https:\/\/docs.ansible.com\/ansible\/latest\/modules\/importplaybook<\/u><em><u>module.html#import-playbook-module<\/u><\/em><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"166\" width=\"166\">\n<p><code>import_role<\/code><\/p>\n<\/td>\n<td>\n<p><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/modules\/import_role_module.html#import-role-module\"><u>https:\/\/docs.ansible.com\/ansible\/latest\/modules\/import<\/u><em><u>role<\/u><\/em><u>module.html#import-role-module<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"166\" width=\"166\">\n<p><code>include_role<\/code><\/p>\n<\/td>\n<td>\n<p><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/modules\/include_role_module.html#include-role-module\"><u>https:\/\/docs.ansible.com\/ansible\/latest\/modules\/includerole<\/u><em><u>module.html#include-role-module<\/u><\/em><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"166\" width=\"166\">\n<p><code>import_tasks<\/code><\/p>\n<\/td>\n<td>\n<p><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/modules\/import_tasks_module.html#import-tasks-module\"><u>https:\/\/docs.ansible.com\/ansible\/latest\/modules\/import<\/u><em><u>tasks<\/u><\/em><u>module.html#import-tasks-module<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"166\" width=\"166\">\n<p><code>include_tasks<\/code><\/p>\n<\/td>\n<td>\n<p><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/modules\/include_tasks_module.html#include-tasks-module\"><u>https:\/\/docs.ansible.com\/ansible\/latest\/modules\/includetasks_module.html#include-tasks-module<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0411\u043b\u043e\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0440\u043e\u043b\u0438: <code>(include\/import)tasks<\/code><em>, <\/em><code>(include\/import)role<\/code>. \u041a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u044c uri \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 API-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u044d\u0442\u043e POST-\u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c 10 \u0440\u0430\u0437 uri \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0433\u0434\u0435 \u0443\u0433\u043e\u0434\u043d\u043e. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0448 \u043c\u0435\u0442\u043e\u0434 \u0442\u043e\u0436\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <code>send_post.yml<\/code><\/p>\n<pre><code class=\"java\">- name: .::::::::::::. [ Sent POST request ] .::::::::::::.  uri:    url: \"{{ URL }}\"    method: POST    status_code: 200    body: \"{{ BODY_VAR | to_nice_json }}\"    body_format: json    validate_certs: yes    client_cert: tls.crt    client_key: tls.key    register: return_values  when: BODY_VAR is defined <\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e.<\/p>\n<pre><code class=\"java\">- name: Bla-bla    include_tasks: send_post.yml    vars:        URL: \"{{ main_url }}\/{{ item }}\"        BODY_VAR: \"{{ item }}\"<\/code><\/pre>\n<p>URL \u0438 BODY_VAR<em> \u2014 \u044d\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u0435\u0442\u043e\u0434\u0430.<\/em><\/p>\n<h4>6. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0431\u043b\u043e\u043a\u0438 (block)<\/h4>\n<p><em>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435<\/em><strong><em> <\/em><\/strong><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/userguide\/playbooks_blocks.html\"><strong><em>block.<\/em><\/strong><\/a><em> <\/em>&nbsp; <\/p>\n<p>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u0434\u0430\u0447 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u044f \u0438\u0445. \u0422\u0430\u043a\u0436\u0435 block \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0431\u043b\u043e\u043a\u0443 try \/ catch \u0432 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<pre><code class=\"java\">- block:    ...   rescue:    ...<\/code><\/pre>\n<p><code>block\/rescue<\/code> \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 <code>ignore_errors<\/code>. \u041f\u043e \u0441\u0443\u0442\u0438, \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u043e\u0434 \u0432 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0435, \u0434\u0430\u0436\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0431\u043e\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<pre><code class=\"java\"> - block:    - name: .....    - name: .....    - name: .....    always:      file:        path: \/tmp\/xxxx        state: absent<\/code><\/pre>\n<h4>7. \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 command \u0438 shell<\/h4>\n<p>\u0421\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 <code>command<\/code> \u0438 <code>shell<\/code>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0435 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u044b\u0435. \u0425\u043e\u0442\u044f \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u043f\u0440\u0438\u0435\u043c\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0441\u043c\u044f\u0433\u0447\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435:<\/p>\n<ul>\n<li>\n<p><code>when<\/code><\/p>\n<\/li>\n<li>\n<p><code>creates<\/code> (\u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u044d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f).<\/p>\n<\/li>\n<li>\n<p><code>removes<\/code> (\u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u044d\u0442\u043e\u0442 \u0448\u0430\u0433 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f).<\/p>\n<\/li>\n<li>\n<p><code>changedwhen<\/code><em>.<\/em><\/p>\n<\/li>\n<\/ul>\n<p><em>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u0435\u0440\u0436\u0438\u0442\u0435\u0441\u044c \u043f\u043e\u0434\u0430\u043b\u044c\u0448\u0435 \u043e\u0442 <\/em><code>command<\/code><em> \u0438 <\/em><code>shell<\/code><em>.<\/em><\/p>\n<h4>8. \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u0435\u0433\u0438<\/h4>\n<p>\u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u0435\u0433\u0438. \u0422\u0435\u0433\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u0442\u0430\u0442\u044c \u043d\u043e\u0447\u043d\u044b\u043c \u043a\u043e\u0448\u043c\u0430\u0440\u043e\u043c \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0438\u0434\u044f\u0442 \u0432\u0430\u0448 \u043a\u043e\u0434 \u0432\u043f\u0435\u0440\u0432\u044b\u0435. \u041a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0442\u0435\u0433\u043e\u0432 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 \u0432\u044b\u0431\u043e\u0440\u0430, \u0442\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u0433\u0438 \u0438 \u0438\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0432 README. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u0442\u0435\u0433\u0438 \u043f\u043b\u043e\u0445\u0438. \u0415\u0441\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>always<\/code>, <code>never<\/code> \u2014&nbsp; <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/userguide\/playbookstags.html#sts=Special%20Tags%C2%B6\">\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a>. <\/p>\n<p><code>skip_ansible_lint<\/code> \u2014 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c <code>ansible-lint<\/code> \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<h4>9. \u041f\u0440\u0438\u043d\u0446\u0438\u043f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>become<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c <code>no<\/code>, \u043f\u043e\u043a\u0430 \u0432\u0430\u043c \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e. \u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>become<\/code> \u044f\u0432\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"java\">---  - hosts: wordpress     become: no      ...     role:       - role: wordpress  tasks\/main.yml --- - name: Install mysql-server pkg   apt:     name: mysql-server     state: present   become: yes<\/code><\/pre>\n<h4>10. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 YAML-\u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 YAML \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430. \u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u044d\u0442\u0438 \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:<\/p>\n<p><strong>YAML<\/strong><\/p>\n<pre><code class=\"java\">- name: Install apache httpd   apt:     name: apache2     state: present<\/code><\/pre>\n<p><strong>\u0412\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0439<\/strong><\/p>\n<pre><code class=\"java\">- name: Install apache httpd   apt: pkg=apache2 state=pesent<\/code><\/pre>\n<h4>11. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 gitignore<\/h4>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 <code>.gitignore<\/code> \u043a \u0441\u0432\u043e\u0438\u043c \u0440\u043e\u043b\u044f\u043c, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043a\u043e\u0434 \u0432 git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u041f\u0440\u043e\u0441\u0442\u043e\u0439 <code>.gitignore<\/code> \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"java\">*.retry *\/__pycache__ *.pyc *.log ### IntelliJ IDEA ### .idea *.iws *.iml *.ipr<\/code><\/pre>\n<h4>12. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043e\u0432\u0435\u0442\u044b \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Ansible<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0441 <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/userguide\/playbooksbestpractices.html#content-organization\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b ansible<\/a> <em>&nbsp;<\/em><\/p>\n<h4>13. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u043b\u044f \u0440\u043e\u043b\u0435\u0439 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u043b\u044f \u0440\u043e\u043b\u0435\u0439 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430, \u043d\u0430\u0440\u044f\u0434\u0443 \u0441 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c\u0438 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0432\u0435\u0442\u0430.<\/p>\n<h4>14. \u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0439\u0442\u0435 Ansible-\u043a\u043e\u0434<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 Ansible. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/molecule.readthedocs.io\/en\/latest\/index.html\">molecule<\/a>. \u042d\u0442\u043e\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448 \u043a\u043e\u0434 \u0441 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d. \u041f\u043e\u043c\u0438\u043c\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u043d \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u0438\u0434\u044b \u043b\u0438\u043d\u0442\u0435\u0440\u043e\u0432 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c.<\/p>\n<h4>15. \u0412\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u043e\u043b\u0435\u0439<\/h4>\n<p>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043c\u0438\u0440\u0435 Ansible? \u042d\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 git \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u043e\u043b\u0435\u0439, \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0432 \u0432\u0435\u0440\u0441\u0438\u044e. \u0412\u0435\u0440\u0441\u0438\u0435\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0435\u0433, \u0432\u0435\u0442\u043a\u0430 \u0438\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/galaxy\/userguide.html#installing-roles-from-galaxy\">\u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c<\/a>. \u0412\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0440\u043e\u043b\u0435\u0439.<\/p>\n<p><strong>requirements.yaml:<\/strong><\/p>\n<pre><code class=\"java\">--- - src: git@gitlab.company.com:mygroup\/ansible.git  scm: git  version: \"0.1\" ...<\/code><\/pre>\n<p><strong>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b:<\/strong><\/p>\n<ul>\n<li>\n<p>src<\/p>\n<\/li>\n<li>\n<p>scm<\/p>\n<\/li>\n<li>\n<p>version<\/p>\n<\/li>\n<li>\n<p>name<\/p>\n<\/li>\n<\/ul>\n<hr>\n<blockquote>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0432 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430&nbsp;<\/em><a href=\"https:\/\/otus.pw\/eZEr\/\"><em>\u00abDevOps \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b\u00bb<\/em><\/a><em>.<\/em><\/p>\n<\/p>\n<p><em>\u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u0432\u0441\u0435\u0445 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0434\u0435\u043c\u043e-\u0443\u0440\u043e\u043a \u043a\u0443\u0440\u0441\u0430 \u043f\u043e \u0442\u0435\u043c\u0435:&nbsp;<\/em><a href=\"https:\/\/otus.pw\/wWXt\/\"><em>\u00abPrometheus: \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442\u00bb<\/em><\/a><em>. \u041d\u0430 \u0437\u0430\u043d\u044f\u0442\u0438\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044f\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 Prometheus \u0438 \u0435\u0435 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0443\u0442, \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043b\u0435\u0440\u0442\u044b \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/em><\/p>\n<\/blockquote>\n<\/div>\n<p> \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\/company\/otus\/blog\/540716\/\"> https:\/\/habr.com\/ru\/company\/otus\/blog\/540716\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u0447\u0435\u043d\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 Ansible. \u041d\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e Ansible \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u044b. \u0412 \u044d\u0442\u043e\u043c \u0435\u0441\u0442\u044c \u043a\u0430\u043a \u0441\u0432\u043e\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430, \u0442\u0430\u043a \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438. \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0440\u044f\u0434\u0443 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e, \u0430 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u2014 \u0432 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0438 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u043c \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 Ansible.<\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 (\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0438\u0436\u0435 &#171;Filesystem&#187;).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u0434\u0435 (\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0438\u0436\u0435 &#171;Code&#187;).<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0438\u0445 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442, \u0442\u043e \u0432\u0441\u0435 \u0432\u0441\u0442\u0430\u0435\u0442 \u043d\u0430 \u0441\u0432\u043e\u0438 \u043c\u0435\u0441\u0442\u0430.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>Filesystem-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u0438\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 Code-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438. \u041e\u0431\u0440\u0430\u0442\u0438\u043b\u0438 \u043b\u0438 \u0432\u044b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u0443\u044e \u0432\u044b\u0448\u0435 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0438 \u0447\u0440\u0435\u0437\u043c\u0435\u0440\u043d\u0443\u044e \u0441\u0432\u043e\u0431\u043e\u0434\u0443? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0434\u0430\u043b\u0435\u0435 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u044d\u0442\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439.<\/p>\n<h4>1. \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445<\/h4>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043b\u0443\u0447\u0448\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 (<code>Inventory<\/code>, <code>group_vars<\/code><em>, <\/em><code>host_vars<\/code>, <code>role\/defaults\/main.yml<\/code> \u0438 <code>role\/vars\/main.yml<\/code>). \u0412\u0441\u0435 &#171;\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435&#187; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u044f\u0432\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b. \u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u2014 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0435 \u043d\u0430 \u0440\u043e\u043b\u044c \u0438\u043b\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0430. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 &#171;\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445&#187; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0443\u0444\u0435\u0440\u0430 \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0447\u0430\u0441\u0442\u043e \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 <code>vars<\/code>, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 <code>block<\/code>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"java\">- name: Variables scope   hosts: localhost   connection: local   vars:     MY_VAR: \"I am global var\"   tasks:     - block:       - name: Print variable inside the block.         debug:           var: MY_VAR         vars:           MY_VAR: \"I am local var\" - name: Print variable outside the block.   debug:     var: MY_VAR <\/code><\/pre>\n<pre><code class=\"java\">PLAY [Variables scope]  TASK [Gathering Facts]  ok: [localhost]  TASK [Print variable inside the block.]  ok: [localhost] =&gt; {  \"MY_VAR\": \"I am local var\"  }  TASK [Print variable outside the block.]  ok: [localhost] =&gt; {  \"MY_VAR\": \"I am global var\"  } <\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445. \u0418 \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u044f\u0432\u043d\u043e. \u0414\u043b\u044f \u0440\u043e\u043b\u0438 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b <code>defaults\/main.yml<\/code>. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0438\u043c\u0435\u044e\u0442 \u0441\u0430\u043c\u044b\u0439 \u043d\u0438\u0437\u043a\u0438\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. \u042d\u0442\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442 \u0436\u0438\u0437\u043d\u044c \u043a\u043e\u043d\u0442\u0440\u0438\u0431\u044c\u044e\u0442\u043e\u0440\u0430\u043c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0442\u0435\u043c, \u043a\u0442\u043e \u0432\u0438\u0434\u0438\u0442 \u043a\u043e\u0434 \u0432\u043f\u0435\u0440\u0432\u044b\u0435.<\/p>\n<h4>2. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 README<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u0440\u043e\u043b\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0441\u0435 \u043e\u043d\u0438 \u0434\u0430\u0436\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435, \u0442\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435 \u0438\u0445 \u0432 \u0444\u0430\u0439\u043b\u0435 README. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 ansible-galaxy init \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0432 \u044d\u0442\u043e\u043c, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0432 \u0448\u0430\u0431\u043b\u043e\u043d README. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0432\u0430\u043c \u0441\u0430\u043c\u043e\u043c\u0443, \u0432 \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c README \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u043e\u043b\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0438 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435. \u041f\u043b\u043e\u0445\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0434 \u0432 git, \u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 wiki-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u041d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438, \u0447\u0442\u043e \u043a\u043e\u043d\u0442\u0440\u0438\u0431\u044c\u044e\u0442\u043e\u0440\u044b \u043e\u0431\u043d\u043e\u0432\u044f\u0442 \u0438 \u043a\u043e\u0434, \u0438 wiki-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u041e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0443\u043b \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h4>3. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u044b<\/h4>\n<p>\u0423 \u0432\u0441\u0435\u0445 &#171;\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0445&#187; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043e\u0432\u0435\u0442\u0435) \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u044b. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u044f \u0440\u043e\u043b\u0438. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u043e\u043b\u0435\u0439 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0432 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0435 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0440\u043e\u043b\u044f\u043c\u0438, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0440\u043e\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e port? \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043f\u0440\u0435\u0444\u0438\u043a\u0441, \u043c\u044b \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u043c, \u0447\u0442\u043e \u043e\u0434\u043d\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0434\u0440\u0443\u0433\u0438\u043c\u0438. \u041f\u0440\u0438\u043c\u0435\u0440: \u0440\u043e\u043b\u044c \u2014 consul. \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u2014 url, \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u2014 consul_url.<\/p>\n<h4>4. \u041d\u0430\u0437\u044b\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438<\/h4>\n<p>\u0423 \u0437\u0430\u0434\u0430\u0447 \u0432 Ansible \u0435\u0441\u0442\u044c \u0438\u043c\u0435\u043d\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0434\u043b\u044f \u043d\u0438\u0445 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0432 \u0432\u044b\u0432\u043e\u0434\u0435. \u041f\u043e\u043c\u043d\u0438\u0442\u0435: \u044d\u0442\u043e \u0432\u0430\u0448 \u043b\u043e\u0433, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"java\"># No name\/description - copy: dest=\/tmp\/text.txt, content=\"bla-bla\" - name: Print variable global var.  debug:    var: MY_VAR<\/code><\/pre>\n<pre><code class=\"java\">TASK [copy] changed: [localhost] TASK [Print variable global var.] * ok: [localhost] =&gt; { \"MY_VAR\": \"I am global var\" }<\/code><\/pre>\n<h4>5. DRY (Don&#8217;t Repeat Yourself)<\/h4>\n<p>Ansible \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0418 \u043a\u0430\u043a \u0438 \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0432 Ansible \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 DRY (Don&#8217;t Repeat Yourself). \u041d\u043e \u044d\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u041f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u0434\u0443\u043c\u0430\u0439\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u041a\u0440\u0443\u043f\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"166\" width=\"166\">\n<p>NAME<\/p>\n<\/td>\n<td>\n<p>URL<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"166\" width=\"166\">\n<p><code>import_playbook<\/code><\/p>\n<\/td>\n<td>\n<p><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/modules\/import_playbook_module.html#import-playbook-module\"><u>https:\/\/docs.ansible.com\/ansible\/latest\/modules\/importplaybook<\/u><em><u>module.html#import-playbook-module<\/u><\/em><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"166\" width=\"166\">\n<p><code>import_role<\/code><\/p>\n<\/td>\n<td>\n<p><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/modules\/import_role_module.html#import-role-module\"><u>https:\/\/docs.ansible.com\/ansible\/latest\/modules\/import<\/u><em><u>role<\/u><\/em><u>module.html#import-role-module<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"166\" width=\"166\">\n<p><code>include_role<\/code><\/p>\n<\/td>\n<td>\n<p><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/modules\/include_role_module.html#include-role-module\"><u>https:\/\/docs.ansible.com\/ansible\/latest\/modules\/includerole<\/u><em><u>module.html#include-role-module<\/u><\/em><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"166\" width=\"166\">\n<p><code>import_tasks<\/code><\/p>\n<\/td>\n<td>\n<p><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/modules\/import_tasks_module.html#import-tasks-module\"><u>https:\/\/docs.ansible.com\/ansible\/latest\/modules\/import<\/u><em><u>tasks<\/u><\/em><u>module.html#import-tasks-module<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"166\" width=\"166\">\n<p><code>include_tasks<\/code><\/p>\n<\/td>\n<td>\n<p><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/modules\/include_tasks_module.html#include-tasks-module\"><u>https:\/\/docs.ansible.com\/ansible\/latest\/modules\/includetasks_module.html#include-tasks-module<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0411\u043b\u043e\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0440\u043e\u043b\u0438: <code>(include\/import)tasks<\/code><em>, <\/em><code>(include\/import)role<\/code>. \u041a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u044c uri \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 API-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u044d\u0442\u043e POST-\u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c 10 \u0440\u0430\u0437 uri \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0433\u0434\u0435 \u0443\u0433\u043e\u0434\u043d\u043e. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0448 \u043c\u0435\u0442\u043e\u0434 \u0442\u043e\u0436\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <code>send_post.yml<\/code><\/p>\n<pre><code class=\"java\">- name: .::::::::::::. [ Sent POST request ] .::::::::::::.  uri:    url: \"{{ URL }}\"    method: POST    status_code: 200    body: \"{{ BODY_VAR | to_nice_json }}\"    body_format: json    validate_certs: yes    client_cert: tls.crt    client_key: tls.key    register: return_values  when: BODY_VAR is defined <\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e.<\/p>\n<pre><code class=\"java\">- name: Bla-bla    include_tasks: send_post.yml    vars:        URL: \"{{ main_url }}\/{{ item }}\"        BODY_VAR: \"{{ item }}\"<\/code><\/pre>\n<p>URL \u0438 BODY_VAR<em> \u2014 \u044d\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u0435\u0442\u043e\u0434\u0430.<\/em><\/p>\n<h4>6. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0431\u043b\u043e\u043a\u0438 (block)<\/h4>\n<p><em>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435<\/em><strong><em> <\/em><\/strong><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/userguide\/playbooks_blocks.html\"><strong><em>block.<\/em><\/strong><\/a><em> <\/em>&nbsp; <\/p>\n<p>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u0434\u0430\u0447 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u044f \u0438\u0445. \u0422\u0430\u043a\u0436\u0435 block \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0431\u043b\u043e\u043a\u0443 try \/ catch \u0432 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<pre><code class=\"java\">- block:    ...   rescue:    ...<\/code><\/pre>\n<p><code>block\/rescue<\/code> \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 <code>ignore_errors<\/code>. \u041f\u043e \u0441\u0443\u0442\u0438, \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u043e\u0434 \u0432 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0435, \u0434\u0430\u0436\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0431\u043e\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<pre><code class=\"java\"> - block:    - name: .....    - name: .....    - name: .....    always:      file:        path: \/tmp\/xxxx        state: absent<\/code><\/pre>\n<h4>7. \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 command \u0438 shell<\/h4>\n<p>\u0421\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 <code>command<\/code> \u0438 <code>shell<\/code>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0435 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u044b\u0435. \u0425\u043e\u0442\u044f \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u043f\u0440\u0438\u0435\u043c\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0441\u043c\u044f\u0433\u0447\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435:<\/p>\n<ul>\n<li>\n<p><code>when<\/code><\/p>\n<\/li>\n<li>\n<p><code>creates<\/code> (\u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u044d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f).<\/p>\n<\/li>\n<li>\n<p><code>removes<\/code> (\u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u044d\u0442\u043e\u0442 \u0448\u0430\u0433 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f).<\/p>\n<\/li>\n<li>\n<p><code>changedwhen<\/code><em>.<\/em><\/p>\n<\/li>\n<\/ul>\n<p><em>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u0435\u0440\u0436\u0438\u0442\u0435\u0441\u044c \u043f\u043e\u0434\u0430\u043b\u044c\u0448\u0435 \u043e\u0442 <\/em><code>command<\/code><em> \u0438 <\/em><code>shell<\/code><em>.<\/em><\/p>\n<h4>8. \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u0435\u0433\u0438<\/h4>\n<p>\u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u0435\u0433\u0438. \u0422\u0435\u0433\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u0442\u0430\u0442\u044c \u043d\u043e\u0447\u043d\u044b\u043c \u043a\u043e\u0448\u043c\u0430\u0440\u043e\u043c \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0438\u0434\u044f\u0442 \u0432\u0430\u0448 \u043a\u043e\u0434 \u0432\u043f\u0435\u0440\u0432\u044b\u0435. \u041a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0442\u0435\u0433\u043e\u0432 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 \u0432\u044b\u0431\u043e\u0440\u0430, \u0442\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u0433\u0438 \u0438 \u0438\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0432 README. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u0442\u0435\u0433\u0438 \u043f\u043b\u043e\u0445\u0438. \u0415\u0441\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>always<\/code>, <code>never<\/code> \u2014&nbsp; <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/userguide\/playbookstags.html#sts=Special%20Tags%C2%B6\">\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a>. <\/p>\n<p><code>skip_ansible_lint<\/code> \u2014 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c <code>ansible-lint<\/code> \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<h4>9. \u041f\u0440\u0438\u043d\u0446\u0438\u043f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>become<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c <code>no<\/code>, \u043f\u043e\u043a\u0430 \u0432\u0430\u043c \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e. \u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>become<\/code> \u044f\u0432\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"java\">---  - hosts: wordpress     become: no      ...     role:       - role: wordpress  tasks\/main.yml --- - name: Install mysql-server pkg   apt:     name: mysql-server     state: present   become: yes<\/code><\/pre>\n<h4>10. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 YAML-\u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 YAML \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430. \u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u044d\u0442\u0438 \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:<\/p>\n<p><strong>YAML<\/strong><\/p>\n<pre><code class=\"java\">- name: Install apache httpd   apt:     name: apache2     state: present<\/code><\/pre>\n<p><strong>\u0412\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0439<\/strong><\/p>\n<pre><code class=\"java\">- name: Install apache httpd   apt: pkg=apache2 state=pesent<\/code><\/pre>\n<h4>11. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 gitignore<\/h4>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 <code>.gitignore<\/code> \u043a \u0441\u0432\u043e\u0438\u043c \u0440\u043e\u043b\u044f\u043c, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043a\u043e\u0434 \u0432 git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u041f\u0440\u043e\u0441\u0442\u043e\u0439 <code>.gitignore<\/code> \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"java\">*.retry *\/__pycache__ *.pyc *.log ### IntelliJ IDEA ### .idea *.iws *.iml *.ipr<\/code><\/pre>\n<h4>12. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043e\u0432\u0435\u0442\u044b \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Ansible<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0441 <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/userguide\/playbooksbestpractices.html#content-organization\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b ansible<\/a> <em>&nbsp;<\/em><\/p>\n<h4>13. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u043b\u044f \u0440\u043e\u043b\u0435\u0439 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u043b\u044f \u0440\u043e\u043b\u0435\u0439 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430, \u043d\u0430\u0440\u044f\u0434\u0443 \u0441 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c\u0438 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0432\u0435\u0442\u0430.<\/p>\n<h4>14. \u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0439\u0442\u0435 Ansible-\u043a\u043e\u0434<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 Ansible. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/molecule.readthedocs.io\/en\/latest\/index.html\">molecule<\/a>. \u042d\u0442\u043e\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448 \u043a\u043e\u0434 \u0441 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d. \u041f\u043e\u043c\u0438\u043c\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u043d \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u0438\u0434\u044b \u043b\u0438\u043d\u0442\u0435\u0440\u043e\u0432 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c.<\/p>\n<h4>15. \u0412\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u043e\u043b\u0435\u0439<\/h4>\n<p>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043c\u0438\u0440\u0435 Ansible? \u042d\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 git \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u043e\u043b\u0435\u0439, \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0432 \u0432\u0435\u0440\u0441\u0438\u044e. \u0412\u0435\u0440\u0441\u0438\u0435\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0435\u0433, \u0432\u0435\u0442\u043a\u0430 \u0438\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/galaxy\/userguide.html#installing-roles-from-galaxy\">\u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c<\/a>. \u0412\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0440\u043e\u043b\u0435\u0439.<\/p>\n<p><strong>requirements.yaml:<\/strong><\/p>\n<pre><code class=\"java\">--- - src: git@gitlab.company.com:mygroup\/ansible.git  scm: git  version: \"0.1\" ...<\/code><\/pre>\n<p><strong>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b:<\/strong><\/p>\n<ul>\n<li>\n<p>src<\/p>\n<\/li>\n<li>\n<p>scm<\/p>\n<\/li>\n<li>\n<p>version<\/p>\n<\/li>\n<li>\n<p>name<\/p>\n<\/li>\n<\/ul>\n<hr>\n<blockquote>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0432 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430&nbsp;<\/em><a href=\"https:\/\/otus.pw\/eZEr\/\"><em>\u00abDevOps \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b\u00bb<\/em><\/a><em>.<\/em><\/p>\n<\/p>\n<p><em>\u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u0432\u0441\u0435\u0445 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0434\u0435\u043c\u043e-\u0443\u0440\u043e\u043a \u043a\u0443\u0440\u0441\u0430 \u043f\u043e \u0442\u0435\u043c\u0435:&nbsp;<\/em><a href=\"https:\/\/otus.pw\/wWXt\/\"><em>\u00abPrometheus: \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442\u00bb<\/em><\/a><em>. \u041d\u0430 \u0437\u0430\u043d\u044f\u0442\u0438\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044f\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 Prometheus \u0438 \u0435\u0435 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0443\u0442, \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043b\u0435\u0440\u0442\u044b \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/em><\/p>\n<\/blockquote>\n<\/div>\n<p> \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\/company\/otus\/blog\/540716\/\"> https:\/\/habr.com\/ru\/company\/otus\/blog\/540716\/<\/a><br \/><\/br><\/br><\/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-317416","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/317416","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=317416"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/317416\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=317416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=317416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=317416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}