5 # Copyright:: 2023, OpenStreetMap Foundation
 
   7 # Licensed under the Apache License, Version 2.0 (the "License");
 
   8 # you may not use this file except in compliance with the License.
 
   9 # You may obtain a copy of the License at
 
  11 #     https://www.apache.org/licenses/LICENSE-2.0
 
  13 # Unless required by applicable law or agreed to in writing, software
 
  14 # distributed under the License is distributed on an "AS IS" BASIS,
 
  15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
  16 # See the License for the specific language governing permissions and
 
  17 # limitations under the License.
 
  26 ruby_block "subuid-containers" do
 
  28     File.open("/etc/subuid", "a") do |file|
 
  29       file.puts("containers:2147483647:2147483648")
 
  32   not_if "grep -q '^containers:' /etc/subuid"
 
  35 ruby_block "subgid-containers" do
 
  37     File.open("/etc/subgid", "a") do |file|
 
  38       file.puts("containers:2147483647:2147483648")
 
  41   not_if "grep -q '^containers:' /etc/subgid"
 
  44 systemd_timer "podman-auto-update-frequency" do
 
  45   timer "podman-auto-update"
 
  48   on_unit_inactive_sec "20m"
 
  49   randomized_delay_sec "5m"
 
  52 service "podman-auto-update.timer" do
 
  53   action [:enable, :start]