Skip to content

Commit d336e98

Browse files
committed
Oops
1 parent ed1645b commit d336e98

File tree

5 files changed

+950
-0
lines changed

5 files changed

+950
-0
lines changed

promise-types/appstreams/README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# AppStreams Promise Type
2+
3+
A CFEngine custom promise type for managing AppStream modules on compatible systems.
4+
5+
## Overview
6+
7+
The `appstreams` promise type allows you to manage AppStream modules, which are a key feature of RHEL 8+ and compatible systems. AppStreams provide multiple versions of software components that can be enabled or disabled as needed.
8+
9+
## Features
10+
11+
- Enable, disable, install, and remove AppStream modules
12+
- Support for specifying streams and profiles
13+
14+
## Installation
15+
16+
To install this promise type, copy the `appstreams.py` file to your CFEngine masterfiles directory and configure the promise agent:
17+
18+
```
19+
promise agent appstreams
20+
{
21+
interpreter => "/usr/bin/python3";
22+
path => "$(sys.workdir)/modules/promises/appstreams.py";
23+
}
24+
```
25+
26+
## Usage
27+
28+
### Ensure a module is enabled
29+
30+
```
31+
bundle agent main
32+
{
33+
appstreams:
34+
"nodejs"
35+
state => "enabled",
36+
stream => "12";
37+
}
38+
```
39+
40+
### Ensure a module is disabled
41+
42+
```
43+
bundle agent main
44+
{
45+
appstreams:
46+
"nodejs"
47+
state => "disabled";
48+
}
49+
```
50+
51+
### Ensure a module is installed with a specific profile
52+
53+
```
54+
bundle agent main
55+
{
56+
appstreams:
57+
"python36"
58+
state => "installed",
59+
stream => "3.6",
60+
profile => "minimal";
61+
}
62+
```
63+
64+
### Ensure a module is removed
65+
66+
```
67+
bundle agent main
68+
{
69+
appstreams:
70+
"postgresql"
71+
state => "removed";
72+
}
73+
```
74+
75+
### Reset a module to default
76+
77+
```
78+
bundle agent main
79+
{
80+
appstreams:
81+
"nodejs"
82+
state => "default";
83+
}
84+
```
85+
86+
## Attributes
87+
88+
The promise type supports the following attributes:
89+
90+
- `state` (optional) - Desired state of the module: `enabled`, `disabled`, `installed`, `removed`, `default`, or `reset` (default: `enabled`)
91+
- `stream` (optional) - Specific stream of the module to use. Set to `default` to use the module's default stream.
92+
- `profile` (optional) - Specific profile of the module to install. Set to `default` to use the module stream's default profile.
93+
94+
## Requirements
95+
96+
- CFEngine 3.18 or later
97+
- Python 3
98+
- DNF Python API (python3-dnf package)
99+
- DNF/YUM package manager (RHEL 8+, Fedora, CentOS 8+)
100+
- AppStream repositories configured

0 commit comments

Comments
 (0)