Skip to content

Instantly share code, notes, and snippets.

@TJM
Created Jun 30, 2020
Embed
What would you like to do?
Sync all repos (or a list of repos) in pulp
#!/bin/bash -e
if [ $# -gt 0 ]; then
REPOS=$*
else
REPOS=$(pulp-admin repo list | awk '/Id:/ {print $NF}')
fi
for repo in $REPOS
do
echo $repo
pulp-admin rpm repo sync run --repo-id $repo
pulp-admin rpm repo publish run --repo-id $repo
done
## Workaround
#pulp-admin rpm repo remove rpm --repo-id CentOS-7-x86_64-epel --str-eq='name=python-django-compressor'
#pulp-admin rpm repo publish run --repo-id CentOS-7-x86_64-epel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment