{"id":281901,"date":"2016-12-02T12:40:06","date_gmt":"2016-12-02T09:40:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=281901"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=281901","title":{"rendered":"KitchenCI + Ansible \u0434\u043b\u044f Windows \u0438 Linux"},"content":{"rendered":"<p>\u041c\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 <a href=\"https:\/\/hodgkins.io\/testing-ansible-roles-windows-test-kitchen\">\u0431\u043b\u043e\u0433<\/a> \u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u043e\u043b\u0435\u0439 Ansible \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"http:\/\/kitchen.ci\/\">KitchenCI<\/a>. \u041e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 ruby gem&#8217;\u043e\u0432, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u041e\u0421, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Serverspec \u0438 Pester). \u041a\u043e\u043b\u043b\u0435\u0433\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u043d\u0443\u0436\u0434\u044b \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 (provision \u0438 deploy \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434 Windows), \u0447\u0442\u043e \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0441\u0442\u0430\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e:<\/p>\n<ul>\n<li>\u042f \u0442\u043e\u0436\u0435 \u043b\u044e\u0431\u043b\u044e Ansible<\/li>\n<li>Ansible \u043c\u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c Linux<\/li>\n<li>\u042f \u043d\u0435 \u0445\u043e\u0447\u0443 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 GitHub \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Linux-\u0440\u043e\u043b\u0435\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435 \u0445\u043e\u0447\u0443 \u043f\u043b\u043e\u0434\u0438\u0442\u044c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 (\u0411\u0440\u0438\u0442\u0432\u0430 \u041e\u043a\u043a\u0430\u043c\u0430 \u043d\u0430\u0448\u0435 \u0432\u0441\u0435)<\/li>\n<\/ul>\n<p>  \u041a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0434\u0430\u043b\u044c\u0448\u0435, \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u0438 \u043c\u044b \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u044f \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u044e \u0435\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u0434 \u043e\u0431\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 (\u0431\u0443\u0434\u044c \u0442\u043e \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a), \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c\u044e. \u041d\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u2014 \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0435\u0439\u0447\u0430\u0441.<\/p>\n<p>  \u0410 \u0441\u0435\u0439\u0447\u0430\u0441 \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0440\u043e\u043b\u044c Ansible, \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043b\u0435\u0436\u0438\u0442 kitchen, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0442\u0435\u0441\u0442\u044b Pester \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 WinServer&#8217;\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u0430\u043c\u043e\u0433\u043e kitchen. \u0432 \u0444\u0430\u0439\u043b\u0435 .kitchen \u0438\u043c\u0435\u0435\u0442\u0441\u044f 2 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f Vagrant box&#8217;\u043e\u0432 (Ansible + Winserver), \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u0443\u0442\u0438 \u0434\u043e \u0442\u0435\u0441\u0442\u043e\u0432. \u041a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 <a href=\"https:\/\/github.com\/MattHodge\/ansible-testkitchen-windows\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>  \u041f\u043e 4 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 kitchen, \u043f\u0440\u043e\u0439\u0434\u0435\u0442 \u043d\u0430\u0448\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430.<\/p>\n<ul>\n<li>kitchen create \u2014 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043d\u0430\u0448\u0443 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443<\/li>\n<li>kitchen converge \u2014 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442 \u0440\u043e\u043b\u0438 ansible<\/li>\n<li>kitchen verifiy \u2014 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442 \u0442\u0435\u0441\u0442 suite \u0438\u0437 verifier&#8217;\u0430<\/li>\n<li>kitchen destroy \u2014 \u0443\u0431\u0435\u0440\u0435\u0442 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439.<\/li>\n<\/ul>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0434\u043e\u043b\u0433\u043e (Windows box \u0448\u0442\u0443\u043a\u0430 \u043e\u0447\u0435\u043d\u044c \u0442\u044f\u0436\u0435\u043b\u0430\u044f), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0434\u043e \u0437\u0430\u043f\u0430\u0441\u0442\u0438\u0441\u044c \u0442\u0435\u0440\u043f\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>  \u0412\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0437\u0430\u0431\u044b\u043b \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c: \u044d\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u2014 \u0441\u043a\u0435\u043b\u0435\u0442 \u0440\u043e\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u0443\u0447\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u0435\u043c\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u043e\u043b\u044c. \u042f \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0441\u0435\u0431\u0435 \u043a\u0435\u0439\u0441, \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 \u0440\u043e\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u043e\u0431\u0435\u0438\u0445 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445.<\/p>\n<p>  \u041d\u043e \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 GitHub \u043d\u0435 \u0440\u0435\u0437\u0438\u043d\u043e\u0432\u044b\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0434\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c.<br \/>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0440\u043e\u043b\u044c playbook&#8217;\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u0430 \u0434\u043b\u044f \u043e\u0431\u0435\u0438\u0445 \u041e\u0421. \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u043a\u0442\u044b Ansible.<\/p>\n<pre><code class=\"bash\">--- # This play installs IIS, if you run it on windows box   - name: install web-server feature     win_feature:       name: Web-Server       state: present     when: ansible_os_family == &quot;Windows&quot;    - name: deploy iis start page template     template:       src: iisstart.j2       dest: C:\\inetpub\\wwwroot\\iisstart.htm     when: ansible_os_family == &quot;Windows&quot;  # This play installs Nginx, if you run it on linux box   - name: install nginx     yum: name=nginx state=latest     when: ansible_os_family == &quot;RedHat&quot;    - name: start nginx     service: name=nginx state=started enabled=True     when: ansible_os_family == &quot;RedHat&quot; <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432 Windows \u0440\u043e\u043b\u044c IIS, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u2014 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c Nginx.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043a \u0442\u0435\u0441\u0442\u0430\u043c. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432 kitchen\/tests\/integration\/default (default \u2014 \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0442\u0435\u0441\u0442 suit&#8217;a) \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c serverspec. \u0412 \u043d\u0435\u043c \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b defailt_spec.rb<\/p>\n<p>  <i>\u042f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u0435\u043d \u0432 ruby, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0434\u0435\u043b\u0430\u043b \u0433\u0440\u044f\u0437\u043d\u043e \u0431\u0435\u0437 spec-helper&#8217;\u0430<\/i><\/p>\n<pre><code class=\"ruby\">require 'rubygems' require 'bundler\/setup'  require 'serverspec' require 'pathname' require 'net\/ssh'  RSpec.configure do |config|   set :host, ENV['KITCHEN_HOSTNAME']   # ssh options at http:\/\/net-ssh.github.io\/net-ssh\/Net\/SSH.html#method-c-start   # ssh via ssh key (only)   set :ssh_options,     :user =&gt; ENV['KITCHEN_USERNAME'],     :port =&gt; ENV['KITCHEN_PORT'],     :auth_methods =&gt; [ 'publickey' ],     :keys =&gt; [ ENV['KITCHEN_SSH_KEY'] ],     :keys_only =&gt; true,     :paranoid =&gt; false,     :verbose =&gt; :error   set :backend, :ssh   set :request_pty, true end  describe package('nginx'), :if =&gt; os[:family] == 'redhat' do   it { should be_installed } end  describe service('nginx'), :if =&gt; os[:family] == 'redhat' do   it { should be_enabled }   it { should be_running } end  describe port(80) do   it { should be_listening } end <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438: \u043f\u0430\u043a\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0441\u043b\u0443\u0436\u0431\u0430 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u0438 \u043d\u0430 \u0430\u0432\u0442\u043e\u0441\u0442\u0430\u0440\u0442\u0435, \u0438 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 80 \u043a\u0442\u043e-\u0442\u043e \u0441\u043b\u0443\u0448\u0430\u0435\u0442.<\/p>\n<p>  \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043e\u0432\u0435\u0442 \u0442\u0435\u043c, \u043a\u0442\u043e, \u043a\u0430\u043a \u0438 \u044f, \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0432 Ruby \u2014 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"http:\/\/serverspec.org\/\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> serverspec-init \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0432\u0430\u043c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0442\u0435\u0441\u0442, \u043a\u0430\u043a \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0440\u043e\u043b\u044c \u2014 \u0435\u0441\u0442\u044c, \u0442\u0435\u0441\u0442\u044b \u2014 \u0435\u0441\u0442\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0434\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0430\u043c\u0443 \u043a\u0443\u0445\u043d\u044e. \u041a\u043e\u043b\u043b\u0435\u0433\u0430 \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u0432\u0435 \u043c\u0430\u0448\u0438\u043d\u044b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 ansible \u0441\u0435\u0440\u0432\u0435\u0440 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 Windows. \u0412 \u043c\u043e\u0435\u043c \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c ansible \u0440\u043e\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u0430\u043c kitchen, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442 \u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043a\u0438. \u041c\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 kitchen \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043c\u0435\u043d\u044c\u0448\u0435.<\/p>\n<pre><code>--- driver:   name: vagrant   gui: true   linked_clone: true  platforms:   - name: centos_box     driver_plugin: vagrant     driver_config:       box: centos\/7       network:       - [ 'private_network', { ip: '172.28.128.13' } ]     transport:       max_ssh_sessions: 1     provisioner:       name: ansible_playbook       roles_path: ..\/       role_name: kitchen_test_role       ansible_inventory: inventory\/hosts       require_windows_support: true       require_chef_for_busser: false       ansible_host_key_checking: false       ansible_verbose: true       ansible_verbosity: 4       playbook: default_linux.yml     verifier:       name: serverspec       remote_exec: false   suites:   - name: default     verifier:       patterns:       - tests\/integration\/default\/serverspec\/default_spec.rb<\/code><\/pre>\n<p>  \u0423 \u043c\u0435\u043d\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 ansible_playbook, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043d\u0435\u043c \u0440\u043e\u043b\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f linux \u043c\u0430\u0448\u0438\u043d\u044b \u0432 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435.<\/p>\n<p>  \u0421 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0432 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e \u0438 \u043f\u043e\u043a\u043e\u043d\u0447\u0435\u043d\u043e. \u0410 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c kitchen&#8217;\u0443 \u043a\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e. \u041d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b kitchen \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0435\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f KITCHEN_YAML=\u00ab\u0438\u043c\u044f_\u043d\u0430\u0448\u0435\u0439_\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438\u00bb.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"bash\">KITCHEN_YAML=&quot;.kitchen_linux.yml&quot; kitchen create\/converge\/verify\/destroy. <\/code><\/pre>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/316700\/\"> https:\/\/habrahabr.ru\/post\/316700\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041c\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 <a href=\"https:\/\/hodgkins.io\/testing-ansible-roles-windows-test-kitchen\">\u0431\u043b\u043e\u0433<\/a> \u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u043e\u043b\u0435\u0439 Ansible \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"http:\/\/kitchen.ci\/\">KitchenCI<\/a>. \u041e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 ruby gem&#8217;\u043e\u0432, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u041e\u0421, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Serverspec \u0438 Pester). \u041a\u043e\u043b\u043b\u0435\u0433\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u043d\u0443\u0436\u0434\u044b \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 (provision \u0438 deploy \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434 Windows), \u0447\u0442\u043e \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0441\u0442\u0430\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e:<\/p>\n<ul>\n<li>\u042f \u0442\u043e\u0436\u0435 \u043b\u044e\u0431\u043b\u044e Ansible<\/li>\n<li>Ansible \u043c\u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c Linux<\/li>\n<li>\u042f \u043d\u0435 \u0445\u043e\u0447\u0443 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 GitHub \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Linux-\u0440\u043e\u043b\u0435\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435 \u0445\u043e\u0447\u0443 \u043f\u043b\u043e\u0434\u0438\u0442\u044c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 (\u0411\u0440\u0438\u0442\u0432\u0430 \u041e\u043a\u043a\u0430\u043c\u0430 \u043d\u0430\u0448\u0435 \u0432\u0441\u0435)<\/li>\n<\/ul>\n<p>  \u041a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0434\u0430\u043b\u044c\u0448\u0435, \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.  <\/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-281901","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/281901","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=281901"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/281901\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=281901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=281901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=281901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}