summaryrefslogtreecommitdiff
path: root/manifests/raspberry_builder.pp
blob: adb6dccf3f9f1b5fbfbce2ad51363781b0cb3371 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Sets up a machine for building raspberry pi images
class profiles::raspberry_builder (
  $raspberry_roots = '/usr/local/raspberry-pi',
  # $raspberry_boots,
  Array[Hash] $targets,
) {

  # http://raspbian.raspberrypi.org/raspbian/dists/bullseye/Release.gpg
  # 76754c89a543b57b2d9502b77fbc72d17bb14d0fb64512da5404bc18116957d3  Release.gpg

  # Prepare directory for Raspberry OS

  # file { "${root}/etc/debian_chroot":
  #   ensure  => file,
  #   content => "raspberry-pi\n",
  # }

  class { 'raspberry::builder':
    targets => $targets.map |$h| {
      [ $h['name'], {
          target_dir => "${raspberry_roots}/${h['name']}" ,
        } + $h
      ]
    }.convert_to(Hash),
  }
}