{"action":"closed","issue":{"url":"https://api.github.com/repos/hashicorp/packer/issues/6400","repository_url":"https://api.github.com/repos/hashicorp/packer","labels_url":"https://api.github.com/repos/hashicorp/packer/issues/6400/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/packer/issues/6400/comments","events_url":"https://api.github.com/repos/hashicorp/packer/issues/6400/events","html_url":"https://github.com/hashicorp/packer/issues/6400","id":333542735,"node_id":"MDU6SXNzdWUzMzM1NDI3MzU=","number":6400,"title":"ansible provisioner - error on default \"--extra-vars\" ","user":{"login":"MouBoul","id":40381780,"node_id":"MDQ6VXNlcjQwMzgxNzgw","avatar_url":"https://avatars1.githubusercontent.com/u/40381780?v=4","gravatar_id":"","url":"https://api.github.com/users/MouBoul","html_url":"https://github.com/MouBoul","followers_url":"https://api.github.com/users/MouBoul/followers","following_url":"https://api.github.com/users/MouBoul/following{/other_user}","gists_url":"https://api.github.com/users/MouBoul/gists{/gist_id}","starred_url":"https://api.github.com/users/MouBoul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MouBoul/subscriptions","organizations_url":"https://api.github.com/users/MouBoul/orgs","repos_url":"https://api.github.com/users/MouBoul/repos","events_url":"https://api.github.com/users/MouBoul/events{/privacy}","received_events_url":"https://api.github.com/users/MouBoul/received_events","type":"User","site_admin":false},"labels":[{"id":337720756,"node_id":"MDU6TGFiZWwzMzc3MjA3NTY=","url":"https://api.github.com/repos/hashicorp/packer/labels/provisioner/ansible-remote","name":"provisioner/ansible-remote","color":"c7def8","default":false},{"id":54192815,"node_id":"MDU6TGFiZWw1NDE5MjgxNQ==","url":"https://api.github.com/repos/hashicorp/packer/labels/waiting-reply","name":"waiting-reply","color":"5319e7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-19T07:02:00Z","updated_at":"2018-07-11T14:51:42Z","closed_at":"2018-07-11T14:51:41Z","author_association":"NONE","body":"We are using packer to build images on AWS and want to implement the ansible provisioner (not the ansible-local).\r\nUnfortunately we get an error when using this \r\n`amazon-ebs: ERROR! the playbook: packer_builder_type=amazon-ebs could not be found`\r\n\r\nThis is due to the default extra-vars packer is adding to the ansible run\r\n\r\n`ansible-run --extra-vars packer_build_name=amazon-ebs packer_builder_type=amazon-ebs -i /var/folders/hc/5s01h6mj0hgds8wqb9qjvfmc1hq406/T/packer-provisioner-ansible447311094`\r\n\r\nWe are using the following config:\r\n\r\n```\"provisioners\" :[\r\n    {\r\n      \"type\": \"ansible\",\r\n      \"playbook_file\": \"../ansible/playbooks/node_exporter.yml\",\r\n      \"command\": \"ansible-run\",\r\n      \"skip_version_check\": true,\r\n      \"extra_arguments\": [\r\n        \"-A\", \"../ansible/\", \r\n        \"-I\", \r\n        \"-N\"\r\n      ]\r\n    }\r\n```\r\n\r\nI think this is related to the issue #5885\r\n\r\nThe command that packer runs is as follows:\r\n\r\n```\r\namazon-ebs: [run]   COMMAND:  ansible-playbook  --extra-vars [...] --extra-vars 'packer_build_name=amazon-ebs' 'packer_builder_type=amazon-ebs' -i '/var/folders/hc/5s01h6mj0hgds8wqb9qjvfmc1hq406/T/packer-provisioner-ansible447311094 [...]'\r\n```\r\n\r\nPacker version:\r\n`Packer v1.2.4`"}}
{"actor":{"display_login":"rickard-von-essen"}}