Foreman Cheat Sheet

From Bitbull Wiki
Jump to navigation Jump to search

1 CLI

1.1 Hammer

  • Hammer Password location
vim $HOME/.hammer/cli.modules.d/foreman.yml
  • Set all Repos to use "Download Policy" Immediate
for ID in $(hammer --csv repository list --per-page=1000 --fields Id | tail -n +2 | cut -d',' -f1)
do
 echo ID=$ID
 hammer repository update --id "$ID" --download-policy immediate
done

2 Content

2.1 Content Views

2.1.1 Content View Filters

  • Content > Lifecycle > Content Views > cv_rhel9 (your cv) > Tab: Filters > Create Filter
  • Add RPM Rule
  • RPM Name: zabbix*
  • keep other options as they are
  • Apply to a Subset of Repositories (right top corner)
  • Add EPEL9 Repos
  • Finally "Publish new Version" of your Content View
  • Then verify on target systems