diff --git a/docs/developer/vendor-overrides.md b/docs/developer/vendor-overrides.md new file mode 100644 index 000000000..0a70e5885 --- /dev/null +++ b/docs/developer/vendor-overrides.md @@ -0,0 +1,66 @@ +# Vendor overrides + +As a downstream consumer of `foremanctl` you might want to diverge from defaults `foremanctl` offers. +Here's how. + +## Parameters + +If you want to override parameters, ship a playbook definition that overrides the parameter you want and add it to the `includes` of the command you want to alter. + +Example: +`src/playbooks/_vendor_override/metadata.obsah.yaml`: +```yaml +--- +variables: + flavor: + choices: + - satellite +``` + +`src/playbooks/deploy/metadata.obsah.yaml`: +```yaml +… +include: + … + - _vendor_override +``` + +## Features + +Changes to features can be done by providing a (partial) feature definition in a YAML file in `src/features.d` (probably shipped as `/usr/share/foremanctl/src/features.d`). + +### Adding features + +If you want to add a new feature, ship its definition in a file inside `src/features.d`. + +Example: +```yaml +cookies: + description: Delicious enterprise cookies + foreman: + plugin_name: foreman_cookies +``` + +### Removing features + +If you want to hide a previously defined feature (fully removing is not possible), set it to `internal: true` in a file inside `src/features.d`. + +Example: +```yaml +content/ostree: + internal: true +``` + +### Changing features + +If you want to update any part of a previously defined feature, provide the changes in a file inside `src/features.d`. + +Example: +```yaml +iop: + description: Lightspeed +``` + +## Images + +See [Image Management](deployment.md#image-management) in the Deployment documentation. diff --git a/src/playbooks/_vendor_override/metadata.obsah.yaml b/src/playbooks/_vendor_override/metadata.obsah.yaml new file mode 100644 index 000000000..332f5489b --- /dev/null +++ b/src/playbooks/_vendor_override/metadata.obsah.yaml @@ -0,0 +1,5 @@ +--- +variables: + flavor: + choices: + - satellite diff --git a/src/playbooks/deploy/metadata.obsah.yaml b/src/playbooks/deploy/metadata.obsah.yaml index 0fdf1a242..c9c3a4991 100644 --- a/src/playbooks/deploy/metadata.obsah.yaml +++ b/src/playbooks/deploy/metadata.obsah.yaml @@ -26,3 +26,4 @@ variables: include: - _flavor_features - _flavors/katello + - _vendor_override