Re: [packer] Jenkins and Packer

2019-08-21 Thread Rickard von Essen
It seems like you have an old version of Packer. Remove it and install a
new version. Also add packer version to the top of your script.

On Wed, Aug 21, 2019, 23:03 Pietto Vasco  wrote:

> I have a strange issue where i can run packer from the cmdline without
> issue.
>
> But when i setup a jenkins to job schedule the build it fails to build. I
> tried with the packer plugin and without
>
> Running as SYSTEM
>
> Building in workspace C:\Program Files (x86)\Jenkins\workspace\packer build 2
>
> [packer build 2] $ cmd /c call C:\Windows\TEMP\jenkins5282781951821865303.bat
>
>
>
> C:\Program Files (x86)\Jenkins\workspace\packer build 2>packer build 
> C:\Users\Administrator\Documents\vaec-amiauto\vaec-encryptedcrispami.json
>
> Failed to initialize build 'amazon-ebs': provisioner type not found: 
> windows-update
>
> amazon-ebs output will be in this color.
>
>
>
>
>
> ==> Builds finished but no artifacts were created.
>
>
>
> C:\Program Files (x86)\Jenkins\workspace\packer build 2>exit 0
>
> Finished: SUCCESS
>
>
> Attached is my packer plugin config
>
>
>
>
>
> --
> 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/78116bd3-e3f6-4277-adf6-e91f527a7ff1%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/78116bd3-e3f6-4277-adf6-e91f527a7ff1%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CALz9Rt-0n1WBKEnmZtvg%2BfOKGp_%2BqygKZcrn2vULnHyGSdd1uA%40mail.gmail.com.


[packer] Jenkins and Packer

2019-08-21 Thread Pietto Vasco
I have a strange issue where i can run packer from the cmdline without 
issue. 

But when i setup a jenkins to job schedule the build it fails to build. I 
tried with the packer plugin and without

Running as SYSTEM

Building in workspace C:\Program Files (x86)\Jenkins\workspace\packer build 2

[packer build 2] $ cmd /c call C:\Windows\TEMP\jenkins5282781951821865303.bat

 

C:\Program Files (x86)\Jenkins\workspace\packer build 2>packer build 
C:\Users\Administrator\Documents\vaec-amiauto\vaec-encryptedcrispami.json 

Failed to initialize build 'amazon-ebs': provisioner type not found: 
windows-update

amazon-ebs output will be in this color.

 

 

==> Builds finished but no artifacts were created.

 

C:\Program Files (x86)\Jenkins\workspace\packer build 2>exit 0 

Finished: SUCCESS


Attached is my packer plugin config





-- 
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/78116bd3-e3f6-4277-adf6-e91f527a7ff1%40googlegroups.com.


Re: [packer] jenkins invokes packer and packer calls ansible provisioner

2017-09-29 Thread Alvaro Miranda Aguilera
the jenkings user need to have:

/home/ec2-user/ansible/bin

in the path.

you can do that adding

export PATH=$PATH:/home/ec2-user/ansible/bin

to the end of .bashrc of the jenkins user and test



On Thu, Sep 28, 2017 at 10:15 PM, Gaurav Rastogi <gau...@flux7.com> wrote:

