|
81 | 81 | <li class="toctree-l2"><a class="reference internal" href="#node-discovery">Node Discovery</a></li> |
82 | 82 | <li class="toctree-l2"><a class="reference internal" href="#tags">Tags</a></li> |
83 | 83 | <li class="toctree-l2"><a class="reference internal" href="#resources">Resources</a></li> |
84 | | -<li class="toctree-l2"><a class="reference internal" href="#importing-nodes-from-a-file">Importing Nodes From a File</a><ul> |
85 | | -<li class="toctree-l3"><a class="reference internal" href="#csv-import">CSV Import</a></li> |
86 | | -<li class="toctree-l3"><a class="reference internal" href="#yaml-import">YAML Import</a></li> |
87 | | -</ul> |
88 | | -</li> |
| 84 | +<li class="toctree-l2"><a class="reference internal" href="#importing-nodes-from-a-file">Importing Nodes From a File</a></li> |
89 | 85 | </ul> |
90 | 86 | </li> |
91 | 87 | <li class="toctree-l1"><a class="reference internal" href="profiles.html">Node Profiles</a></li> |
@@ -385,42 +381,13 @@ <h2>Resources<a class="headerlink" href="#resources" title="Link to this heading |
385 | 381 | </section> |
386 | 382 | <section id="importing-nodes-from-a-file"> |
387 | 383 | <h2>Importing Nodes From a File<a class="headerlink" href="#importing-nodes-from-a-file" title="Link to this heading"></a></h2> |
388 | | -<p>You can import nodes into Warewulf by using the <code class="docutils literal notranslate"><span class="pre">wwctl</span> <span class="pre">node</span> <span class="pre">import</span></code> command. The |
389 | | -file used must be in YAML or CSV format.</p> |
390 | | -<div class="admonition warning"> |
391 | | -<p class="admonition-title">Warning</p> |
392 | | -<p>Importing a node configuration will fully overwrite the existing settings, |
393 | | -including any customizations not present in the import file. If the node |
394 | | -already exists and you wish to update it, ensure that the import file |
395 | | -includes all the options you want to retain.</p> |
396 | | -</div> |
397 | | -<section id="csv-import"> |
398 | | -<h3>CSV Import<a class="headerlink" href="#csv-import" title="Link to this heading"></a></h3> |
399 | | -<div class="admonition note"> |
400 | | -<p class="admonition-title">Note</p> |
401 | | -<p>As of Warewulf v4.6.1, the csv import functionality is broken and an |
402 | | -<a class="reference external" href="https://github.com/warewulf/warewulf/issues/1862">issue</a> |
403 | | -has been created to track this.</p> |
404 | | -</div> |
405 | | -<p>The CSV file must have a header where the first field must always be the nodename, |
406 | | -and the rest of the fields are the same as the long commandline options. Network |
407 | | -device must have the form <code class="docutils literal notranslate"><span class="pre">net.$NETNAME.$NETOPTION</span></code>. (e.g., <code class="docutils literal notranslate"><span class="pre">net.default.ipaddr</span></code>). |
408 | | -Tags are currently not supported and must be added separately after the import.</p> |
409 | | -<p>As an example, the following CSV file:</p> |
410 | | -<div class="highlight-csv notranslate"><div class="highlight"><pre><span></span>nodename,net.default.hwaddr,net.default.ipaddr,net.default.netmask,net.default.gateway,discoverable,image |
411 | | -n1,00:00:00:00:00:01,10.0.2.1,255.255.255.0,10.0.2.254,false,rockylinux-9 |
412 | | -</pre></div> |
413 | | -</div> |
414 | | -<p>This can be imported with the following command:</p> |
415 | | -<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>wwctl<span class="w"> </span>node<span class="w"> </span>import<span class="w"> </span>--csv<span class="w"> </span>/path/to/nodes.csv |
416 | | -</pre></div> |
417 | | -</div> |
418 | | -</section> |
419 | | -<section id="yaml-import"> |
420 | | -<h3>YAML Import<a class="headerlink" href="#yaml-import" title="Link to this heading"></a></h3> |
421 | | -<p>The YAML file must be a mapping of node names to their attributes, where each node is represented as a dictionary of attributes. |
422 | | -To simplify the creation of the YAML file, you can use the wwctl node export command to export the current node configuration to a YAML file. |
423 | | -This exported file can serve as a template for creating new nodes.</p> |
| 384 | +<p>You can import nodes into Warewulf by using the <code class="docutils literal notranslate"><span class="pre">wwctl</span> <span class="pre">node</span> <span class="pre">import</span></code> command. |
| 385 | +The file used must be in YAML format.</p> |
| 386 | +<p>The YAML file must be a mapping of node names to their attributes, where each |
| 387 | +node is represented as a dictionary of attributes. To simplify the creation of |
| 388 | +the YAML file, you can use the wwctl node export command to export the current |
| 389 | +node configuration to a YAML file. This exported file can serve as a template |
| 390 | +for creating new nodes.</p> |
424 | 391 | <p>A minimal example of a YAML file looks like this:</p> |
425 | 392 | <div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">n1</span><span class="p">:</span> |
426 | 393 | <span class="w"> </span><span class="nt">profiles</span><span class="p">:</span> |
@@ -451,7 +418,6 @@ <h3>YAML Import<a class="headerlink" href="#yaml-import" title="Link to this hea |
451 | 418 | </pre></div> |
452 | 419 | </div> |
453 | 420 | </section> |
454 | | -</section> |
455 | 421 | </section> |
456 | 422 |
|
457 | 423 |
|
|
0 commit comments