FranGarcia.me (Posts about cli)https://www.frangarcia.me/categories/cli.atom2022-06-06T06:29:14ZFran GarciaNikolaIntroduction to hammer csvhttps://www.frangarcia.me/posts/introduction-to-hammer-csv/2017-03-30T12:08:00+02:002017-03-30T12:08:00+02:00Fran Garcia<p><a href="https://github.com/Katello/hammer-cli-csv">Hammer CSV</a> is an extension of the
Satellite <code>hammer</code> administration tool, built by <a href="https://github.com/thomasmckay">Thomas McKay</a>.
The main idea behind it was to generate machine-parsable export of different
Satellite configurations that can be easily applied among Organizations of
same/different Satellite servers.</p>
<p>What is developed so far is:</p>
<ul>
<li>activation-keys</li>
<li>architectures</li>
<li>compute-profiles</li>
<li>compute-resources</li>
<li>containers</li>
<li>content-hosts</li>
<li>content-view-filters</li>
<li>content-views</li>
<li>domains</li>
<li>host-collections</li>
<li>host-groups</li>
<li>hosts</li>
<li>installation-media</li>
<li>job-templates</li>
<li>lifecycle-environments</li>
<li>locations</li>
<li>operating-systems</li>
<li>organizations</li>
<li>partition-tables</li>
<li>products</li>
<li>provisioning-templates</li>
<li>puppet-environments</li>
<li>puppet-facts</li>
<li>puppet-reports</li>
<li>reports</li>
<li>roles</li>
<li>settings</li>
<li>smart-proxies</li>
<li>subnets</li>
<li>subscriptions</li>
<li>sync-plans</li>
<li>users</li>
</ul>
<p>And these are a few ideas of what can be done :</p>
<ul>
<li>Export Content Views and Composite Content Views between Satellites, provided
that you are using date-based CV filters.</li>
<li>Backup your settings to a git repo so you can understand when changes have
been done.</li>
<li>Export your hosts/content-hosts to a list.</li>
</ul>
<p>I put together a very simple export script that can be used to poke around what
is actually being exported :</p>
<script src="https://gist.github.com/frangdlt/52cc64f714d53942634d05372fc81ca0.js"></script>
<p><strong>Update 2017-08-29</strong>: There is a very nice blog post by Rich Jerrido that
covers advanced <code>hammer csv</code> usage and reporting of custom fields, available at:
<a href="https://access.redhat.com/blogs/1169563/posts/2938111">Subscription-manager for the former Red Hat Network User: Part 12 - Subscription Reporting Tools</a></p>
<p>Happy hacking!</p>