<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>try:</p>
<p>lxc exec mycontainer -- apt-get install -y puppet</p>
<p>-Ingo<br>
</p>
<br>
<div class="moz-cite-prefix">Am 27.09.2016 um 05:47 schrieb
Christian Tardif:<br>
</div>
<blockquote
cite="mid:em561003d9-9ebe-46d9-9872-9f3853021088@tardich052015"
type="cite">
<style>blockquote.cite
{margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right: 0px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);}
blockquote.cite2
{margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right: 0px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); margin-top: 3px; padding-top: 0px;}
a img
{border: 0px;}
body
{font-family: 'Segoe UI'; font-size: 12pt;}
</style>
<div>Hi,</div>
<div><br>
</div>
<div>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:</div>
<div><br>
</div>
<div>lxc exec mycontainer apt-get install -y puppet</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>THanks,</div>
<div id="signature_old">
<div style="font-family: Tahoma; font-size: 12 pt;">
<hr>
<p><strong>Christian Tardif</strong></p>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
lxc-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a>
<a class="moz-txt-link-freetext" href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a></pre>
</blockquote>
<br>
</body>
</html>