How to publish multiple content views consecutively from command line on Red Hat Satellite 6?

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6.x

Issue

  • How to publish multiple content views consecutively from command line on Red Hat Satellite 6?

Resolution

  • Multiple content views can be published consecutively using hammer command in the following shell script:

    # cv=( cv_id1, cv_id2, cv_id3, cv_id4 )
    # for i in "${cv[@]}"
      do
      hammer content-view publish --id "$i" --organization="<org_name>" --async
      done
    

Note:

  1. Replace cv_id1, cv_id2, cv_id3, cv_id4 with the ID of the content view to be published.

  2. Replace <org_name> with the organization name.

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.

Comments