[packer] Re: packer ansible provisioner host_vars groups_vars

2018-04-05 Thread Matthieu
Hi Tony,

Unfortunately i do work for the company i was working for at the time of 
those messages and therefore don't have the json file

On Thursday, April 5, 2018 at 7:42:36 AM UTC-7, Tony wrote:
>
> Hi, could you please share your full json file. I have the same problem 
> and unable to resolv it :(
>
> среда, 25 января 2017 г., 1:39:44 UTC+2 пользователь Matthieu написал:
>>
>> Hello,
>>
>> I am having issues with packer and the remote ansible provisioner. Packer 
>> doesnt seems to take the variables in the different groups_vars and in 
>> host_vars. Here is  the layout of the all project:
>>
>> ansible
>>  |--Infrastructure.Analytics # submodule
>>|---groups_vars
>>   |-all
>>   |-db
>>|---host_vars
>>   
>> |-packer-postgresql
>>|---postgresql.yml
>> packer.json
>>
>>
>> the provisioner looks like this:
>>
>>   "type": "ansible",
>>   "extra_arguments": 
>> ["-b","--become-method=sudo","--vault-password-file=~/.vault_pass.txt"],
>>   "playbook_file": "ansible/Infrastructure.Analytics/postgresql.yml",
>>   "groups": 
>> ["all","db","postgresql","development","tag_Application_Service_PostgreSQL","packer-postgresql"],
>>   "host_alias": "packer-postgresql"
>> },
>>
>> How can i make packer use those variables?
>>
>> Cheers
>>
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/3b741fa6-79b5-4bea-b8d3-8264c91fcb66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [packer] Packer qemu with macvtap

2018-04-05 Thread tannerposada
Hey Alvaro,

A nice find! I didn't stumble across that while looking around for 
solutions, (I was probably too deep in my rabbit hole to notice). *That did 
end up working! *
I shall modify off this to get the setups I require. 
Thanks again for the help! 
Packer ought to consider updating the QEMU section to use this setup as it 
worked first try.

Regards,

Tanner

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/43549385-2d59-4e65-9b01-25bcb53eeddc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[packer] Re: packer ansible provisioner host_vars groups_vars

2018-04-05 Thread Tony
Hi, could you please share your full json file. I have the same problem and 
unable to resolv it :(

среда, 25 января 2017 г., 1:39:44 UTC+2 пользователь Matthieu написал:
>
> Hello,
>
> I am having issues with packer and the remote ansible provisioner. Packer 
> doesnt seems to take the variables in the different groups_vars and in 
> host_vars. Here is  the layout of the all project:
>
> ansible
>  |--Infrastructure.Analytics # submodule
>|---groups_vars
>   |-all
>   |-db
>|---host_vars
>   
> |-packer-postgresql
>|---postgresql.yml
> packer.json
>
>
> the provisioner looks like this:
>
>   "type": "ansible",
>   "extra_arguments": 
> ["-b","--become-method=sudo","--vault-password-file=~/.vault_pass.txt"],
>   "playbook_file": "ansible/Infrastructure.Analytics/postgresql.yml",
>   "groups": 
> ["all","db","postgresql","development","tag_Application_Service_PostgreSQL","packer-postgresql"],
>   "host_alias": "packer-postgresql"
> },
>
> How can i make packer use those variables?
>
> Cheers
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/aaf94f64-34af-4ee6-94f7-ff6a8e22e28d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [packer] user: could not determine current user from environment.?

2018-04-05 Thread test
Thank you for the prompt reply :)

On Wednesday, April 4, 2018 at 6:19:38 PM UTC-4, Matthew Hooker wrote:
>
> For some reason, Packer couldn't identify the user from the environment. 
> This may already be solved if you use a newer version of Packer, but 
> otherwise the solution is to add "user": "" to the ansible 
> provisioner, where  is the ansible_user you want to use. We don't 
> recommend running packer as root.
>
> Thanks,
> --Matt Hooker
>
> On Wed, Apr 4, 2018 at 3:09 PM test  
> wrote:
>
>> hi , i am trying to a gitlab-ci build using docker container
>>
>>  ubuntu:latest 
>>
>> i have installed packer and when i try to execute packer build command i 
>> am getting an error. please help me solve this error.
>>
>> My image.json file
>>
>> {
>>   "variables": {
>>   },
>>   "builders": [{
>> "type": "amazon-ebs",
>> "instance_type": "t2.large",
>> "region": "us-east-1",
>> "source_ami": "ami-d15a75c7",
>> "security_group_id": "x",
>> "subnet_id": "x",
>> "ami_name": "gitlab-runner-as_ubuntu_docker_{{timestamp}}",
>> "ssh_username": "ubuntu",
>> "ssh_pty": true,
>> "ssh_private_ip": true,
>> "associate_public_ip_address": false,
>> "shutdown_behavior": "stop",
>> "ena_support": true
>>   }],
>>   "provisioners": [
>> {
>>   "type": "shell",
>>   "inline": [
>> "sudo apt-get -y update",
>> "sudo apt-get install -y python-simplejson",
>> "sudo apt-get install -y python-requests",
>> "sudo apt-get install -y python-requests",
>> "sudo apt-get install python-pip -y"
>> ]
>>  },
>>  {
>>   "type": "ansible",
>>   "playbook_file": 
>> "/builds/infra/packer-role-gitlab-runner-autoscaling/playbook.yml",
>>   "ansible_env_vars": [
>> "ANSIBLE_HOST_KEY_CHECKING=False",
>> "ANSIBLE_REMOTE_TMP=/tmp/ansible",
>> "ANSIBLE_ASK_SUDO_PASS=False",
>> "ANSIBLE_REMOTE_USER=ubuntu",
>> "ANSIBLE_USER_PYTHON=/usr/bin/python3",
>> "PYTHONPATH=/usr/local/bin/python2.7/site-packages",
>> "REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt"
>>   ]
>> },
>>  {
>>   "type": "shell",
>>   "script": 
>> "/builds/infra/packer-role-gitlab-runner-autoscaling/script.sh"
>>  }
>>   ]
>> }
>>
>>
>>
>> $ packer -version
>> 1.1.2
>> $ whoami
>> root
>> $ packer_log=1 packer build image.json
>> amazon-ebs output will be in this color.
>>
>> 1 error(s) occurred:
>>
>> * user: could not determine current user from environment.
>> ERROR: Job failed: exit code 1
>>
>> -- 
>> This mailing list is governed under the HashiCorp Community Guidelines - 
>> https://www.hashicorp.com/community-guidelines.html. Behavior in 
>> violation of those guidelines may result in your removal from this mailing 
>> list.
>>  
>> GitHub Issues: https://github.com/mitchellh/packer/issues
>> IRC: #packer-tool on Freenode
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to packer-tool...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/c8a99ded-231d-4ba6-8170-f7e7e3f19764%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/202d1f6f-0969-4f0c-90d6-7616c6ebcfec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.