#cloud-config autoinstall: apt: geoip: true preserve_sources_list: false primary: - arches: [amd64, i386] uri: http://aughra/ubuntu_repos/mirror/live/se.archive.ubuntu.com/ubuntu identity: {hostname: $name, password: $6$0uNE90CHwmN/EI7g$owZhTeFVSyUcnO0P9EKPKE3ULE1YEkWq1NRcA4UjUcEmiaIuJKr3E0KMMc4rx2d7aHaOsPAmTZIThZZQ3Wew./, realname: installer, username: inst} keyboard: {layout: se, toggle: null, variant: ''} locale: en_US network: ethernets: enp129s0f0: addresses: [$interfaces['enp129s0f0']['ip_address']/22] critical: true dhcp-identifier: mac gateway4: $gateway match: {macaddress: '$interfaces['enp129s0f0']['mac_address']'} nameservers: addresses: $name_servers search: [uppmax.uu.se] version: 2 ssh: allow-pw: true authorized-keys: [] install-server: true user-data: timezone: Europe/Stockholm late-commands: - wget http://$http_server/cblr/svc/op/nopxe/system/$name -o /dev/null - wget -P /tmp http://cobbler/cblr/pub/rvm.tar - tar xf /tmp/rvm.tar -C /target/usr/share/ - echo 'deb http://aughra/ubuntu_repos/mirror/live/se.archive.ubuntu.com/ubuntu bionic main restricted' > /target/etc/apt/sources.list.d/bionic.list - echo 'deb http://aughra/ubuntu_repos/mirror/live/se.archive.ubuntu.com/ubuntu bionic-updates main restricted' >> /target/etc/apt/sources.list.d/bionic.list - echo 'deb [trusted=yes] http://aughra.uppmax.uu.se/repos/uppmax/live/ubuntu xenial main' > /target/etc/apt/sources.list.d/uppmax.list - echo '*.* @@172.18.37.20:514' >/target/etc/rsyslog.d/90uppmax.conf - echo 'NTP=89.44.250.115 89.44.250.116' >> /target/etc/systemd/timesyncd.conf - echo '#!/bin/bash' >/target/usr/local/sbin/puppet-3.8.7.sh - echo 'export GEM_HOME=/usr/share/rvm/gems/ruby-2.1.10' >>/target/usr/local/sbin/puppet-3.8.7.sh - echo 'PATH=/usr/share/rvm/gems/ruby-2.1.10/bin:/usr/share/rvm/rubies/ruby-2.1.10/bin:$PATH' >>/target/usr/local/sbin/puppet-3.8.7.sh - echo 'puppet agent -tv --tags=ssh,puppet_client' >>/target/usr/local/sbin/puppet-3.8.7.sh - chmod +x /target/usr/local/sbin/puppet-3.8.7.sh - curtin in-target --target=/target -- apt -qq update - curtin in-target --target=/target -- apt -y install libssl1.0.0 systemd-timesyncd emacs-nox puppet - curtin in-target --target=/target -- apt -y remove snapd ubuntu-release-upgrader-core - mkdir -p /target/etc/puppet/modules - echo '[main]' >/target/etc/puppet/puppet.conf - echo ' logdir = /var/log/puppet' >>/target/etc/puppet/puppet.conf - echo ' rundir = /var/run/puppet' >>/target/etc/puppet/puppet.conf - echo ' ssldir = /var/lib/puppet/ssl' >>/target/etc/puppet/puppet.conf - echo ' trusted_node_data = true' >>/target/etc/puppet/puppet.conf - echo ' ordering = manifest' >>/target/etc/puppet/puppet.conf - echo ' stringify_facts = false' >>/target/etc/puppet/puppet.conf - echo ' parser = future' >>/target/etc/puppet/puppet.conf - echo '[agent]' >>/target/etc/puppet/puppet.conf - echo ' server = aughra.uppmax.uu.se' >>/target/etc/puppet/puppet.conf - echo ' classfile = /var/lib/puppet/classes.txt' >>/target/etc/puppet/puppet.conf - echo ' localconfig = /var/lib/puppet/localconfig' >>/target/etc/puppet/puppet.conf - echo ' environment = $environment' >>/target/etc/puppet/puppet.conf - rm -f /target/lib/systemd/system/puppet.service - wget -P /target/etc/systemd/system http://cobbler/cblr/pub/puppet-agent-3.8.7.service - wget -P /target/etc/systemd/system http://cobbler/cblr/pub/puppet-agent-3.8.7.timer - wget -P /target/etc/systemd/system http://cobbler/cblr/pub/puppet-apply.service - wget -P /target/etc/systemd/system http://cobbler/cblr/pub/puppet-apply.timer - curtin in-target --target=/target -- systemctl daemon-reload - curtin in-target --target=/target -- systemctl enable puppet-agent-3.8.7.timer puppet-agent-3.8.7.service puppet-apply.service puppet-apply.timer storage: config: - {ptable: gpt, path: /dev/sda, wipe: superblock, preserve: false, name: '', grub_device: true, type: disk, id: disk-sda} - {device: disk-sda, size: 1048576, flag: bios_grub, number: 1, preserve: false, grub_device: false, type: partition, id: partition-8} - {device: disk-sda, size: 1073741824, wipe: superblock, flag: '', number: 2, preserve: false, grub_device: false, type: partition, id: partition-9} - {device: disk-sda, size: 1196921192448, wipe: superblock, flag: '', number: 3, preserve: false, grub_device: false, type: partition, id: partition-10} - name: systemvg devices: [partition-10] preserve: false type: lvm_volgroup id: lvm_volgroup-2 - {fstype: xfs, volume: partition-9, preserve: false, type: format, id: format-7} - {name: systemvg-root, volgroup: lvm_volgroup-2, size: 34359738368B, preserve: false, type: lvm_partition, id: lvm_partition-3} - {fstype: xfs, volume: lvm_partition-3, preserve: false, type: format, id: format-8} - {device: format-8, path: /, type: mount, id: mount-8} - {name: systemvg-var, volgroup: lvm_volgroup-2, size: 34359738368B, preserve: false, type: lvm_partition, id: lvm_partition-4} - {fstype: xfs, volume: lvm_partition-4, preserve: false, type: format, id: format-9} - {device: format-9, path: /var, type: mount, id: mount-9} - {name: systemvg-lxc, volgroup: lvm_volgroup-2, size: 137438953472B, preserve: false, type: lvm_partition, id: lvm_partition-5} - {fstype: xfs, volume: lvm_partition-5, preserve: false, type: format, id: format-10} - {device: format-10, path: /var/lib/lxc, type: mount, id: mount-10} - {name: systemvg-openstack, volgroup: lvm_volgroup-2, size: 137438953472B, preserve: false, type: lvm_partition, id: lvm_partition-6} - {fstype: xfs, volume: lvm_partition-6, preserve: false, type: format, id: format-11} - {device: format-11, path: /openstack, type: mount, id: mount-11} - {device: format-7, path: /boot, type: mount, id: mount-7} version: 1