Hi Rickard,

The documentation for LXD Ansible provisioner 
<https://www.packer.io/docs/provisioners/ansible.html> seems to contradict 
what you are saying about communication to the container being provisioned:

"The ansible Packer provisioner runs Ansible playbooks. It dynamically 
creates an Ansible inventory file configured to use SSH, runs an SSH 
server, executes ansible-playbook, and marshals Ansible plays through the 
SSH server to the machine being provisioned by Packer. "

 
I tried using the LXD communicator, but was unable to work-out what to call 
the host in the ansible playbook.  

As I say there are no fully worked examples I can find.  My concern is that 
the LXD gets ignored by developers because there are few reliable 
tutorials, and the tutorials don't get written because there are no users.

On Saturday, January 6, 2018 at 6:27:36 PM UTC+11, Rickard von Essen wrote:
>
> Packer doesn't assume the LXD container is running with SSH and thus 
> doesn't know anything about a potential SSH setup. Packer uses the lxc 
> command to upload, download, and exec commands in the container. To get 
> that working with Ansible you have to use a special connection plugin, see 
> https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/connection/lxd.py
> .
>
> Also see 
> https://groups.google.com/d/msg/packer-tool/sJqMu8DgjZM/szjiWtXFBAAJ
>
> If that doesn't solve please provide your template and the output of 
> running: PACKER_LOG=1 packer build template.json
>
> On Saturday, January 6, 2018 at 4:22:18 AM UTC+1, Peter Goodall wrote:
>>
>> Thanks Rickard,
>>
>> "extra_arguments": ["-vvvvv"]
>>
>> --Peter G
>>
>> On Saturday, January 6, 2018 at 10:07:49 AM UTC+11, Rickard von Essen 
>> wrote:
>>>
>>> I think I have that somewhere, let me get back with it tomorrow.
>>>
>>> What's your extra_arguments to ansible? 
>>>
>>> On Jan 5, 2018 09:09, "Peter Goodall" <pjgo...@gmail.com> wrote:
>>>
>>>>  also... the lxd builder runs shell commands fine remotely on the guest.
>>>>
>>>> -- 
>>>> 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/2befac29-9098-4318-a03d-571664e502d9%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/packer-tool/2befac29-9098-4318-a03d-571664e502d9%40googlegroups.com?utm_medium=email&utm_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/dfbecf2c-fed6-4885-8e6d-d006e5314bd2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to