Querying hostnames from beaker

If you have requested a single host from beaker, the following one liner will tell the hostname for it.

bkr job-results   $( bkr job-list  -o $USER  --unfinished | jq -r  ".[]" )   | xpath -q -e string\(/job/recipeSet/recipe/roles/role/system/@value\)

This requires jq and xpath, as well as the beaker command line packages.

For me on Fedora 33 the packages are:

  • perl-XML-XPath-1.44-7.fc33.noarch
  • jq-1.6-5.fc33.x86_64
  • python3-beaker-1.10.0-9.fc33.noarch
  • beaker-redhat-0.2.1-2.fc33eng.noarch
  • beaker-common-28.2-1.fc33.noarch
  • beaker-client-28.2-1.fc33.noarch

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.