<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Ah, thanks Blake for the documentation pointer.<div class=""><br class=""></div><div class="">Cheers,</div><div class="">Jim</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 8, 2017, at 8:44 AM, Blake Rouse <<a href="mailto:blake.rouse@canonical.com" class="">blake.rouse@canonical.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Jim,<div class=""><br class=""></div><div class="">At the moment the best documentation we have for this is here:</div><div class=""><br class=""></div><div class=""><a href="https://maas.ubuntu.com/docs/configure.html#altering-the-preseed-file" class="">https://maas.ubuntu.com/docs/configure.html#altering-the-preseed-file</a><br class=""></div><div class=""><br class=""></div><div class="">We are working on improving the documentation for MAAS, but we have not add that section yet as we are working through it. The updated documentation is located here: <a href="https://docs.ubuntu.com/maas/2.1/en/" class="">https://docs.ubuntu.com/maas/2.1/en/</a> but does not document the preseed possibilities.</div><div class=""><br class=""></div><div class="">There is a bug filed about this: <a href="https://bugs.launchpad.net/maas/+bug/1334426" class="">https://bugs.launchpad.net/maas/+bug/1334426</a> and I will raise it with our documentation team to get it improved.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Blake</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Feb 8, 2017 at 11:17 AM, Jim Tilander <span dir="ltr" class=""><<a href="mailto:jim@tilander.org" target="_blank" class="">jim@tilander.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hi Blake,<div class=""><br class=""></div><div class="">Thanks for that. Is there some way / docs that I can discover what can be templated like this? I’ve been struggling to find the “correct” docs and iterating on these things to discover them by trial and error is a little bit long since it takes a whole install for me.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Jim</div><div class=""><div class="h5"><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Feb 8, 2017, at 8:14 AM, Blake Rouse <<a href="mailto:blake.rouse@canonical.com" target="_blank" class="">blake.rouse@canonical.com</a>> wrote:</div><br class="m_-716821314609834419Apple-interchange-newline"><div class=""><br class="m_-716821314609834419Apple-interchange-newline"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">On Wed, Feb 8, 2017 at 11:10 AM, Jim Tilander<span class="m_-716821314609834419Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:jim@tilander.org" target="_blank" class="">jim@tilander.org</a>></span><span class="m_-716821314609834419Apple-converted-space"> </span>wr<wbr class="">ote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">Hi Andres,</div><div class=""><br class=""></div><div class="">Basically I’ve been struggling with how curtin works, but I finally got the the following stuck in curtin_userdata:</div><div class=""><br class=""></div><div class="">99_bootstrap: ["curtin", "in-target", "/bin/bash", "/usr/local/bin/post-install.s<wbr class="">h"]</div></div></blockquote><div class=""><br class=""></div><div class="">99_bootstrap: ["curtin", "in-target", "/bin/bash", "/usr/local/bin/post-install.s<wbr class="">h", "{{node.fqdn}}"]<br class=""></div><div class=""><br class=""></div><div class="">With that the FQDN of the node will be passed as the first parameter of your script.</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Then in the post-install.sh script I actually want to extract the FQDN of my node (but since I run in the installer environment, I can’t really rely it seems on the network to tell me this).</div><div class=""><br class=""></div><div class="">When you mention that I could do node.fqdn(), where would I put that? Is that some curtin templating? Python? </div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Jim</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="">On Feb 3, 2017, at 6:06 AM, Andres Rodriguez <<a href="mailto:andres.rodriguez@canonical.com" target="_blank" class="">andres.rodriguez@canonical.co<wbr class="">m</a>> wrote:</div><br class="m_-716821314609834419gmail-m_7971645669800627940Apple-interchange-newline"><div class=""><blockquote class="gmail_quote" style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><div class="">All I wanted to do was to reliably lookup my own FQDN, as well optionally get some custom payload for each node into a script that runs during setup.</div></div></div></blockquote><div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""> </div><div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">I would need more context than that, but you could get the FQDN of a deploying machine in the preseeds context (i.e. node.fqdn()). That said, you could also do post_install configuration via preseeds.</div><div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><br class=""></div><div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">You could inject user_data on the deployment (if doing so via the API of course).</div></div></blockquote></div><br class=""></div><br class="">--<br class="">Maas-devel mailing list<br class=""><a href="mailto:Maas-devel@lists.ubuntu.com" target="_blank" class="">Maas-devel@lists.ubuntu.com</a><br class="">Modify settings or unsubscribe at:<span class="m_-716821314609834419Apple-converted-space"> </span><a href="https://lists.ubuntu.com/mailman/listinfo/maas-devel" rel="noreferrer" target="_blank" class="">https://lists.ubuntu.com/m<wbr class="">ailman/listinfo/maas-devel</a><br class=""><br class=""></blockquote><div class=""><br class=""></div><div class="">Hope that helps.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Blake Rouse </div></div></div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>