Difference between revisions of "Foreman Cheat Sheet"

From Bitbull Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category: Linux:Foreman]]
+
=CLI=
 +
==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
 +
 
 +
=Content=
 +
==Content Views==
 +
===Content View Filters===
 +
* Content > Lifecycle > Content Views > cv_rhel9 (your cv) > Tab: Filters > Create Filter
 +
:* Name: EPEL_Zabbix_Exclude
 +
:* Content type: RPM
 +
:* Type: Exclude Filter
 +
:* Description: Never use Zabbix packages from epel repo: https://support.zabbix.com/si/jira.issueviews:issue-html/ZBX-21363/ZBX-21363.html
 +
:* Create
 +
* 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
  
 
[[Category:Linux]]
 
[[Category:Linux]]

Latest revision as of 08:14, 27 September 2024

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