{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/packer/issues/3647","repository_url":"https://api.github.com/repos/mitchellh/packer","labels_url":"https://api.github.com/repos/mitchellh/packer/issues/3647/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/packer/issues/3647/comments","events_url":"https://api.github.com/repos/mitchellh/packer/issues/3647/events","html_url":"https://github.com/mitchellh/packer/issues/3647","id":161924782,"number":3647,"title":"Ansible remote slow with packer","user":{"login":"teu","id":589133,"avatar_url":"https://avatars.githubusercontent.com/u/589133?v=3","gravatar_id":"","url":"https://api.github.com/users/teu","html_url":"https://github.com/teu","followers_url":"https://api.github.com/users/teu/followers","following_url":"https://api.github.com/users/teu/following{/other_user}","gists_url":"https://api.github.com/users/teu/gists{/gist_id}","starred_url":"https://api.github.com/users/teu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teu/subscriptions","organizations_url":"https://api.github.com/users/teu/orgs","repos_url":"https://api.github.com/users/teu/repos","events_url":"https://api.github.com/users/teu/events{/privacy}","received_events_url":"https://api.github.com/users/teu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitchellh/packer/labels/provisioner/ansible-remote","name":"provisioner/ansible-remote","color":"c7def8"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-23T13:37:20Z","updated_at":"2016-06-29T07:57:05Z","closed_at":null,"body":"Hi,\r\n\r\nexperiencing slow build times on packer 0.10, osx.\r\n\r\nThe playbook builds about twice as long with packer compared to a ansible-playbook invocation and getting this:\r\n```\r\namazon-ebs: rejecting auth-agent-req@openssh.com request\r\n```\r\nin the logs a lot.\r\n\r\nMy packer config https://gist.github.com/teu/5a845471cb3edbf5a0c799dd52049382\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/mitchellh/packer/issues/comments/229283848","html_url":"https://github.com/mitchellh/packer/issues/3647#issuecomment-229283848","issue_url":"https://api.github.com/repos/mitchellh/packer/issues/3647","id":229283848,"user":{"login":"teu","id":589133,"avatar_url":"https://avatars.githubusercontent.com/u/589133?v=3","gravatar_id":"","url":"https://api.github.com/users/teu","html_url":"https://github.com/teu","followers_url":"https://api.github.com/users/teu/followers","following_url":"https://api.github.com/users/teu/following{/other_user}","gists_url":"https://api.github.com/users/teu/gists{/gist_id}","starred_url":"https://api.github.com/users/teu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teu/subscriptions","organizations_url":"https://api.github.com/users/teu/orgs","repos_url":"https://api.github.com/users/teu/repos","events_url":"https://api.github.com/users/teu/events{/privacy}","received_events_url":"https://api.github.com/users/teu/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T07:57:05Z","updated_at":"2016-06-29T07:57:05Z","body":"Hi,\r\n\r\nmeasured the playbooks with different machine types:\r\n- t2.medium - forever\r\n- m3.medium - 35min\r\n- c4.large - 25min\r\n\r\nHowever could not test with packer as the playbooks fail (but they work with ansible-playbook). Getting errors that there are variables from group_vars missing. \r\n\r\nAny clue why my playbooks would fail with packer but work just fine with ansible?\r\n\r\n```yml\r\n{\r\n  \"variables\": {\r\n    \"ami_ordering_number\": \"008\"\r\n  },\r\n  \"builders\": [\r\n    {\r\n      \"type\": \"amazon-ebs\",\r\n      \"region\": \"us-west-1\",\r\n      \"source_ami\": \"ami-06116566\",\r\n      \"instance_type\": \"c4.large\",\r\n      \"ssh_username\": \"ubuntu\",\r\n      \"ami_name\": \"exportsbox-{{ user `ami_ordering_number` }}-{{timestamp}}\",\r\n      \"associate_public_ip_address\": false,\r\n      \"vpc_id\": \"vpc-e5b5ae87\",\r\n      \"subnet_id\": \"subnet-4e371808\",\r\n      \"ssh_private_ip\": true,\r\n      \"security_group_ids\": [\r\n        \"sg-a01af2c5\",\r\n        \"sg-833eb6e7\"\r\n      ]\r\n    }\r\n  ],\r\n  \"provisioners\": [\r\n    {\r\n      \"type\": \"shell\",\r\n      \"inline\": [\r\n        \"while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done\"\r\n      ]\r\n    },\r\n    {\r\n      \"type\": \"ansible\",\r\n      \"playbook_file\": \"./playbooks/exportsbox.yml\",\r\n      \"ansible_env_vars\": [\r\n        \"ANSIBLE_HOST_KEY_CHECKING=False\"\r\n      ],\r\n      \"extra_arguments\": [\r\n        \"--ask-vault-pass\",\r\n        \"-b\"\r\n      ],\r\n      \"groups\": [\r\n        \"base\",\r\n        \"exportsbox\",\r\n        \"amazon\",\r\n        \"debops_all_hosts\"\r\n      ]\r\n    }\r\n  ]\r\n}\r\n\r\n```\r\n\r\nPlaybook:\r\n```yml\r\n---\r\n- include: base.yml target=exportsbox\r\n- name: Configuration for uxpin SWF exports boxes\r\n  hosts: \"{{ target | default('exportsbox')}}\"\r\n  gather_facts: true\r\n  vars_files:\r\n    - \"../inventory/files/templates/exportsbox/credentials.yml\"\r\n```"}}
{"actor":{"display_login":"teu"}}