2017-07-31 16 views
0

Windows AMIを構築するために、提供者としてAnipalとPackerを使用しようとしています。不可能WinRM経由で接続しますが、最初のステップでハングアップ

$ packer --version 1.0.3

$ ansible --version ansible 2.2.0.0

Ansibleは正常に接続するようだが、その後7zipをダウンロード、脚本の最初のステップでハングアップします。以下は、私のパッカーのテンプレートとAnsibleプレイックのサンプルです。

パッカー

{ 
"builders": [{ 
    "type": "amazon-ebs", 
    "region": "us-west-2", 
    "source_ami": "ami-09f47d69", 
    "instance_type": "m4.large", 
    "ami_name": "Packer windows test", 
    "user_data_file": "./scripts/ec2bootstrap.ps1", 

    "communicator": "winrm", 
    "winrm_username": "Administrator" 
}], 

"provisioners": [ 
    { 
     "type": "powershell", 
     "scripts": [ 
      "./scripts/ec2config.ps1", 
      "./scripts/bundleconfig.ps1" 
     ] 
    }, 

    { 
     "type": "ansible", 
     "playbook_file": "../ansible/base_ami_site.yml", 
     "extra_arguments": [ 
      "--connection", "packer", 
      "--extra-vars", "ansible_shell_type=powershell ansible_shell_executable=None -vvvv"  
     ] 

}]} 

Ansibleサンプル

- name: Download 7-Zip Installer 
win_get_url: 
url: http://www.7-zip.org/a/7z1604-x64.msi 
dest: C:\Users\Administrator\Downloads\7-zip.msi 
force: no 

ただ、繰り返しに、それが接続されていますが、何も実行されません。

答えて

1

パッカーのバージョン1.0.3が正常に実行されなかったことが判明しました。

関連する問題