Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation instructions for mirrorlist #83

Merged
merged 1 commit into from
Dec 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -117,7 +125,7 @@ yum::repos:
extras:
enabled: true
baseurl: 'https://mirror.example.com/extras'
mirrorlist: '--'
mirrorlist: 'absent'
```

### Enable managemnt of multiple repos
Expand Down