> Jenkins as a service runs under jenkins user. I changed its profile to be
> able to run bash. and had added the path for ansible , it runs successfully
> and creates an image. But the job from the jenkins portal fails still. It
> doesn't seem to be a packer issue at this point. This discussion can be
> closed if need be.
>
> On Thursday, September 28, 2017 at 3:31:42 PM UTC-4, Megan Marsh wrote:
>>
>> I didn't try to run with jenkins, just ran your packer config.  The
>> playbook file ran just fine; so the issue isn't at all to do with your ec2
>> instance.  It's with your local setup, be that the jenkins plugin itself,
>> or, I think more likely, the fact that the jenkins user doesn't have
>> ansible in its path.  Add ansible to your jenkins user's path and you
>> should be fine.
>>
>> On Thu, Sep 28, 2017 at 12:30 PM, Gaurav Rastogi <gau...@flux7.com>
>> wrote:
>>
>>> Thanks for your response. I ran the command and result is below:
>>>
>>> /home/ec2-user/ansible/test/runner/injector/ansible-playbook
>>> /home/ec2-user/ansible/bin/ansible-playbook
>>>
>>> I actually ran packer independently as well:
>>>
>>> /usr/local/packer/packer build packer.json
>>>
>>> It did run but I ran this job as the ec2-user so I may be shooting in
>>> the dark here but this could mean that the user that runs jenkins and the
>>> packer job doesn't have ansible in the path, which is what I'm trying to
>>> solve here.
>>>
>>> thanks for your response and interest in helping me!
>>>
>>>
>>> On Thursday, September 28, 2017 at 3:18:40 PM UTC-4, Alvaro Miranda
>>> Aguilera wrote:
>>>>
>>>> log in and try
>>>>
>>>> find / -name 'ansible-playbook'
>>>>
>>>> make sure that path is in the PATH of the user that run packer
>>>>
>>>> if ansible-playbook is on /sbin or /usr/sbin or /opt/bin may not be
>>>> available to any user
>>>>
>>>>
>>>>
>>>> On Thu, Sep 28, 2017 at 9:05 PM, Gaurav Rastogi <gau...@flux7.com>
>>>> wrote:
>>>>
>>>>> ummm define properly :)
>>>>> Good question though. Installing ansible on an amazon ec2 instance is
>>>>> a pain in itself. So for the ec2-user, i can call out ansible with out any
>>>>> issues. I did have to jump through loops to get it installed. I'm thinking
>>>>> that whatever user packer runs as isn't able to find ansible. I want to
>>>>> figure out which user that is and then somehow export PATH for that user 
>>>>> to
>>>>> make this successful.
>>>>>
>>>>> When you say this worked for you, you have an ec2 machine with
>>>>> jenkins, packer and ansible installed and using jenkins job it was able to
>>>>> run with out failing?
>>>>>
>>>>> it may not be fruitful but I i'm going to try running packer directly
>>>>> to observe the result.
>>>>>
>>>>> Thanks for responding, hope you have some more inputs for me.
>>>>>
>>>>> On Thursday, September 28, 2017 at 2:53:59 PM UTC-4, Megan Marsh wrote:
>>>>>>
>>>>>> This works for me... do you have ansible installed properly on the
>>>>>> machine that's running packer?
>>>>>>
>>>>>> On Thu, Sep 28, 2017 at 10:38 AM, Gaurav Rastogi <grast...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm running an ec2 instance on aws. On this instance, I have
>>>>>>> jenkins, ansible and packer. I've created a jenkins job which uses the
>>>>>>> packer plugin and runs the packer.json file locally. When I run the job 
>>>>>>> it
>>>>>>> fails with below output from jenkins console:
>>>>>>>
>>>>>>> Started by user admin <http://18.221.183.50/user/admin>
>>>>>>> Building in workspace /var/lib/jenkins/workspace/packer
>>>>>>> [packer] $ /usr/local/packer/packer build -debug 
>>>>>>> /var/l

Re: [packer] jenkins invokes packer and packer calls ansible provisioner

2017-09-28 Thread Gaurav Rastogi
Jenkins as a service runs under jenkins user. I changed its profile to be 
able to run bash. and had added the path for ansible , it runs successfully 
and creates an image. But the job from the jenkins portal fails still. It 
doesn't seem to be a packer issue at this point. This discussion can be 
closed if need be.  

