Package repositories can be managed with the pkgrepo state:
base:
pkgrepo.managed:
- human_name: CentOS-$releasever - Base
- mirrorlist: http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
- comments:
- #http://mirror.centos.org/centos/$releasever/os/$basearch/
- gpgcheck: 1
- gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
This function deletes the specified repo on the system, if it exists. It is essentially a wrapper around pkg.del_repo.
On Ubuntu, you can take advantage of Personal Package Archives on Launchpad simply by specifying the user and archive name.
EXAMPLE: ppa: wolfnet/logstash
For Ubuntu PPAs there can be private PPAs that require authentication to access. For these PPAs the username/password can be specified. This is required for matching if the name format uses the "ppa:" specifier and is private (requires username/password to access, which is encoded in the URI)
EXAMPLE: ppa_auth: username:password
This function manages the configuration on a system that points to the repositories for the system's package manager.
For yum-based systems, take note of the following configuration values:
Additional configuration values, such as gpgkey or gpgcheck, are used verbatim to update the options for the yum repo in question.
For apt-based systems, take note of the following configuration values:
On Ubuntu, you can take advantage of Personal Package Archives on Launchpad simply by specifying the user and archive name. The keyid will be queried from launchpad and everything else is set automatically. You can override any of the below settings by simply setting them as you would normally.
EXAMPLE: ppa: wolfnet/logstash
For Ubuntu PPAs there can be private PPAs that require authentication to access. For these PPAs the username/password can be passed as an HTTP Basic style username/password combination.
EXAMPLE: ppa_auth: username:password
On apt-based systems this must be the complete entry as it would be seen in the sources.list file. This can have a limited subset of components (i.e. 'main') which can be added/modified with the "comps" option.
EXAMPLE: name: deb http://us.archive.ubuntu.com/ubuntu/ precise main