RedHatInsights / yggdrasil

GNU General Public License v3.0
21 stars 37 forks source link

feat(yggctl): add generate worker-data command #248

Closed subpop closed 2 months ago

subpop commented 2 months ago

The generate worker-data command creates files relevant to D-Bus and systemd in order for a worker to communicate with yggd. This is intended to make worker development easier; if a worker has a relatively standard startup and policy configuration, it can be configured to invoke this subcommand instead of keeping the files in its own source repository.

The files can either be installed directly by specifying the --install flag, or they can be written to a given output directory.

The --user, --program and --name flags must be included in the invocation. For example:

yggctl generate worker-data \
  --name echo \
  --program /usr/libexec/yggdrasil/echo \
  --user $(pkgconf yggdrasil --variable worker_user \
  --install

Card ID: CCT-680