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

Ingo Baab ib at baab.de
Tue Sep 27 08:47:56 UTC 2016


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160927/edcca670/attachment.html>


More information about the lxc-users mailing list