[lxc-users] LXD: flag provided but not defined

Tardif, Christian christian.tardif at servinfo.ca
Tue Sep 27 12:53:22 UTC 2016


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
>> lxc-users at lists.linuxcontainers.org
>> http://lists.linuxcontainers.org/listinfo/lxc-users
> 
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160927/e20c6116/attachment.html>


More information about the lxc-users mailing list