forked from CERIT-SC/puppet-yum
-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds parameters to manage Yumrepo resources via data. The primary parameter, `repos`, is simply a hash of Yumrepo resources for digestion by an each loop similar to an old `create_resources()` call. It does nothing on its own, acting only as a source of data. The other parameters control the behavior of the resource instantiation loop. The parameters `managed_repos`, `os_default_repos`, and `repo_exclusions` each take an array of key names from the `repos` hash. They are then combined to select a set of repos from the `repos` hash for instantiation. The formula takes one of the following two forms: `managed_repos` - `repo_exclusions` OR, if `manage_os_default_repos` is set to `true` `managed_repos` + `os_default_repos` - `repo_exclusions` Data is included for most of the CentOS default repositories, with the exception of the "archive" repos.
- Loading branch information
1 parent
af7b895
commit 4b0e6bd
Showing
14 changed files
with
373 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,107 @@ | ||
--- | ||
yum::os_default_repos: | ||
- 'base' | ||
- 'updates' | ||
- 'extras' | ||
- 'centosplus' | ||
- 'base-source' | ||
- 'updates-source' | ||
- 'extras-source' | ||
- 'base-debuginfo' | ||
- 'centos-media' | ||
yum::repos: | ||
base: | ||
enabled: true | ||
descr: 'CentOS-$releasever - Base' | ||
mirrorlist: 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra' | ||
gpgcheck: true | ||
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" | ||
target: '/etc/yum.repos.d/CentOS-Base.repo' | ||
|
||
updates: | ||
enabled: true | ||
descr: 'CentOS-$releasever - Updates' | ||
mirrorlist: 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra' | ||
gpgcheck: true | ||
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" | ||
target: '/etc/yum.repos.d/CentOS-Base.repo' | ||
|
||
extras: | ||
enabled: false | ||
descr: 'CentOS-$releasever - Extras' | ||
mirrorlist: 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra' | ||
gpgcheck: true | ||
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" | ||
target: '/etc/yum.repos.d/CentOS-Base.repo' | ||
|
||
centosplus: | ||
enabled: false | ||
descr: 'CentOS-$releasever - Plus' | ||
mirrorlist: 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra' | ||
gpgcheck: true | ||
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" | ||
target: '/etc/yum.repos.d/CentOS-Base.repo' | ||
|
||
contrib: | ||
enabled: false | ||
descr: 'CentOS-$releasever - Contrib' | ||
mirrorlist: 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib&infra=$infra' | ||
gpgcheck: true | ||
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" | ||
target: '/etc/yum.repos.d/CentOS-Base.repo' | ||
|
||
cr: | ||
enabled: false | ||
descr: 'CentOS-$releasever - cr' | ||
baseurl: 'http://mirror.centos.org/centos/$releasever/cr/$basearch/' | ||
gpgcheck: true | ||
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" | ||
target: '/etc/yum.repos.d/CentOS-CR.repo' | ||
|
||
fasttrack: | ||
enabled: false | ||
descr: 'CentOS-$releasever - fasttrack' | ||
mirrorlist: 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=fasttrack&infra=$infra' | ||
gpgcheck: true | ||
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" | ||
target: '/etc/yum.repos.d/CentOS-fasttrack.repo' | ||
|
||
base-source: | ||
enabled: false | ||
descr: 'CentOS-$releasever - Base Sources' | ||
baseurl: 'http://vault.centos.org/centos/$releasever/os/Source/' | ||
gpgcheck: true | ||
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" | ||
target: '/etc/yum.repos.d/CentOS-Sources.repo' | ||
|
||
updates-source: | ||
enabled: false | ||
descr: 'CentOS-$releasever - Updates Sources' | ||
baseurl: 'http://vault.centos.org/centos/$releasever/updates/Source/' | ||
gpgcheck: true | ||
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" | ||
target: '/etc/yum.repos.d/CentOS-Sources.repo' | ||
|
||
extras-source: | ||
enabled: false | ||
descr: 'CentOS-$releasever - Extras Sources' | ||
baseurl: 'http://vault.centos.org/centos/$releasever/extras/Source/' | ||
gpgcheck: true | ||
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" | ||
target: '/etc/yum.repos.d/CentOS-Sources.repo' | ||
|
||
base-debuginfo: | ||
enabled: false | ||
descr: 'CentOS-$releasever - Debuginfo' | ||
baseurl: 'http://debuginfo.centos.org/$releasever/$basearch/' | ||
gpgcheck: true | ||
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-%{facts.os.release.major}" | ||
target: '/etc/yum.repos.d/CentOS-Debuginfo.repo' | ||
|
||
centos-media: | ||
enabled: false | ||
descr: 'CentOS-$releasever - Media' | ||
baseurl: 'file:///media/CentOS/ file:///media/cdrom/ file:///media/cdrecorder/' | ||
gpgcheck: true | ||
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-%{facts.os.release.major}" | ||
target: '/etc/yum.repos.d/CentOS-Media.repo' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
yum::os_default_repos: | ||
- 'contrib' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
yum::os_default_repos: | ||
- 'cr' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
function yum::bool2num_hash_recursive($arg) { | ||
assert_type(Hash, $arg) | ||
$arg.map |$key, $value| { | ||
$return_value = $value ? { | ||
Boolean => bool2num($value), | ||
Hash => yum::bool2num_hash_recursive($value), | ||
default => $value, | ||
} | ||
Hash({ $key => $return_value }) | ||
}.reduce |$attrs_memo, $kv| { | ||
merge($attrs_memo, $kv) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
yum::repo_exclusions: | ||
- 'base' |
Oops, something went wrong.