From f12353e319ee11bb527724c4e2383ee4bb176750 Mon Sep 17 00:00:00 2001 From: Jo Rhett Date: Mon, 11 Dec 2017 23:08:57 -0800 Subject: [PATCH] Fix documentation instructions for mirrorlist --- README.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b18c1a43..b9390976 100644 --- a/README.md +++ b/README.md @@ -101,14 +101,22 @@ yum::managed_repos: Here the Extras repository for CentOS is enabled and its settings are modified. Because the `repos` parameter uses a deep merge strategy when fed via automatic parameter lookup (APL), only the values requiring modification need be defined. -By default, `mirrorlist` contains some data, and `baseurl` is undefined. To undefine the `mirrorlist`, we pass it the *knockout prefix*, `--`. This works with any key. +To clear a value set below (from default repos, or lower in the hierarchy), pass it the *knockout prefix*, `--`. This will blank out the value. -**NOTE:** This only works if the data for the repository is included with the module. Please see the `/data` directory of this module for a list of available repos. - -```puppet -include 'yum' +```yaml +--- +yum::managed_repos: + - 'extras' +yum::repos: + extras: + enabled: true + baseurl: 'https://myrepo.example.com/extras' + gpgcheck: false + gpgkey: '--' ``` +The built-in repos by default have data in `mirrorlist`, but `baseurl` is undefined. Using the knockout prefix won't work with `mirrorlist`, as it requires a valid URL or the value `absent`, as shown at https://puppet.com/docs/puppet/latest/types/yumrepo.html. + ```yaml --- yum::managed_repos: @@ -117,7 +125,7 @@ yum::repos: extras: enabled: true baseurl: 'https://mirror.example.com/extras' - mirrorlist: '--' + mirrorlist: 'absent' ``` ### Enable managemnt of multiple repos