--- /dev/null
+class popcon {
+ $popcon_host_id = hkdf('/etc/puppet/secret', "popcon_host_id-${::fqdn}")
+
+ package { 'popularity-contest':
+ ensure => installed,
+ }
+
+ file { '/etc/popularity-contest.conf':
+ content => template('popcon/popularity-contest.conf.erb')
+ }
+}
--- /dev/null
+##
+### THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+### USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+###
+
+PARTICIPATE="yes"
+USEHTTP="yes"
+<%=
+# hostids are 32 hexchars long
+id_short = popcon_host_id[0,32]
+
+# slightly biased, but meh
+day = (popcon_host_id[0].ord + 256*popcon_host_id[1].ord) % 7
+
+conf = []
+conf << "MY_HOSTID=\"#{id_short}\""
+conf << "DAY=\"#{day}\""
+
+conf.join("\n")
+-%>
+