I have a current objective that requires I take some risks with configuration setting on my Spacewalk system, which ends up being easier to start over with a new deployment. And I had grown sick of the manual process adding a repo and associating it with a channel.
cat << EOF >> /etc/rhn/spacewalk-common-channels-3rd-party.ini
[epel-6]
label = epel-6 %(base_channel)s
archs = %(_x86_archs)s
name = EPEL 6 - (%(arch)s)
base_channels = centos6-%(arch)s
yumrepo_url = https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=%(arch)s
[puppetlabs-products]
label = puppetlabs-products
archs = %(_x86_archs)s
name = Puppet Labs Products El 6 - (%(arch)s)
base_channels = centos6-%(arch)s
yumrepo_url = http://yum.puppetlabs.com/el/6/products/%(arch)s
[puppetlabs-deps]
label = %(base_channel)s
archs = %(_x86_archs)s
name = Puppet Labs Dependencies El 6 - (%(arch)s)
base_channels = centos6-%(arch)s
yumrepo_url = http://yum.puppetlabs.com/el/6/dependencies/%(arch)s
EOF
/usr/bin/spacewalk-common-channels -v -s /etc/rhn/spacewalk-common-channels-3rd-party.ini -s spacewalk.matrix.private -u swadmin -p <Password> -a x86_64 -k unlimited 'epel-6' 'puppetlabs-products' 'puppetlabs-deps'
cat << EOF >> /etc/rhn/spacewalk-common-channels-3rd-party.ini
[epel-6]
label = epel-6 %(base_channel)s
archs = %(_x86_archs)s
name = EPEL 6 - (%(arch)s)
base_channels = centos6-%(arch)s
yumrepo_url = https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=%(arch)s
[puppetlabs-products]
label = puppetlabs-products
archs = %(_x86_archs)s
name = Puppet Labs Products El 6 - (%(arch)s)
base_channels = centos6-%(arch)s
yumrepo_url = http://yum.puppetlabs.com/el/6/products/%(arch)s
[puppetlabs-deps]
label = %(base_channel)s
archs = %(_x86_archs)s
name = Puppet Labs Dependencies El 6 - (%(arch)s)
base_channels = centos6-%(arch)s
yumrepo_url = http://yum.puppetlabs.com/el/6/dependencies/%(arch)s
EOF
/usr/bin/spacewalk-common-channels -v -s /etc/rhn/spacewalk-common-channels-3rd-party.ini -s spacewalk.matrix.private -u swadmin -p <Password> -a x86_64 -k unlimited 'epel-6' 'puppetlabs-products' 'puppetlabs-deps'
Comments
Post a Comment