Add entropy_repos fact

This commit is contained in:
2016-10-16 13:42:47 +01:00
parent bd1fd54bbb
commit 97c1cc97e6
3 changed files with 48 additions and 3 deletions

View File

@@ -102,10 +102,12 @@ entropy_repo { 'sabayon-limbo':
}
```
To disable a repository, use:
To disable a repository (only if present), use:
```puppet
entropy_repo { 'sabayon-limbo':
enabled => 'false',
if 'sabayon-limbo' in $facts['entropy_repos'] {
entropy_repo { 'sabayon-limbo':
enabled => 'false',
}
}
```
@@ -275,6 +277,26 @@ For more info on package keywords, see https://wiki.gentoo.org/wiki/KEYWORDS
### Facts
#### `entropy_repos`
Provides a structured fact identifying the entropy repos present on the system
including their enabled/disabled state, and whether they are enman or entropy
repositories.
Example (in yaml format for readability):
```yaml
---
sabayonlinux.org:
repo_type: "entropy"
enabled: "true"
sabayon-limbo:
repo_type: "entropy"
enabled: "false"
community:
repo_type: "enman"
enabled: "true"
```
#### `locale`
Identifies the system-wide default locale, as set by `eselect`.