Got it !  The double hyphen trick is the way to go. 

Thanks !

---
CHRISTIAN TARDIF 
-------------------------

On 2016-09-27 04:47, Ingo Baab wrote:

> try: 
> 
> lxc exec mycontainer -- apt-get install -y puppet 
> 
> -Ingo 
> Am 27.09.2016 um 05:47 schrieb Christian Tardif: 
> 
>> Hi, 
>> 
>> I'm creating my lxd containers with ansible lxd_container module. Working 
>> great. But once created, I need to execute a command inside the container. 
>> Thought that I could simply type in my command as: 
>> 
>> lxc exec mycontainer apt-get install -y puppet 
>> 
>> You'll understand that this is a Ubuntu container, on which I need to 
>> install puppet automatically, without having to do anything, as this is from 
>> an ansible-playbook driven task.  I also tried to type my command manually, 
>> without any luck either. 
>> 
>> How can I set the -y parameter (in this case) so it is not interpreted by 
>> lxc exec command, but passed in the exec string to the container? Tried to 
>> surround with quotes, but it does not work. 
>> 
>> THanks, 
>> 
>> -------------------------
>> 
>> CHRISTIAN TARDIF 
>> 
>> _______________________________________________
>> lxc-users mailing list
>> [email protected]
>> http://lists.linuxcontainers.org/listinfo/lxc-users
> 
> _______________________________________________
> lxc-users mailing list
> [email protected]
> http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to