b8ee2aa0ea8ec4db97dd8daaf6edbb4a88ad1d9c
[mirror/dsa-puppet.git] / spec / octocatalog / init-system
1 #!/bin/bash
2 set -euE
3
4 function file() {
5   for i in "$@"; do
6     mkdir -p $(dirname $i)
7     echo "file $i" > $i
8   done
9 }
10
11 file /etc/puppet/secret
12
13 file /srv/puppet.debian.org/ca/RESULT/certs/ca.{crl,crt}
14 file /srv/puppet.debian.org/ca/RESULT/clientcerts/ca.{crl,crt}
15
16 file /srv/puppet.debian.org/sync/data/dsa-nagios/generated/nrpe_dsa.cfg
17
18 file /etc/ssh/ssh_known_hosts
19
20 for i in salsa.debian.org signup.salsa.debian.org webhook.salsa.debian.org pages.debian.net; do
21   file /srv/puppet.debian.org/from-letsencrypt/$i.{crt,crt-chain,crt-chained,key}
22 done
23
24 for fact in spec/octocatalog/facts/*; do
25   hostname=$(basename $fact .json)
26
27   file /srv/puppet.debian.org/ca/RESULT/certs/$hostname.{crt,key}
28   file /srv/puppet.debian.org/ca/RESULT/clientcerts/$hostname.{client.crt,key}
29
30   file /var/lib/puppet/yaml/node/$hostname.yaml
31 done