{"id":316235,"date":"2021-01-12T09:01:35","date_gmt":"2021-01-12T09:01:35","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=316235"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=316235","title":{"rendered":"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u043e\u043b\u0435\u0439 Ansible \u0447\u0435\u0440\u0435\u0437 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 Molecule"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/e9\/sx\/a0\/e9sxa0wfcnay3jxflccoapcdv5o.jpeg\"><\/p>\n<p>  <\/p>\n<p>Molecule \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u043e\u043b\u0435\u0439 Ansible, \u043e\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0438 \u0433\u0438\u0431\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u043e\u043b\u0435\u0439. \u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Molecule \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u0430 \u043d\u0430 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0435 \u0434\u043e\u043a\u0435\u0440\u0430, \u0433\u0434\u0435 \u0442\u0435\u0441\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043d\u043e, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0432\u044b\u0431\u043e\u0440 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u0431\u044d\u043a\u044d\u043d\u0434 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/molecule.readthedocs.io\/en\/latest\/configuration.html#delegated\" rel=\"nofollow\">\u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430<\/a>.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0443 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432\u0441\u0435\u0433\u043e \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u0442\u043a\u043e\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u0443\u044e \u043f\u043e\u043c\u043e\u0449\u044c \u0442\u0435\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0442\u044f\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Molecule \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u043c\u043e\u0435\u043c \u043e\u043f\u044b\u0442\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u043e\u043b\u0438 Ansible \u043e\u0442 0 \u0434\u043e galaxy \u0438 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430, \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441 Google Cloud Platform. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u044f \u0432\u0437\u044f\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 Molecule (<a href=\"https:\/\/molecule.readthedocs.io\/en\/latest\/\" rel=\"nofollow\">https:\/\/molecule.readthedocs.io\/en\/latest\/<\/a>#)<\/li>\n<li>\u0425\u043e\u0440\u043e\u0448\u0435\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 Molecule \u043e\u0442 \u0414\u0436\u0435\u0444\u0444\u0430 \u0413\u0435\u0440\u043b\u0438\u043d\u0433\u0430 (<a href=\"https:\/\/www.jeffgeerling.com\/blog\/2018\/testing-your-ansible-roles-molecule\" rel=\"nofollow\">https:\/\/www.jeffgeerling.com\/blog\/2018\/testing-your-ansible-roles-molecule<\/a>)<\/li>\n<li>\u0420\u0435\u0434\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0438\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0439 \u0434\u043b\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 Molecule (<a href=\"https:\/\/github.com\/ansible-community\/molecule\/issues\/1292\" rel=\"nofollow\">https:\/\/github.com\/ansible-community\/molecule\/issues\/1292<\/a>)<\/li>\n<li>\u041f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e ansible \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 Google Cloud Platform \u043e\u0442 \u0413\u044d\u0440\u0438 \u0410. \u0421\u0442\u0430\u0444\u0444\u043e\u0440\u0434\u0430 (<a href=\"https:\/\/itnext.io\/getting-started-with-red-hat-ansible-for-google-cloud-platform-fa666c42a00c\" rel=\"nofollow\">https:\/\/itnext.io\/getting-started-with-red-hat-ansible-for-google-cloud-platform-fa666c42a00c<\/a>)<\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u0414\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440: \u0447\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Molecule?<\/strong><\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u043c\u0435\u043d\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e, \u2014 \u044d\u0442\u043e \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Molecule:<\/p>\n<p>  <\/p>\n<p><em>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f instance-config API. \u041f\u043e\u0441\u043e\u0431\u0438\u0435 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 instance-config, \u0430 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c instance-config<\/em>.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 instance-config \u0438 \u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a?<\/p>\n<p>  <\/p>\n<p>Instance-config \u2014 \u044d\u0442\u043e \u0444\u0430\u043a\u0442 Ansible, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 YAML \u0432 \u043a\u044d\u0448\u0435 Molecule ( <code>$HOME\/.cache\/molecule\/&lt;role-name&gt;\/&lt;scenario-name&gt;\/instance_config.yml<\/code>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">- address: 10.10.15.17  identity_file: \/home\/fabio\/.ssh\/id_rsa # mutually exclusive with                                         # password  instance: millennium_falcon  port: 22  user: hansolo # password: ssh_password # mutually exclusive with identity_file  become_method: sudo # optional # become_pass: password_if_required # optional<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e \u0441 \u0443\u0437\u043b\u0430\u043c\u0438 Windows, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043b\u044f WinRM.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0430\u0439\u043b create.yml<\/strong><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u043f\u0440\u043e\u044f\u0441\u043d\u0438\u043b\u0438, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 instance-config, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0448\u0430\u0433\u0443. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, Molecule \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0430\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0448\u0430\u0433 \u0432\u043f\u0435\u0440\u0435\u0434, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0444\u0430\u0439\u043b\u044b \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>molecule init<\/code>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">molecule init scenario -driver-name=delegated<\/code><\/pre>\n<p>  <\/p>\n<p>\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">. \u251c\u2500\u2500 INSTALL.rst \u251c\u2500\u2500 converge.yml \u251c\u2500\u2500 create.yml \u251c\u2500\u2500 destroy.yml \u251c\u2500\u2500 molecule.yml \u2514\u2500\u2500 verify.yml<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li><code>molecule.yml<\/code> \u2014 \u044d\u0442\u043e \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Molecule, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0444\u0430\u0437\u043e\u0432\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445.<\/li>\n<li><code>create.yml<\/code> \u2014 \u043a\u043e\u0434 Ansible \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u043d\u0430 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 instance-config.<\/li>\n<li><code>destroy.yml<\/code> \u043a\u043e\u0434 Ansible \u0434\u043b\u044f \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u043d\u0430 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0438\u0445 \u0438\u0437 instance-config<\/li>\n<li><code>converge.yml<\/code> \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0440\u043e\u043b\u0438<\/li>\n<li><code>verify.yml<\/code> \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u0447\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432<\/li>\n<li><code>INSTALL.rst<\/code> \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 Molecule<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u043d\u0430 \u0444\u0430\u0439\u043b\u0435 <code>create.yml<\/code>, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c Molecule:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- - name: Create  hosts: localhost  connection: local  gather_facts: false  no_log: &quot;{{ molecule_no_log }}&quot;  tasks:   # Developer must implement.  # Developer must map instance config.  # Mandatory configuration for Molecule to function.   \u2014 name: Populate instance config dict  set_fact:  instance_conf_dict: {  'instance': &quot;{{ }}&quot;,  'address': &quot;{{ }}&quot;,  'user': &quot;{{ }}&quot;,  'port': &quot;{{ }}&quot;,  'identity_file': &quot;{{ }}&quot;, }  with_items: &quot;{{ server.results }}&quot;  register: instance_config_dict  when: server.changed | bool   \u2014 name: Convert instance config dict to a list  set_fact:  instance_conf: {{ instance_config_dict.results | map(attribute='ansible_facts.instance_conf_dict') | list }}&quot;  when: server.changed | bool   \u2014 name: Dump instance config  copy:  content: &quot;{{ instance_conf | to_json | from_json | molecule_to_yaml | molecule_header }}&quot;  dest: &quot;{{ molecule_instance_config }}&quot;  when: server.changed | bool<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0440\u0438 \u0437\u0430\u0434\u0430\u0447\u0438: \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0434\u0430\u043c\u043f, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0444\u0430\u0439\u043b\u0430 <code>instance-config.yml<\/code>. \u041f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0435\u043c \u0434\u043b\u044f \u043a\u043e\u0434\u0430 Ansible, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 (\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0434\u0435\u0442\u0430\u043b\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430) \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u043b\u0438 \u0444\u0430\u043a\u0442\u0430. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u0432\u0437\u044f\u0442\u044b\u0439 \u0438\u0437 \u044d\u0442\u043e\u0439 <a href=\"https:\/\/github.com\/ansible-community\/molecule\/issues\/1292\" rel=\"nofollow\">\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 github<\/a>, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u044b\u0448\u0435 \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 VMWare:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\u2026  7     - name: Create molecule instance(s)  8      vmware_guest:  9        hostname: &quot;{{ molecule_yml.driver.hostname }}&quot; 10        esxi_hostname: &quot;{{ molecule_yml.driver.esxi_hostname }}&quot; 11        username: &quot;{{ molecule_yml.driver.username }}&quot; 12        password: &quot;{{ molecule_yml.driver.password }}&quot; 13        datacenter: &quot;{{ molecule_yml.driver.datacenter }}&quot; 14        validate_certs: &quot;{{ molecule_yml.driver.validate_certs }}&quot; 15        resource_pool: &quot;{{ molecule_yml.driver.resource_pool }}&quot; 16         folder: &quot;{{ molecule_yml.driver.folder }}&quot; 17         name: &quot;{{ item.name }}&quot; 18         template: &quot;{{ item.template }}&quot; 19         hardware: 20           memory_mb: &quot;{{ item.memory | default(omit) }}&quot; 21           num_cpus: &quot;{{ item.cpu | default(omit) }}&quot; 22         wait_for_ip_address: &quot;yes&quot; 23         state: poweredon 24       register: server 25       with_items: &quot;{{ molecule_yml.platforms }}&quot; 26      27     - name: Populate instance config dict 28       set_fact: 29         instance_conf_dict: { 30           'instance': &quot;{{ item.instance.hw_name }}&quot;, 31           'address': &quot;{{ item.instance.ipv4 }}&quot;, 32           'user': &quot;vagrant&quot;, 33           'port': &quot;22&quot;, 34           'identity_file': 'identity_file': &quot;{{                      molecule_yml.driver.ssh_identity_file }}&quot; 35         } 36       with_items: &quot;{{ server.results }}&quot; 37       register: instance_config_dict 38       when: server is changed \u2026<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u043e\u0434 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c <code>vmware_guest<\/code> (\u0441\u0442\u0440\u043e\u043a\u0438 7\u201323) \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 VMWare. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 <code>molecule.yml<\/code> (\u0441\u0442\u0440\u043e\u043a\u0430 25). \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>molecule.yml<\/code>, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u043a\u0442 <code>molecule_yml<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u043a\u0430\u0436\u0434\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c <code>vmware_guest<\/code>, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0441\u0442\u0440\u043e\u043a\u0430 24), \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 (<code>instance-config<\/code>) (\u0441\u0442\u0440\u043e\u043a\u0438 27 \u0438 \u0434\u0430\u043b\u0435\u0435). \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u043a\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p><strong>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 Google Cloud Platform (GCP)<\/strong><\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u044f \u0440\u0430\u0437\u044a\u044f\u0441\u043d\u0438\u043b, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u043c, \u044f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0441\u044c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u043e\u0439, \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u043c\u043e\u0435\u0439 <a href=\"https:\/\/galaxy.ansible.com\/fabiomarinetti\/fmarinetti_docker_secured\" rel=\"nofollow\">\u0440\u043e\u043b\u0438 docker-secured Ansible<\/a>. \u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0440\u043e\u043b\u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GCP \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043b\u044f \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430. Ansible \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 GCP \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u043c, \u0438 \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u043b\u0435\u0433\u043a\u043e \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0439 \u043a\u043e\u0434, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<ul>\n<li>python 2.7<\/li>\n<li>ansible 2.9.6<\/li>\n<li>molecule 3.0.2<\/li>\n<li>ansible-lint 4.2.0<\/li>\n<li>yamllint 1.20.0<\/li>\n<li>flake8 3.7.9 (mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 2.7.17 \u043d\u0430 Linux<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0433\u0434\u0435 yamllint, ansible-lint \u0438 flake8 \u2014 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432 \u0444\u0430\u0437\u044b \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044b.<\/p>\n<p>  <\/p>\n<p><strong>\u0420\u043e\u043b\u044c docker-secured<\/strong><\/p>\n<p>  <\/p>\n<p>\u0420\u043e\u043b\u044c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0434\u043e\u043a\u0435\u0440 \u043d\u0430 \u0443\u0437\u0435\u043b, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0434\u043e\u043a\u0435\u0440\u043e\u0432 \u0438 \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ssl. \u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b, \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0441\u0441\u044b\u043b\u043a\u0430\u0445 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Docker:<\/p>\n<p>  <\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/success.docker.com\/article\/how-do-i-enable-the-remote-api-for-dockerd\" rel=\"nofollow\">https:\/\/success.docker.com\/article\/how-do-i-enable-the-remote-api-for-dockerd<\/a><\/p>\n<p>  <\/li>\n<li>\n<p><a href=\"https:\/\/docs.docker.com\/engine\/security\/https\/\" rel=\"nofollow\">https:\/\/docs.docker.com\/engine\/security\/https\/<\/a><\/p>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0444\u0430\u0439\u043b\u044b \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 ssl \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0439 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043c\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 GitHub:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/fabiomarinetti\/fmarinetti.docker-secured.git<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u0434\u043b\u044f GCP<\/strong><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 GCP, \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0441\u043b\u0443\u0436\u0431\u044b \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447. \u042d\u0442\u0438 \u0448\u0430\u0433\u0438 \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430, \u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a <a href=\"https:\/\/cloud.google.com\/docs\" rel=\"nofollow\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0443 GCP<\/a> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u0449\u0435\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 \u044f \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0448\u0435\u043b \u044d\u0442\u0443 <a href=\"https:\/\/itnext.io\/getting-started-with-red-hat-ansible-for-google-cloud-platform-fa666c42a00c\" rel=\"nofollow\">\u0441\u0441\u044b\u043b\u043a\u0443<\/a> \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0439 Ansible \u0438 GCP.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0440\u043e\u043b\u0438 \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043f\u0440\u043e\u0435\u043a\u0442 <code>ansible-272015<\/code> \u0438 \u0441\u043b\u0443\u0436\u0431\u0443 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 <code>service<\/code>, \u0435\u0435 \u043a\u043b\u044e\u0447 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <code>secret.json<\/code>.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0430\u0439\u043b molecule.yml<\/strong><\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0438 \u043f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u044e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u043c\u043e\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 <code>molecule.yml<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442, \u0442\u0438\u043f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b <code>molecule.yml<\/code> \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <code>driver<\/code>. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u044f \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 \u0442\u043e\u0442 \u0436\u0435 \u0440\u0430\u0437\u0434\u0435\u043b \u0432\u0441\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0435\u0433\u0438\u043e\u043d \u0438 \u0437\u043e\u043d\u0430 GCP, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c ssh \u0438 \u0444\u0430\u0439\u043b \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0435\u0442\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0435\u0442\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u043d ad-hoc \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u0442\u0430. \u041a\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0438\u0437 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0447\u0435\u0440\u0435\u0437 <code>molecule_yml<\/code> (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>molecule_yml.driver.region<\/code> \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0440\u0435\u0433\u0438\u043e\u043d\u0443).<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">20 driver: 21   name: delegated 22   gcp_service_account_key: ${GOOGLE_APPLICATION_CREDENTIALS} 23   gcp_project_id: ansible-272015 24   region: us-east1 25   zone: us-east1-c 26   ssh_user: ${SSH_USER} 27   ssh_pub_key_file: &quot;${SSH_ID_FILE}.pub&quot; 28   ssh_key_file: &quot;${SSH_ID_FILE}&quot; 29   network_name: ansible-network 30   subnet_name: ansible-subnet 31   firewall_name: ansible-firewall 32   ip_cidr_range: 172.16.0.0\/28<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0434\u0435\u043b \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 <code>molecule.yml<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0430\u0441\u0441\u0438\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (\u0438\u043c\u044f, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0442\u0438\u043f, \u0440\u0430\u0437\u043c\u0435\u0440\u2026) \u0434\u043b\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c. \u041c\u043e\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 CentOS 7, Ubuntu Xenial 16.04 \u0438 Ubuntu Bionic 18.04. \u042d\u0442\u0438 \u043c\u0430\u0448\u0438\u043d\u044b \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043f\u043e \u0442\u0438\u043f\u0443 \u041e\u0421 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, CentOS \u0438\u043b\u0438 Ubuntu), \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044f \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 Ansible.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">41 platforms: 42   - name: &quot;ds-centos7-${TRAVIS_BUILD_ID}&quot; 43     image_family: projects\/centos-cloud\/global\/images\/family                      \/centos-7 44     machine_type: n1-standard-1 45     size_gb: 200 46     groups: 47       - centos 48   - name: &quot;ds-ubuntu-bionic-${TRAVIS_BUILD_ID}&quot; 49     image_family: projects\/ubuntu-os-cloud\/global\/images\/family                      \/ubuntu-1804-lts 50     machine_type: n1-standard-1 51     size_gb: 200 52     groups: 53       - ubuntu 54   - name:  &quot;ds-ubuntu-xenial-${TRAVIS_BUILD_ID}&quot; 55     image_family: projects\/ubuntu-os-cloud\/global\/images\/family                      \/ubuntu-1604-lts 56     machine_type: n1-standard-1 57     size_gb: 200 58     groups: 59       - ubuntu<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445 \u0444\u0430\u0439\u043b\u0430 <code>molecule.yml<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0430\u0437\u044b, \u0445\u043e\u0442\u044f \u043e\u043d\u0438 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0430\u0437\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0444\u0430\u0439\u043b create.yml<\/strong><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435, <code>create.yml<\/code> \u2014 \u044d\u0442\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u0442\u0430\u043f\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f. \u0417\u0434\u0435\u0441\u044c \u044f \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043c\u043e\u0434\u0443\u043b\u0438 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 gcp \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 (GCP). \u041c\u043e\u0434\u0443\u043b\u0438 GCP \u043d\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435, \u0442\u0430\u043a\u043e\u043c \u043a\u0430\u043a \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0442\u0438\u043f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u043f\u0443\u0442\u044c \u043a \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443, \u0438, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u043e\u0434\u0443\u043b\u044f, \u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u0438\u0445 \u043a\u0430\u043a <code>module_defaults<\/code> \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 gcp.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> 7   module_defaults:  8     group\/gcp:  9       project: &quot;{{ molecule_yml.driver.gcp_project_id }}&quot; 10       auth_kind: serviceaccount 11       service_account_file: &quot;{{                molecule_yml.driver.gcp_service_account_key }}&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u0432\u0438\u0434\u0435\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 VMWare, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0432 GCP \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043e\u043f\u0440\u043e\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f, \u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0448\u0430\u0433\u043e\u0432: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430, \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u0446\u0438\u043a\u043b\u0430 \u043f\u043e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u043c \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0446\u0438\u043a\u043b:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">16 \u2014 name: create instances 17   include_tasks: tasks\/create_instance.yml 18   loop: &quot;{{ molecule_yml.platforms }}&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0424\u0430\u0439\u043b <code>create_instance.yml<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e IP-\u0430\u0434\u0440\u0435\u0441\u0430, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430. \u0422\u043e, \u043a\u0430\u043a \u044f \u0432\u044b\u0437\u0432\u0430\u043b \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e \u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0438\u0445 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435, \u0430 \u043b\u0438\u0448\u044c \u0445\u043e\u0447\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0432 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0434\u043b\u044f \u043f\u043e\u0434\u0430\u0447\u0438 \u0437\u0430\u0434\u0430\u0447 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f instance-config.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">7 - name: initialize instance facts  8   set_fact:  9     instance_created: 10       instances: [] 11   when: instance_created is not defined ... create the instance and return instance variable ... 56 - name: update instance facts 57   set_fact: 58     instance_created: 59       changed: instance.changed | bool 60       instances: &quot;{{ instance_created.instances + [ instance ]}}&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043f\u043e\u0441\u043b\u0435 \u0446\u0438\u043a\u043b\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f isntance-config \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0430\u043a\u0442 <code>instance_create<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">20     - name: Populate instance config dict 21       set_fact: 22         instance_conf_dict: { 23           'instance': &quot;{{ item.name }}&quot;, 24           'address': &quot;{{                item.networkInterfaces[0].accessConfigs[0].natIP }}&quot;, 25           'user': &quot;{{ molecule_yml.driver.ssh_user }}&quot;, 26           'port': &quot;22&quot;, 27           'identity_file': &quot;{{ molecule_yml.driver.ssh_key_file                }}&quot;, } 28       with_items: &quot;{{ instance_created.instances }}&quot; 29       register: instance_config_dict 30       when: instance_created.changed<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u044d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u0431\u044b\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d, \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 VMWare, \u043a\u043e\u0433\u0434\u0430 \u0431\u044b\u043b\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <code>servers is changed<\/code><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u044f \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u044d\u0442\u0430\u043f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f, \u0432\u0432\u0435\u0434\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">molecule create --scenario-name=gcp<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u0431\u0435\u0434\u0438\u0432\u0448\u0438\u0441\u044c, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u044f \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u043a \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0443 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \/ \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0444\u0430\u0437\u044b:<\/p>\n<p>  <\/p>\n<ul>\n<li><strong>lint<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043a\u043e\u0434\u0430<\/li>\n<li><strong>prepare<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u043e\u043b\u0438. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b ubuntu.<\/li>\n<li><strong>converge<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u043e\u043b\u044c<\/li>\n<li><strong>idempotence<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u043e\u043b\u044c \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0435\u0435 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438<\/li>\n<li><strong>verify<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u043e\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f\u043c<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"plaintext\">molecule &lt;phase&gt; --scenario-name=gcp<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0440\u043e\u043b\u0438 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f, \u043c\u043d\u0435 \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0442\u0430\u043a \u0441\u0438\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u041c\u043e\u043b\u0435\u043a\u0443\u043b\u0443, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u0443\u044e \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0448\u0430\u0433\u0435 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b <code>destroy.yml<\/code> \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0435\u0433\u043e \u0441\u0447\u0435\u0442\u0430 ). \u041a\u043e\u0434 \u0434\u043b\u044f \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0442\u043e\u0439 \u0436\u0435 \u0444\u0438\u043b\u043e\u0441\u043e\u0444\u0438\u0438, \u0447\u0442\u043e \u0438 \u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u0435\u0442. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043f\u0443\u0442\u0435\u043c \u0432\u044b\u0434\u0430\u0447\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">molecule destroy --scenario-name=gcp<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0435 \u044d\u0442\u0430\u043f\u044b \u0431\u044b\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u0438 \u043d\u0435 \u0432\u044b\u0434\u0430\u043b\u0438 \u043e\u0448\u0438\u0431\u043e\u043a, \u044f \u043c\u043e\u0433 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">molecule test --scenario-test=gcp<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0412\u044b\u0432\u043e\u0434\u044b<\/strong><\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u043b, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 Molecule, \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u043a\u0430\u043a \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e GCP. \u042d\u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u043b\u0435\u0433\u043a\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0443: AWS, Azure, Digital Ocean\u2026 \u0438 \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0432\u044b\u0433\u043e\u0434\u0443 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Molecule. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043e\u0442\u0437\u044b\u0432.<\/p>\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\/post\/536892\/\"> https:\/\/habr.com\/ru\/post\/536892\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/e9\/sx\/a0\/e9sxa0wfcnay3jxflccoapcdv5o.jpeg\"><\/p>\n<p>  <\/p>\n<p>Molecule \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u043e\u043b\u0435\u0439 Ansible, \u043e\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0438 \u0433\u0438\u0431\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u043e\u043b\u0435\u0439. \u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Molecule \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u0430 \u043d\u0430 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0435 \u0434\u043e\u043a\u0435\u0440\u0430, \u0433\u0434\u0435 \u0442\u0435\u0441\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043d\u043e, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0432\u044b\u0431\u043e\u0440 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u0431\u044d\u043a\u044d\u043d\u0434 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/molecule.readthedocs.io\/en\/latest\/configuration.html#delegated\" rel=\"nofollow\">\u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430<\/a>.<\/p>\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-316235","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/316235","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=316235"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/316235\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=316235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=316235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=316235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}