On Thursday, September 28, 2017 at 3:31:42 PM UTC-4, Megan Marsh wrote:
>
> I didn't try to run with jenkins, just ran your packer config.  The 
> playbook file ran just fine; so the issue isn't at all to do with your ec2 
> instance.  It's with your local setup, be that the jenkins plugin itself, 
> or, I think more likely, the fact that the jenkins user doesn't have 
> ansible in its path.  Add ansible to your jenkins user's path and you 
> should be fine.
>
> On Thu, Sep 28, 2017 at 12:30 PM, Gaurav Rastogi <gau...@flux7.com 
> > wrote:
>
>> Thanks for your response. I ran the command and result is below:
>>
>> /home/ec2-user/ansible/test/runner/injector/ansible-playbook
>> /home/ec2-user/ansible/bin/ansible-playbook
>>
>> I actually ran packer independently as well:
>>
>> /usr/local/packer/packer build packer.json
>>
>> It did run but I ran this job as the ec2-user so I may be shooting in the 
>> dark here but this could mean that the user that runs jenkins and the 
>> packer job doesn't have ansible in the path, which is what I'm trying to 
>> solve here. 
>>
>> thanks for your response and interest in helping me!   
>>
>>
>> On Thursday, September 28, 2017 at 3:18:40 PM UTC-4, Alvaro Miranda 
>> Aguilera wrote:
>>>
>>> log in and try
>>>
>>> find / -name 'ansible-playbook'
>>>
>>> make sure that path is in the PATH of the user that run packer
>>>
>>> if ansible-playbook is on /sbin or /usr/sbin or /opt/bin may not be 
>>> available to any user
>>>
>>>
>>>
>>> On Thu, Sep 28, 2017 at 9:05 PM, Gaurav Rastogi <gau...@flux7.com> 
>>> wrote:
>>>
>>>> ummm define properly :) 
>>>> Good question though. Installing ansible on an amazon ec2 instance is a 
>>>> pain in itself. So for the ec2-user, i can call out ansible with out any 
>>>> issues. I did have to jump through loops to get it installed. I'm thinking 
>>>> that whatever user packer runs as isn't able to find ansible. I want to 
>>>> figure out which user that is and then somehow export PATH for that user 
>>>> to 
>>>> make this successful. 
>>>>
>>>> When you say this worked for you, you have an ec2 machine with jenkins, 
>>>> packer and ansible installed and using jenkins job it was able to run with 
>>>> out failing?
>>>>
>>>> it may not be fruitful but I i'm going to try running packer directly 
>>>> to observe the result. 
>>>>
>>>> Thanks for responding, hope you have some more inputs for me. 
>>>>
>>>> On Thursday, September 28, 2017 at 2:53:59 PM UTC-4, Megan Marsh wrote:
>>>>>
>>>>> This works for me... do you have ansible installed properly on the 
>>>>> machine that's running packer?
>>>>>
>>>>> On Thu, Sep 28, 2017 at 10:38 AM, Gaurav Rastogi <grast...@gmail.com> 
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm running an ec2 instance on aws. On this instance, I have jenkins, 
>>>>>> ansible and packer. I've created a jenkins job which uses the packer 
>>>>>> plugin 
>>>>>> and runs the packer.json file locally. When I run the job it fails with 
>>>>>> below output from jenkins console:
>>>>>>
>>>>>> Started by user admin <http://18.221.183.50/user/admin>
>>>>>> Building in workspace /var/lib/jenkins/workspace/packer
>>>>>> [packer] $ /usr/local/packer/packer build -debug 
>>>>>> /var/lib/jenkins/workspace/getrepopacker/packer.json
>>>>>> Debug mode enabled. Builds will not be parallelized.
>>>>>>  [1;32mamazon-ebs output will be in this color. [0m
>>>>>>
>>>>>> 1 error(s) occurred:
>>>>>>
>>>>>> * Error running "ansible-playbook --version": exec: "ansible-playbook": 
>>>>>> executable file not found in $PATH
>>>>>> Finished: FAILURE
>>>>>> Build step 'Packer' marked build as failure
>>>>&g

Re: [packer] jenkins invokes packer and packer calls ansible provisioner

2017-09-28 Thread Megan Marsh
I didn't try to run with jenkins, just ran your packer config.  The
playbook file ran just fine; so the issue isn't at all to do with your ec2
instance.  It's with your local setup, be that the jenkins plugin itself,
or, I think more likely, the fact that the jenkins user doesn't have
ansible in its path.  Add ansible to your jenkins user's path and you
should be fine.

On Thu, Sep 28, 2017 at 12:30 PM, Gaurav Rastogi <gau...@flux7.com> wrote:

> Thanks for your response. I ran the command and result is below:
>
> /home/ec2-user/ansible/test/runner/injector/ansible-playbook
> /home/ec2-user/ansible/bin/ansible-playbook
>
> I actually ran packer independently as well:
>
> /usr/local/packer/packer build packer.json
>
> It did run but I ran this job as the ec2-user so I may be shooting in the
> dark here but this could mean that the user that runs jenkins and the
> packer job doesn't have ansible in the path, which is what I'm trying to
> solve here.
>
> thanks for your response and interest in helping me!
>
>
> On Thursday, September 28, 2017 at 3:18:40 PM UTC-4, Alvaro Miranda
> Aguilera wrote:
>>
>> log in and try
>>
>> find / -name 'ansible-playbook'
>>
>> make sure that path is in the PATH of the user that run packer
>>
>> if ansible-playbook is on /sbin or /usr/sbin or /opt/bin may not be
>> available to any user
>>
>>
>>
>> On Thu, Sep 28, 2017 at 9:05 PM, Gaurav Rastogi <gau...@flux7.com> wrote:
>>
>>> ummm define properly :)
>>> Good question though. Installing ansible on an amazon ec2 instance is a
>>> pain in itself. So for the ec2-user, i can call out ansible with out any
>>> issues. I did have to jump through loops to get it installed. I'm thinking
>>> that whatever user packer runs as isn't able to find ansible. I want to
>>> figure out which user that is and then somehow export PATH for that user to
>>> make this successful.
>>>
>>> When you say this worked for you, you have an ec2 machine with jenkins,
>>> packer and ansible installed and using jenkins job it was able to run with
>>> out failing?
>>>
>>> it may not be fruitful but I i'm going to try running packer directly to
>>> observe the result.
>>>
>>> Thanks for responding, hope you have some more inputs for me.
>>>
>>> On Thursday, September 28, 2017 at 2:53:59 PM UTC-4, Megan Marsh wrote:
>>>>
>>>> This works for me... do you have ansible installed properly on the
>>>> machine that's running packer?
>>>>
>>>> On Thu, Sep 28, 2017 at 10:38 AM, Gaurav Rastogi <grast...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I'm running an ec2 instance on aws. On this instance, I have jenkins,
>>>>> ansible and packer. I've created a jenkins job which uses the packer 
>>>>> plugin
>>>>> and runs the packer.json file locally. When I run the job it fails with
>>>>> below output from jenkins console:
>>>>>
>>>>> Started by user admin <http://18.221.183.50/user/admin>
>>>>> Building in workspace /var/lib/jenkins/workspace/packer
>>>>> [packer] $ /usr/local/packer/packer build -debug 
>>>>> /var/lib/jenkins/workspace/getrepopacker/packer.json
>>>>> Debug mode enabled. Builds will not be parallelized.
>>>>>  [1;32mamazon-ebs output will be in this color. [0m
>>>>>
>>>>> 1 error(s) occurred:
>>>>>
>>>>> * Error running "ansible-playbook --version": exec: "ansible-playbook": 
>>>>> executable file not found in $PATH
>>>>> Finished: FAILURE
>>>>> Build step 'Packer' marked build as failure
>>>>> Finished: FAILURE
>>>>>
>>>>>
>>>>>
>>>>> Any clues on how to solve this?
>>>>>
>>>>>
>>>>> Thanks
>>>>>
>>>>> --
>>>>> 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
>>&

Re: [packer] jenkins invokes packer and packer calls ansible provisioner

2017-09-28 Thread Gaurav Rastogi
Thanks for your response. I ran the command and result is below:

/home/ec2-user/ansible/test/runner/injector/ansible-playbook
/home/ec2-user/ansible/bin/ansible-playbook

I actually ran packer independently as well:

/usr/local/packer/packer build packer.json

It did run but I ran this job as the ec2-user so I may be shooting in the 
dark here but this could mean that the user that runs jenkins and the 
packer job doesn't have ansible in the path, which is what I'm trying to 
solve here. 

thanks for your response and interest in helping me!   


On Thursday, September 28, 2017 at 3:18:40 PM UTC-4, Alvaro Miranda 
Aguilera wrote:
>
> log in and try
>
> find / -name 'ansible-playbook'
>
> make sure that path is in the PATH of the user that run packer
>
> if ansible-playbook is on /sbin or /usr/sbin or /opt/bin may not be 
> available to any user
>
>
>
> On Thu, Sep 28, 2017 at 9:05 PM, Gaurav Rastogi <gau...@flux7.com 
> > wrote:
>
>> ummm define properly :) 
>> Good question though. Installing ansible on an amazon ec2 instance is a 
>> pain in itself. So for the ec2-user, i can call out ansible with out any 
>> issues. I did have to jump through loops to get it installed. I'm thinking 
>> that whatever user packer runs as isn't able to find ansible. I want to 
>> figure out which user that is and then somehow export PATH for that user to 
>> make this successful. 
>>
>> When you say this worked for you, you have an ec2 machine with jenkins, 
>> packer and ansible installed and using jenkins job it was able to run with 
>> out failing?
>>
>> it may not be fruitful but I i'm going to try running packer directly to 
>> observe the result. 
>>
>> Thanks for responding, hope you have some more inputs for me. 
>>
>> On Thursday, September 28, 2017 at 2:53:59 PM UTC-4, Megan Marsh wrote:
>>>
>>> This works for me... do you have ansible installed properly on the 
>>> machine that's running packer?
>>>
>>> On Thu, Sep 28, 2017 at 10:38 AM, Gaurav Rastogi <grast...@gmail.com> 
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm running an ec2 instance on aws. On this instance, I have jenkins, 
>>>> ansible and packer. I've created a jenkins job which uses the packer 
>>>> plugin 
>>>> and runs the packer.json file locally. When I run the job it fails with 
>>>> below output from jenkins console:
>>>>
>>>> Started by user admin <http://18.221.183.50/user/admin>
>>>> Building in workspace /var/lib/jenkins/workspace/packer
>>>> [packer] $ /usr/local/packer/packer build -debug 
>>>> /var/lib/jenkins/workspace/getrepopacker/packer.json
>>>> Debug mode enabled. Builds will not be parallelized.
>>>>  [1;32mamazon-ebs output will be in this color. [0m
>>>>
>>>> 1 error(s) occurred:
>>>>
>>>> * Error running "ansible-playbook --version": exec: "ansible-playbook": 
>>>> executable file not found in $PATH
>>>> Finished: FAILURE
>>>> Build step 'Packer' marked build as failure
>>>> Finished: FAILURE
>>>>
>>>>
>>>>
>>>> Any clues on how to solve this?
>>>>
>>>>
>>>> Thanks
>>>>
>>>> -- 
>>>> 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/ea29fc9e-71f0-4840-a1c2-88796f04af61%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/packer-tool/ea29fc9e-71f0-4840-a1c2-88796f04af61%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>
>>
>> Confidentiality Note: This e-mail and any attachments are confidential 
>> and may be pro

Re: [packer] jenkins invokes packer and packer calls ansible provisioner

2017-09-28 Thread Alvaro Miranda Aguilera
log in and try

find / -name 'ansible-playbook'

make sure that path is in the PATH of the user that run packer

if ansible-playbook is on /sbin or /usr/sbin or /opt/bin may not be
available to any user



On Thu, Sep 28, 2017 at 9:05 PM, Gaurav Rastogi <gau...@flux7.com> wrote:

> ummm define properly :)
> Good question though. Installing ansible on an amazon ec2 instance is a
> pain in itself. So for the ec2-user, i can call out ansible with out any
> issues. I did have to jump through loops to get it installed. I'm thinking
> that whatever user packer runs as isn't able to find ansible. I want to
> figure out which user that is and then somehow export PATH for that user to
> make this successful.
>
> When you say this worked for you, you have an ec2 machine with jenkins,
> packer and ansible installed and using jenkins job it was able to run with
> out failing?
>
> it may not be fruitful but I i'm going to try running packer directly to
> observe the result.
>
> Thanks for responding, hope you have some more inputs for me.
>
> On Thursday, September 28, 2017 at 2:53:59 PM UTC-4, Megan Marsh wrote:
>>
>> This works for me... do you have ansible installed properly on the
>> machine that's running packer?
>>
>> On Thu, Sep 28, 2017 at 10:38 AM, Gaurav Rastogi <grast...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I'm running an ec2 instance on aws. On this instance, I have jenkins,
>>> ansible and packer. I've created a jenkins job which uses the packer plugin
>>> and runs the packer.json file locally. When I run the job it fails with
>>> below output from jenkins console:
>>>
>>> Started by user admin <http://18.221.183.50/user/admin>
>>> Building in workspace /var/lib/jenkins/workspace/packer
>>> [packer] $ /usr/local/packer/packer build -debug 
>>> /var/lib/jenkins/workspace/getrepopacker/packer.json
>>> Debug mode enabled. Builds will not be parallelized.
>>>  [1;32mamazon-ebs output will be in this color. [0m
>>>
>>> 1 error(s) occurred:
>>>
>>> * Error running "ansible-playbook --version": exec: "ansible-playbook": 
>>> executable file not found in $PATH
>>> Finished: FAILURE
>>> Build step 'Packer' marked build as failure
>>> Finished: FAILURE
>>>
>>>
>>>
>>> Any clues on how to solve this?
>>>
>>>
>>> Thanks
>>>
>>> --
>>> 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/ms
>>> gid/packer-tool/ea29fc9e-71f0-4840-a1c2-88796f04af61%40googlegroups.com
>>> <https://groups.google.com/d/msgid/packer-tool/ea29fc9e-71f0-4840-a1c2-88796f04af61%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>
>
> Confidentiality Note: This e-mail and any attachments are confidential
> and may be protected by legal privilege. If you are not the intended
> recipient, be aware that any disclosure, copying, distribution or use of
> this e-mail or any attachment is prohibited. If you have received this
> e-mail in error, please notify us immediately by returning it to the sender
> and delete this copy from your system. Thank you for your cooperation.
>
> --
> 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/0896f392-8e4b-4ac7-85ac-95

Re: [packer] jenkins invokes packer and packer calls ansible provisioner

2017-09-28 Thread Gaurav Rastogi
ummm define properly :) 
Good question though. Installing ansible on an amazon ec2 instance is a 
pain in itself. So for the ec2-user, i can call out ansible with out any 
issues. I did have to jump through loops to get it installed. I'm thinking 
that whatever user packer runs as isn't able to find ansible. I want to 
figure out which user that is and then somehow export PATH for that user to 
make this successful. 

When you say this worked for you, you have an ec2 machine with jenkins, 
packer and ansible installed and using jenkins job it was able to run with 
out failing?

it may not be fruitful but I i'm going to try running packer directly to 
observe the result. 

Thanks for responding, hope you have some more inputs for me. 

On Thursday, September 28, 2017 at 2:53:59 PM UTC-4, Megan Marsh wrote:
>
> This works for me... do you have ansible installed properly on the machine 
> that's running packer?
>
> On Thu, Sep 28, 2017 at 10:38 AM, Gaurav Rastogi <grast...@gmail.com 
> > wrote:
>
>> Hi,
>>
>> I'm running an ec2 instance on aws. On this instance, I have jenkins, 
>> ansible and packer. I've created a jenkins job which uses the packer plugin 
>> and runs the packer.json file locally. When I run the job it fails with 
>> below output from jenkins console:
>>
>> Started by user admin <http://18.221.183.50/user/admin>
>> Building in workspace /var/lib/jenkins/workspace/packer
>> [packer] $ /usr/local/packer/packer build -debug 
>> /var/lib/jenkins/workspace/getrepopacker/packer.json
>> Debug mode enabled. Builds will not be parallelized.
>>  [1;32mamazon-ebs output will be in this color. [0m
>>
>> 1 error(s) occurred:
>>
>> * Error running "ansible-playbook --version": exec: "ansible-playbook": 
>> executable file not found in $PATH
>> Finished: FAILURE
>> Build step 'Packer' marked build as failure
>> Finished: FAILURE
>>
>>
>>
>> Any clues on how to solve this?
>>
>>
>> Thanks
>>
>> -- 
>> 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/ea29fc9e-71f0-4840-a1c2-88796f04af61%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/packer-tool/ea29fc9e-71f0-4840-a1c2-88796f04af61%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
-- 


Confidentiality Note: This e-mail and any attachments are confidential and 
may be protected by legal privilege. If you are not the intended recipient, 
be aware that any disclosure, copying, distribution or use of this e-mail 
or any attachment is prohibited. If you have received this e-mail in error, 
please notify us immediately by returning it to the sender and delete this 
copy from your system. Thank you for your cooperation. 

-- 
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/0896f392-8e4b-4ac7-85ac-95c2c25b8b9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [packer] jenkins invokes packer and packer calls ansible provisioner

2017-09-28 Thread Megan Marsh
This works for me... do you have ansible installed properly on the machine
that's running packer?

On Thu, Sep 28, 2017 at 10:38 AM, Gaurav Rastogi <grastog...@gmail.com>
wrote:

> Hi,
>
> I'm running an ec2 instance on aws. On this instance, I have jenkins,
> ansible and packer. I've created a jenkins job which uses the packer plugin
> and runs the packer.json file locally. When I run the job it fails with
> below output from jenkins console:
>
> Started by user admin <http://18.221.183.50/user/admin>
> Building in workspace /var/lib/jenkins/workspace/packer
> [packer] $ /usr/local/packer/packer build -debug 
> /var/lib/jenkins/workspace/getrepopacker/packer.json
> Debug mode enabled. Builds will not be parallelized.
>  [1;32mamazon-ebs output will be in this color. [0m
>
> 1 error(s) occurred:
>
> * Error running "ansible-playbook --version": exec: "ansible-playbook": 
> executable file not found in $PATH
> Finished: FAILURE
> Build step 'Packer' marked build as failure
> Finished: FAILURE
>
>
>
> Any clues on how to solve this?
>
>
> Thanks
>
> --
> 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/ea29fc9e-71f0-4840-a1c2-88796f04af61%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/ea29fc9e-71f0-4840-a1c2-88796f04af61%40googlegroups.com?utm_medium=email_source=footer>
> .
> 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/CAGPV1uqhfgwDYi52iDgV_4%2BRo8cb1GpNpMhVvMQXhix-LRdxbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[packer] jenkins invokes packer and packer calls ansible provisioner

2017-09-28 Thread Gaurav Rastogi
Hi,

I'm running an ec2 instance on aws. On this instance, I have jenkins, 
ansible and packer. I've created a jenkins job which uses the packer plugin 
and runs the packer.json file locally. When I run the job it fails with 
below output from jenkins console:

Started by user admin <http://18.221.183.50/user/admin>
Building in workspace /var/lib/jenkins/workspace/packer
[packer] $ /usr/local/packer/packer build -debug 
/var/lib/jenkins/workspace/getrepopacker/packer.json
Debug mode enabled. Builds will not be parallelized.
 [1;32mamazon-ebs output will be in this color. [0m

1 error(s) occurred:

* Error running "ansible-playbook --version": exec: "ansible-playbook": 
executable file not found in $PATH
Finished: FAILURE
Build step 'Packer' marked build as failure
Finished: FAILURE



Any clues on how to solve this?


Thanks

-- 
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/ea29fc9e-71f0-4840-a1c2-88796f04af61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


packer.json
Description: application/json