How to synchronize different contents using hammer CLI into Red Hat Capsule 6
Environment
- Red Hat Satellite 6
- Red Hat Capsule 6
Issue
-
What
hammercommand can be used to synchronize the following contents into Red Hat Capsule 6?- All content from Red Hat Satellite 6 environment
- A specific Lifecycle Environment
- One specific Content View from a specific Lifecycle Environment
- One specific Repository from a Content View and Lifecycle Environment
Resolution
-
Before proceeding, execute following
hammercommands on the Satellite server to obtain thecapsule_id,repository_id,lifecycle_environment_id, andcontent_view_idto replace against$valuesin the following procedures:# hammer capsule list # hammer content-view list # hammer repository list # hammer lifecycle-environment list -
Following command can be used to synchronize:
-
All contentfrom Red Hat Satellite 6 environment to Red Hat Capsule 6:# hammer capsule content synchronize --id $capsule_id -
A specific
Lifecycle Environmentfrom Red Hat Satellite 6 environment to Red Hat Capsule 6:# hammer capsule content synchronize --id $capsule_id --lifecycle-environment-id $lifecycle_environment_id -
One specific
Content Viewfrom a specificLifecycle Environmentfrom Red Hat Satellite 6 environment to Red Hat Capsule 6:# hammer capsule content synchronize --id $capsule_id --content-view-id $content_view_id --lifecycle-environment-id $lifecycle_environment_id -
One specific
Repositoryfrom aContent ViewandLifecycle Environmentfrom Red Hat Satellite 6 environment to Red Hat Capsule 6:# hammer capsule content synchronize --id $capsule_id --repository-id $repository_id --content-view-id $content_view_id --lifecycle-environment-id $lifecycle_environment_id
-
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.