{"id":27812,"date":"2022-12-13T20:17:45","date_gmt":"2023-05-19T07:27:19","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2\/"},"modified":"2025-08-12T04:45:34","modified_gmt":"2025-08-11T20:45:34","slug":"vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2\/","title":{"rendered":"Vagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 Ansible provisoner \u8fdb\u884c\u914d\u7f6e"},"content":{"rendered":"<h1>\u6d41\u6d6a\u8005- YAML- Ansible<\/p>\n<h2>\u9996\u5148\u5728Vagrantfile\u7684\u8bbe\u7f6e\u4e2d\uff0c\u5f53\u6d89\u53ca\u5230\u591a\u4e2a\u865a\u62df\u673a\u548c\u4e0d\u540c\u7684\u5ba2\u6237\u64cd\u4f5c\u7cfb\u7edf\uff08\u5982Windows\u548cCentOS\uff09\u65f6\uff0c\u53d8\u5f97\u66f4\u52a0\u590d\u6742\u3002\u56e0\u6b64\uff0c\u6211\u5bf9Vagrantfile\u8fdb\u884c\u4e86\u81ea\u5b9a\u4e49\uff0c\u4f7f\u5176\u4eceYAML\u6587\u4ef6\u4e2d\u8bfb\u53d6\u6bcf\u4e2a\u5ba2\u6237\u865a\u62df\u673a\u7684\u72ec\u7acb\u8bbe\u7f6e\u3002<\/p>\n<h3>\u9a8c\u8bc1\u73af\u5883\u4e3b\u673a\u6b63\u5728\u4f7f\u7528OSX\u8fdb\u884c\u9a8c\u8bc1\uff0c\u4f46\u53ea\u8981Vagrantfile\u5728\u80fd\u8fd0\u884cRuby\u73af\u5883\u7684\u60c5\u51b5\u4e0b\uff0c\u4e14\u63d0\u4f9b\u8005\uff08\u5373\u865a\u62df\u5316\u8f6f\u4ef6\uff09\u662fVirtualBox\uff0c\u5e94\u8be5\u5c31\u80fd\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<h3>\u6837\u672c\u4ee3\u7801\u4ee3\u7801\u5305\u62ec\u6837\u672c\u5df2\u7ecf\u4e0a\u4f20\u5230\u4ee5\u4e0b\u7684github\uff0c\u8bf7\u5728\u4f7f\u7528\u65f6\u53c2\u8003\u3002<\/p>\n<p>https:\/\/github.com\/tbuchi888\/vagrant-yaml-ansible\u3092\u53c2\u7167\u3059\u308b\u304b<\/p>\n<p>git clone https:\/\/github.com\/tbuchi888\/vagrant-yaml-ansible.git\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u7279\u70b9<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Vagrant\u306e\u30b2\u30b9\u30c8VM\u306b\u95a2\u3059\u308b\u8a2d\u5b9a\u3092YAML\u3067\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u8907\u6570VM\u3001\u8907\u6570OS\uff08Windows,CentOS\u306a\u3069\uff09\u6df7\u5728\u306b\u5bfe\u5fdc\u3067\u304d\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Ansible provisioner\u3092\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/ul>\n<h2>\u786e\u8ba4\u52a8\u4f5c\u73af\u5883<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Host<\/ul>\n<\/li>\n<\/ul>\n<p>Mac OSX Yosemite<br \/>\nVirtualBox 5.0.16<br \/>\nVagrant 1.8.1<br \/>\nAnsible 2.1.0<br \/>\nruby 2.0.0p481<\/p>\n<p>GuestVM<\/p>\n<p>CentOS 6<br \/>\nWinowsServer2012R2<\/p>\n<h2>\u4f7f\u7528\u65b9\u6cd5<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b5\u30f3\u30d7\u30eb\u3092\u53c2\u8003\u306b\u30b2\u30b9\u30c8VM\u306e\u60c5\u5831\uff08\u30db\u30b9\u30c8\u540d\u3084IP\u30a2\u30c9\u30ec\u30b9\u306a\u3069\uff09\u3092YAML\u5f62\u5f0f\u3067\u66f8\u3044\u3066conf-vbox-guestvm.yml\u3068\u3057\u3066Vagrantfile\u3068\u540c\u3058\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078\u7f6e\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>Vagrantfile\u3092github\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u7248\u3068\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\nAnsible provisioner\u3092\u4f7f\u3046\u5834\u5408\u306f\u3001playbook\u3084inventory\u30d5\u30a1\u30a4\u30eb\u306a\u3069\u3092conf-vbox-guestvm.yml\u306b\u8a18\u8f09\u306e\u30d1\u30b9\u306b\u7f6e\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>Vagrant up\u306a\u3069\u30b3\u30de\u30f3\u30c9\u306f\u901a\u5e38\u306eVagrant\u3068\u540c\u3058\u3088\u3046\u306b\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<p>\u8907\u6570VM\u6642\u306evagrant\u30b3\u30de\u30f3\u30c9\u306f\u3053\u3061\u3089\u306e\u8a18\u4e8b<br \/>\n\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>YAML \u6837\u672c<br \/>\n\u7531\u4e8e\u662fYAML\u683c\u5f0f\uff0c\u57fa\u672c\u4fe1\u606f\u5982BOX\u540d\u79f0\u7b49\u53ef\u4ee5\u50cf\u8fd9\u7bc7\u6587\u7ae0\u4e2d\u4e00\u6837\u8fdb\u884c\u6620\u5c04\u5408\u5e76\u7b49\u64cd\u4f5c\uff1aYAML \u652f\u6301\u5408\u5e76\u6620\u5c04\u7b49\u529f\u80fd\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"c1\"># Define the set value of guestvm in YAML format.<\/span>\r\n<span class=\"c1\"># You can either create a yml file in the current directory, Or \"str\" described variable.<\/span>\r\n<span class=\"c1\"># (*):The fields are required.<\/span>\r\n<span class=\"c1\">#---<\/span>\r\n<span class=\"c1\">#guestvm:<\/span>\r\n<span class=\"c1\">#  - name:                    * Set the guest VM's name . It is use hostname and Vagrant nodename<\/span>\r\n<span class=\"c1\">#    box:                     * Set the guest VM's box name'.<\/span>\r\n<span class=\"c1\">#    box_url:                   Set the guest VM's box url or path.<\/span>\r\n<span class=\"c1\">#    ipaddress:                 Set the guest VM's ipaddress. If not set ignore template's used.<\/span>\r\n<span class=\"c1\">#    os_type:                 * Set the guest VM's OS of the guest VM in 'windows' or 'linux'.<\/span>\r\n<span class=\"c1\">#    os_username:               Set the guest VM's OS username for ssh or WinRM. If not set ignore.<\/span>\r\n<span class=\"c1\">#    os_password:               Set the guest VM's OS password for ssh or WinRM. If not set ignore.<\/span>\r\n<span class=\"c1\">#    ansible_playbook:          Set the playbook name of Ansible to use provisioning. If not set ignore.<\/span>\r\n<span class=\"c1\">#    ansible_inventory_path:    Set the inventory file path of Ansible to use provisioning. If not set ignore.<\/span>\r\n<span class=\"c1\">#<\/span>\r\n<span class=\"c1\">#<\/span>\r\n<span class=\"nn\">---<\/span>\r\n<span class=\"na\">win_base<\/span><span class=\"pi\">:<\/span> <span class=\"nl\">&amp;WIN_BASE<\/span>\r\n  <span class=\"na\">box<\/span><span class=\"pi\">:<\/span>                       <span class=\"s\">win-2012r2-standard-amd64-nocm-mod<\/span>\r\n  <span class=\"na\">os_type<\/span><span class=\"pi\">:<\/span>                   <span class=\"s\">windows<\/span>\r\n  <span class=\"na\">os_username<\/span><span class=\"pi\">:<\/span>               <span class=\"s\">vagrant<\/span>\r\n  <span class=\"na\">os_password<\/span><span class=\"pi\">:<\/span>               <span class=\"s\">vagrant<\/span>\r\n\r\n<span class=\"na\">centos_base<\/span><span class=\"pi\">:<\/span> <span class=\"nl\">&amp;CENT_BASE<\/span>\r\n  <span class=\"na\">box<\/span><span class=\"pi\">:<\/span>                       <span class=\"s\">geerlingguy\/centos6<\/span>\r\n  <span class=\"na\">os_type<\/span><span class=\"pi\">:<\/span>                   <span class=\"s\">linux<\/span>\r\n\r\n<span class=\"na\">guestvm<\/span><span class=\"pi\">:<\/span>\r\n  <span class=\"pi\">-<\/span> <span class=\"na\">name<\/span><span class=\"pi\">:<\/span>                    <span class=\"s\">win2012-iis01<\/span>\r\n    <span class=\"na\">ipaddress<\/span><span class=\"pi\">:<\/span>               <span class=\"s\">192.168.33.51<\/span>\r\n    <span class=\"na\">ansible_playbook<\/span><span class=\"pi\">:<\/span>        <span class=\"s\">win2012_feature_iis_install.yml<\/span>\r\n    <span class=\"na\">ansible_inventory_path<\/span><span class=\"pi\">:<\/span>  <span class=\"s\">hosts<\/span>\r\n    <span class=\"s\">&lt;&lt;<\/span> <span class=\"pi\">:<\/span> <span class=\"nv\">*WIN_BASE<\/span>\r\n  <span class=\"pi\">-<\/span> <span class=\"na\">name<\/span><span class=\"pi\">:<\/span>                    <span class=\"s\">centos6-httpd01<\/span>\r\n    <span class=\"na\">ipaddress<\/span><span class=\"pi\">:<\/span>               <span class=\"s\">192.168.33.41<\/span>\r\n    <span class=\"na\">ansible_playbook<\/span><span class=\"pi\">:<\/span>        <span class=\"s\">centos6_httpd_install_noproxy.yml<\/span>\r\n    <span class=\"s\">&lt;&lt;<\/span> <span class=\"pi\">:<\/span> <span class=\"nv\">*CENT_BASE<\/span>\r\n  <span class=\"pi\">-<\/span> <span class=\"na\">name<\/span><span class=\"pi\">:<\/span>                    <span class=\"s\">centos6-httpd02<\/span>\r\n    <span class=\"na\">ipaddress<\/span><span class=\"pi\">:<\/span>               <span class=\"s\">192.168.33.42<\/span>\r\n    <span class=\"na\">ansible_playbook<\/span><span class=\"pi\">:<\/span>        <span class=\"s\">centos6_httpd_install_noproxy.yml<\/span>\r\n    <span class=\"s\">&lt;&lt;<\/span> <span class=\"pi\">:<\/span> <span class=\"nv\">*CENT_BASE<\/span>\r\n<\/code><\/pre>\n<h2>\u6267\u884c&#8221;vagrant up&#8221;\u7684\u7ed3\u679c\u662f\u4ec0\u4e48\uff1f<\/p>\n<pre class=\"post-pre\"><code>\/vagrant-yaml-ansible $ vagrant up\r\nBringing machine 'win2012-iis01' up with 'virtualbox' provider...\r\nBringing machine 'centos6-httpd01' up with 'virtualbox' provider...\r\nBringing machine 'centos6-httpd02' up with 'virtualbox' provider...\r\n==&gt; win2012-iis01: Importing base box 'win-2012r2-standard-amd64-nocm-mod'...\r\n==&gt; win2012-iis01: Matching MAC address for NAT networking...\r\n==&gt; win2012-iis01: Setting the name of the VM: vagrant-yaml-ansible_win2012-iis01_1458379134800_68871\r\n==&gt; win2012-iis01: Clearing any previously set network interfaces...\r\n==&gt; win2012-iis01: Preparing network interfaces based on configuration...\r\n    win2012-iis01: Adapter 1: nat\r\n    win2012-iis01: Adapter 2: hostonly\r\n==&gt; win2012-iis01: Forwarding ports...\r\n    win2012-iis01: 5985 (guest) =&gt; 55985 (host) (adapter 1)\r\n    win2012-iis01: 5986 (guest) =&gt; 55986 (host) (adapter 1)\r\n==&gt; win2012-iis01: Running 'pre-boot' VM customizations...\r\n==&gt; win2012-iis01: Booting VM...\r\n==&gt; win2012-iis01: Waiting for machine to boot. This may take a few minutes...\r\n    win2012-iis01: WinRM address: 127.0.0.1:55985\r\n    win2012-iis01: WinRM username: vagrant\r\n    win2012-iis01: WinRM execution_time_limit: PT2H\r\n    win2012-iis01: WinRM transport: plaintext\r\n\r\n==&gt; win2012-iis01: Machine booted and ready!\r\nSorry, don't know how to check guest version of Virtualbox Guest Additions on this platform. Stopping installation.\r\n==&gt; win2012-iis01: Checking for guest additions in VM...\r\n==&gt; win2012-iis01: Setting hostname...\r\n==&gt; win2012-iis01: Configuring and enabling network interfaces...\r\n==&gt; win2012-iis01: Mounting shared folders...\r\n    win2012-iis01: \/vagrant =&gt; \/Users\/foo\/vagrant-yaml-ansible\r\n==&gt; win2012-iis01: Running provisioner: ansible...\r\n    win2012-iis01: Running ansible-playbook...\r\n\r\nPLAY [all] *********************************************************************\r\n\r\nTASK [setup] *******************************************************************\r\nok: [win2012-iis01]\r\n\r\nTASK [win2012-iis01: copy html file] *******************************************\r\nchanged: [win2012-iis01]\r\n\r\nTASK [win2012-iis01: shuld be Installed IIS] ***********************************\r\nok: [win2012-iis01]\r\n\r\nPLAY RECAP *********************************************************************\r\nwin2012-iis01              : ok=3    changed=1    unreachable=0    failed=0   \r\n\r\n==&gt; centos6-httpd01: Importing base box 'geerlingguy\/centos6'...\r\n==&gt; centos6-httpd01: Matching MAC address for NAT networking...\r\n==&gt; centos6-httpd01: Checking if box 'geerlingguy\/centos6' is up to date...\r\n==&gt; centos6-httpd01: Setting the name of the VM: vagrant-yaml-ansible_centos6-httpd01_1458380691988_27772\r\n==&gt; centos6-httpd01: Clearing any previously set network interfaces...\r\n==&gt; centos6-httpd01: Preparing network interfaces based on configuration...\r\n    centos6-httpd01: Adapter 1: nat\r\n    centos6-httpd01: Adapter 2: hostonly\r\n==&gt; centos6-httpd01: Forwarding ports...\r\n    centos6-httpd01: 22 (guest) =&gt; 2222 (host) (adapter 1)\r\n==&gt; centos6-httpd01: Running 'pre-boot' VM customizations...\r\n==&gt; centos6-httpd01: Booting VM...\r\n==&gt; centos6-httpd01: Waiting for machine to boot. This may take a few minutes...\r\n    centos6-httpd01: SSH address: 127.0.0.1:2222\r\n    centos6-httpd01: SSH username: vagrant\r\n    centos6-httpd01: SSH auth method: private key\r\n    centos6-httpd01: Warning: Remote connection disconnect. Retrying...\r\n    centos6-httpd01: \r\n    centos6-httpd01: Vagrant insecure key detected. Vagrant will automatically replace\r\n    centos6-httpd01: this with a newly generated keypair for better security.\r\n    centos6-httpd01: \r\n    centos6-httpd01: Inserting generated public key within guest...\r\n    centos6-httpd01: Removing insecure key from the guest if it's present...\r\n    centos6-httpd01: Key inserted! Disconnecting and reconnecting using new SSH key...\r\n==&gt; centos6-httpd01: Machine booted and ready!\r\nGuestAdditions 5.0.16 running --- OK.\r\n==&gt; centos6-httpd01: Checking for guest additions in VM...\r\n==&gt; centos6-httpd01: Setting hostname...\r\n==&gt; centos6-httpd01: Configuring and enabling network interfaces...\r\n==&gt; centos6-httpd01: Mounting shared folders...\r\n    centos6-httpd01: \/vagrant =&gt; \/Users\/foo\/vagrant-yaml-ansible\r\n==&gt; centos6-httpd01: Running provisioner: ansible...\r\n    centos6-httpd01: Running ansible-playbook...\r\n\r\nPLAY [all] *********************************************************************\r\n\r\nTASK [centos6-httpd01: libselinux-python should have been installed] ***********\r\nok: [centos6-httpd01]\r\n\r\nTASK [centos6-httpd01: httpd should have been installed] ***********************\r\nchanged: [centos6-httpd01]\r\n\r\nTASK [centos6-httpd01: copy html file] *****************************************\r\nchanged: [centos6-httpd01]\r\n\r\nTASK [centos6-httpd01: httpd should have been running] *************************\r\nchanged: [centos6-httpd01]\r\n\r\nTASK [centos6-httpd01: lokkit -p 80:tcp] ***************************************\r\nchanged: [centos6-httpd01]\r\n\r\nPLAY RECAP *********************************************************************\r\ncentos6-httpd01            : ok=5    changed=4    unreachable=0    failed=0   \r\n\r\n==&gt; centos6-httpd02: Importing base box 'geerlingguy\/centos6'...\r\n==&gt; centos6-httpd02: Matching MAC address for NAT networking...\r\n==&gt; centos6-httpd02: Checking if box 'geerlingguy\/centos6' is up to date...\r\n==&gt; centos6-httpd02: Setting the name of the VM: vagrant-yaml-ansible_centos6-httpd02_1458380895063_96616\r\n==&gt; centos6-httpd02: Fixed port collision for 22 =&gt; 2222. Now on port 2200.\r\n==&gt; centos6-httpd02: Clearing any previously set network interfaces...\r\n==&gt; centos6-httpd02: Preparing network interfaces based on configuration...\r\n    centos6-httpd02: Adapter 1: nat\r\n    centos6-httpd02: Adapter 2: hostonly\r\n==&gt; centos6-httpd02: Forwarding ports...\r\n    centos6-httpd02: 22 (guest) =&gt; 2200 (host) (adapter 1)\r\n==&gt; centos6-httpd02: Running 'pre-boot' VM customizations...\r\n==&gt; centos6-httpd02: Booting VM...\r\n==&gt; centos6-httpd02: Waiting for machine to boot. This may take a few minutes...\r\n    centos6-httpd02: SSH address: 127.0.0.1:2200\r\n    centos6-httpd02: SSH username: vagrant\r\n    centos6-httpd02: SSH auth method: private key\r\n    centos6-httpd02: Warning: Remote connection disconnect. Retrying...\r\n    centos6-httpd02: \r\n    centos6-httpd02: Vagrant insecure key detected. Vagrant will automatically replace\r\n    centos6-httpd02: this with a newly generated keypair for better security.\r\n    centos6-httpd02: \r\n    centos6-httpd02: Inserting generated public key within guest...\r\n    centos6-httpd02: Removing insecure key from the guest if it's present...\r\n    centos6-httpd02: Key inserted! Disconnecting and reconnecting using new SSH key...\r\n==&gt; centos6-httpd02: Machine booted and ready!\r\nGuestAdditions 5.0.16 running --- OK.\r\n==&gt; centos6-httpd02: Checking for guest additions in VM...\r\n==&gt; centos6-httpd02: Setting hostname...\r\n==&gt; centos6-httpd02: Configuring and enabling network interfaces...\r\n==&gt; centos6-httpd02: Mounting shared folders...\r\n    centos6-httpd02: \/vagrant =&gt; \/Users\/foo\/vagrant-yaml-ansible\r\n==&gt; centos6-httpd02: Running provisioner: ansible...\r\n    centos6-httpd02: Running ansible-playbook...\r\n\r\nPLAY [all] *********************************************************************\r\n\r\nTASK [centos6-httpd02: libselinux-python should have been installed] ***********\r\nok: [centos6-httpd02]\r\n\r\nTASK [centos6-httpd02: httpd should have been installed] ***********************\r\nchanged: [centos6-httpd02]\r\n\r\nTASK [centos6-httpd02: copy html file] *****************************************\r\nchanged: [centos6-httpd02]\r\n\r\nTASK [centos6-httpd02: httpd should have been running] *************************\r\nchanged: [centos6-httpd02]\r\n\r\nTASK [centos6-httpd02: lokkit -p 80:tcp] ***************************************\r\nchanged: [centos6-httpd02]\r\n\r\nPLAY RECAP *********************************************************************\r\ncentos6-httpd02            : ok=5    changed=4    unreachable=0    failed=0   \r\n\r\n~\/vagrant-yaml-ansible $\r\n<\/code><\/pre>\n<h2>\u5176\u4ed6<\/p>\n<h3>\u5173\u4e8eAnsible\u914d\u7f6e\u7ba1\u7406\u5de5\u5177\u3002<\/p>\n<ul class=\"post-ul\">Ansible provisione\u306e\u4f7f\u3044\u65b9\u306fVagrant\u30b5\u30a4\u30c8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/ul>\n<h3>\u5173\u4e8e\u793a\u4f8b\u7684Windows\u76d2\u5b50\u4e3a\u4e86\u5728\u57fa\u4e8eopentable\/win-2012r2-standard-amd64-nocmBOX\u6587\u4ef6\u7684\u57fa\u7840\u4e0a\u8fd0\u884cAnsible provisoner\uff0c\u6211\u4eec\u5bf9\u6837\u672c\u4e2d\u63d0\u53ca\u7684win-2012r2-standard-amd64-nocm-mod box\u6587\u4ef6\u6240\u9644\u5e26\u7684HashiCorp.\u7684\u94fe\u63a5\u8fdb\u884c\u4e86\u4ee5\u4e0b\u9644\u52a0\u914d\u7f6e\u3002<\/p>\n<ul class=\"post-ul\">Vagrant \u3068\u63a5\u7d9a\u3057\u3066\u3044\u308b 192.168.33.0\/24\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092Public \u304b\u3089 Private \u3078\u4ee5\u4e0b\u30d1\u30ef\u30fc\u30b7\u30a7\u30eb\u306e\u30b3\u30de\u30f3\u30c9\u3067\u5909\u66f4\u3057\u3001\u3055\u3089\u306bGUI\u3067Private Network\u3000\u306e\u3000Firewall\u3092off\u306b\u3057\u307e\u3059\u3002<\/ul>\n<pre class=\"post-pre\"><code>Get-NetConnectionProfile\r\nGet-NetConnectionProfile |  where Name -eq 'Unidentified network'\r\nGet-NetConnectionProfile |  where Name -eq 'Unidentified network' | Set-NetconnectionProfile -NetworkCategory Private\r\nGet-NetConnectionProfile |  where Name -eq 'Unidentified network'\r\n<\/code><\/pre>\n<p>\u6267\u884c\u7ed3\u679c<\/p>\n<pre class=\"post-pre\"><code>Windows PowerShell\r\nCopyright (C) 2013 Microsoft Corporation. All rights reserved.\r\n\r\nPS C:\\Users\\Administrator&gt; Get-NetConnectionProfile\r\n\r\nName             : Network\r\nInterfaceAlias   : Ethernet\r\nInterfaceIndex   : 12\r\nNetworkCategory  : Public\r\nIPv4Connectivity : Internet\r\nIPv6Connectivity : NoTraffic\r\n\r\nName             : Unidentified network\r\nInterfaceAlias   : Ethernet 2\r\nInterfaceIndex   : 15\r\nNetworkCategory  : Public\r\nIPv4Connectivity : LocalNetwork\r\nIPv6Connectivity : NoTraffic\r\n\r\nPS C:\\Users\\Administrator&gt; Get-NetConnectionProfile |  where Name -eq 'Unidentified network'\r\n\r\nName             : Unidentified network\r\nInterfaceAlias   : Ethernet 2\r\nInterfaceIndex   : 15\r\nNetworkCategory  : Public\r\nIPv4Connectivity : LocalNetwork\r\nIPv6Connectivity : NoTraffic\r\n\r\nPS C:\\Users\\Administrator&gt; Get-NetConnectionProfile |  where Name -eq 'Unidentified network' | Set-NetconnectionProfile\r\n-NetworkCategory Private\r\nPS C:\\Users\\Administrator&gt; Get-NetConnectionProfile |  where Name -eq 'Unidentified network'\r\n\r\nName             : Unidentified network\r\nInterfaceAlias   : Ethernet 2\r\nInterfaceIndex   : 15\r\nNetworkCategory  : Private\r\nIPv4Connectivity : LocalNetwork\r\nIPv6Connectivity : NoTraffic\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3088\u308aWinRM \u3078\u4ee5\u4e0b\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3002<\/ul>\n<pre class=\"post-pre\"><code>winrm quickconfig -q\r\nwinrm set winrm\/config\/winrs @{MaxMemoryPerShellMB=\"512\"}\r\nwinrm set winrm\/config @{MaxTimeoutms=\"1800000\"}\r\nwinrm set winrm\/config\/service @{AllowUnencrypted=\"true\"}\r\nwinrm set winrm\/config\/service\/auth @{Basic=\"true\"}\r\nsc config WinRM start= auto\r\n<\/code><\/pre>\n<p>\u6267\u884c\u7ed3\u679c<\/p>\n<pre class=\"post-pre\"><code>Microsoft Windows [Version 6.3.9600]\r\n(c) 2013 Microsoft Corporation. All rights reserved.\r\n\r\nC:\\Users\\Administrator&gt;   winrm quickconfig -q\r\nWinRM service is already running on this machine.\r\nWinRM is already set up for remote management on this computer.\r\n\r\nC:\\Users\\Administrator&gt;   winrm set winrm\/config\/winrs @{MaxMemoryPerShellMB=\"512\"}\r\nWinrs\r\n    AllowRemoteShellAccess = true\r\n    IdleTimeout = 7200000\r\n    MaxConcurrentUsers = 10\r\n    MaxShellRunTime = 2147483647\r\n    MaxProcessesPerShell = 25\r\n    MaxMemoryPerShellMB = 512\r\n    MaxShellsPerUser = 30\r\n\r\n\r\nC:\\Users\\Administrator&gt;   winrm set winrm\/config @{MaxTimeoutms=\"1800000\"}\r\nConfig\r\n    MaxEnvelopeSizekb = 500\r\n    MaxTimeoutms = 1800000\r\n    MaxBatchItems = 32000\r\n    MaxProviderRequests = 4294967295\r\n    Client\r\n        NetworkDelayms = 5000\r\n        URLPrefix = wsman\r\n        AllowUnencrypted = false\r\n        Auth\r\n            Basic = true\r\n            Digest = true\r\n            Kerberos = true\r\n            Negotiate = true\r\n            Certificate = true\r\n            CredSSP = false\r\n        DefaultPorts\r\n            HTTP = 5985\r\n            HTTPS = 5986\r\n        TrustedHosts\r\n    Service\r\n        RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)\r\n        MaxConcurrentOperations = 4294967295\r\n        MaxConcurrentOperationsPerUser = 1500\r\n        EnumerationTimeoutms = 240000\r\n        MaxConnections = 300\r\n        MaxPacketRetrievalTimeSeconds = 120\r\n        AllowUnencrypted = true\r\n        Auth\r\n            Basic = true\r\n            Kerberos = true\r\n            Negotiate = true\r\n            Certificate = false\r\n            CredSSP = false\r\n            CbtHardeningLevel = Relaxed\r\n        DefaultPorts\r\n            HTTP = 5985\r\n            HTTPS = 5986\r\n        IPv4Filter = *\r\n        IPv6Filter = *\r\n        EnableCompatibilityHttpListener = false\r\n        EnableCompatibilityHttpsListener = false\r\n        CertificateThumbprint\r\n        AllowRemoteAccess = true\r\n    Winrs\r\n        AllowRemoteShellAccess = true\r\n        IdleTimeout = 7200000\r\n        MaxConcurrentUsers = 10\r\n        MaxShellRunTime = 2147483647\r\n        MaxProcessesPerShell = 25\r\n        MaxMemoryPerShellMB = 512\r\n        MaxShellsPerUser = 30\r\n\r\n\r\nC:\\Users\\Administrator&gt;   winrm set winrm\/config\/service @{AllowUnencrypted=\"true\"}\r\nService\r\n    RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)\r\n    MaxConcurrentOperations = 4294967295\r\n    MaxConcurrentOperationsPerUser = 1500\r\n    EnumerationTimeoutms = 240000\r\n    MaxConnections = 300\r\n    MaxPacketRetrievalTimeSeconds = 120\r\n    AllowUnencrypted = true\r\n    Auth\r\n        Basic = true\r\n        Kerberos = true\r\n        Negotiate = true\r\n        Certificate = false\r\n        CredSSP = false\r\n        CbtHardeningLevel = Relaxed\r\n    DefaultPorts\r\n        HTTP = 5985\r\n        HTTPS = 5986\r\n    IPv4Filter = *\r\n    IPv6Filter = *\r\n    EnableCompatibilityHttpListener = false\r\n    EnableCompatibilityHttpsListener = false\r\n    CertificateThumbprint\r\n    AllowRemoteAccess = true\r\n\r\n\r\nC:\\Users\\Administrator&gt;   winrm set winrm\/config\/service\/auth @{Basic=\"true\"}\r\nAuth\r\n    Basic = true\r\n    Kerberos = true\r\n    Negotiate = true\r\n    Certificate = false\r\n    CredSSP = false\r\n    CbtHardeningLevel = Relaxed\r\n\r\n\r\nC:\\Users\\Administrator&gt;   sc config WinRM start= auto\r\n[SC] ChangeServiceConfig SUCCESS\r\n\r\nC:\\Users\\Administrator&gt;\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6d41\u6d6a\u8005- YAML- Ansible \u9996\u5148\u5728Vagrantfile\u7684\u8bbe\u7f6e\u4e2d\uff0c\u5f53\u6d89\u53ca\u5230\u591a\u4e2a\u865a\u62df\u673a\u548c\u4e0d\u540c\u7684\u5ba2\u6237\u64cd\u4f5c [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-27812","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Vagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 Ansible provisoner \u8fdb\u884c\u914d\u7f6e - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8eVagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-\u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76-2\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Vagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 Ansible provisoner \u8fdb\u884c\u914d\u7f6e\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8eVagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-\u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-19T07:27:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-11T20:45:34+00:00\" \/>\n<meta name=\"author\" content=\"\u96c5, \u609f\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u96c5, \u609f\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2\/\",\"name\":\"Vagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 Ansible provisoner \u8fdb\u884c\u914d\u7f6e - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-05-19T07:27:19+00:00\",\"dateModified\":\"2025-08-11T20:45:34+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6\"},\"description\":\"\u5173\u4e8eVagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 Ansible provisoner \u8fdb\u884c\u914d\u7f6e\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6\",\"name\":\"\u96c5, \u609f\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g\",\"caption\":\"\u96c5, \u609f\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yawu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Vagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 Ansible provisoner \u8fdb\u884c\u914d\u7f6e - Blog - Silicon Cloud","description":"\u5173\u4e8eVagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u7684\u6280\u672f\u6587\u7ae0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-\u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76-2\/","og_locale":"zh_CN","og_type":"article","og_title":"Vagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 Ansible provisoner \u8fdb\u884c\u914d\u7f6e","og_description":"\u5173\u4e8eVagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-\u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76-2\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-05-19T07:27:19+00:00","article_modified_time":"2025-08-11T20:45:34+00:00","author":"\u96c5, \u609f","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u96c5, \u609f","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2\/","name":"Vagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 Ansible provisoner \u8fdb\u884c\u914d\u7f6e - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-05-19T07:27:19+00:00","dateModified":"2025-08-11T20:45:34+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6"},"description":"\u5173\u4e8eVagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"Vagrant \u652f\u6301\u591a\u4e2a\u865a\u62df\u673a\u3001\u591a\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6df7\u5408\u4f7f\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7 YAML \u6587\u4ef6\u8fdb\u884c\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 Ansible provisoner \u8fdb\u884c\u914d\u7f6e"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6","name":"\u96c5, \u609f","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g","caption":"\u96c5, \u609f"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yawu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/vagrant-%e6%94%af%e6%8c%81%e5%a4%9a%e4%b8%aa%e8%99%9a%e6%8b%9f%e6%9c%ba%e3%80%81%e5%a4%9a%e4%b8%aa%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e7%9a%84%e6%b7%b7%e5%90%88%e4%bd%bf%e7%94%a8%ef%bc%8c%e5%b9%b6-2\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27812","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=27812"}],"version-history":[{"count":3,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27812\/revisions"}],"predecessor-version":[{"id":111203,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27812\/revisions\/111203"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=27812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=27812"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=27812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}