Skip to content

Commit

Permalink
Add support for configuring podman
Browse files Browse the repository at this point in the history
  • Loading branch information
jouvin committed Mar 23, 2022
1 parent 55cfb88 commit 0d1d55f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
22 changes: 22 additions & 0 deletions features/podman/api_daemon.pan
@@ -0,0 +1,22 @@
unique template features/podman/api_daemon;

variable PODMAN_SERVICE ?= {
if ( OS_VERSION_PARAMS['majorversion'] >= '8' ) {
'podman';
} else {
'io.podman';
};
};

include 'components/systemd/config';

'/software/components/systemd/skip/service' = false;

'/software/components/systemd/unit' = {
SELF[PODMAN_SERVICE]['file']['replace'] = false;
SELF[PODMAN_SERVICE]['file']['config']['service'] = dict('EnvironmentFile', list('/etc/sysconfig/podman'));
SELF[PODMAN_SERVICE] = dict('startstop', true);
SELF[PODMAN_SERVICE]['state'] = 'enabled';
SELF;
};

17 changes: 17 additions & 0 deletions features/podman/config.pan
@@ -0,0 +1,17 @@
unique template features/podman/config;

@{
desc = if true, enable the Podman API daemon
value = boolean
default = true
required = no
}
variable POADMAN_API_DAEMON_ENABLED ?= true;


# Add RPM
'/software/packages' = pkg_repl('podman');


# Enable Podman API daemon
include if ( POADMAN_API_DAEMON_ENABLED ) 'features/podman/api_daemon';

0 comments on commit 0d1d55f

Please sign in to comment.