aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--personal_infra/puppet/modules/podman/manifests/init.pp17
1 files changed, 17 insertions, 0 deletions
diff --git a/personal_infra/puppet/modules/podman/manifests/init.pp b/personal_infra/puppet/modules/podman/manifests/init.pp
new file mode 100644
index 00000000..17247aa2
--- /dev/null
+++ b/personal_infra/puppet/modules/podman/manifests/init.pp
@@ -0,0 +1,17 @@
+class podman($user, $storage_driver) {
+ package {'podman':}
+
+ file {['/etc/subuid', '/etc/subgid']:
+ content => "${user}:100000:65536\n",
+ }
+
+ exec {"/usr/bin/sed -i 's/driver = \".*\"/driver = \"${storage_driver}\"/g' /etc/containers/storage.conf":
+ require => Package['podman'],
+ unless => "/usr/bin/grep 'driver = \"${storage_driver}\"' /etc/containers/storage.conf",
+ }
+
+ exec {"/usr/bin/sed -i 's|#mount_program = \"/usr/bin/fuse-overlayfs\"|mount_program = \"/usr/bin/fuse-overlayfs\"|g' /etc/containers/storage.conf":
+ require => Package['podman'],
+ unless => "/usr/bin/grep '^#mount_program = \"/usr/bin/fuse-overlayfs\"'",
+ }
+}