
lang en_US.UTF-8
keyboard us
timezone --utc UTC


network --bootproto dhcp --hostname snapshot-ipv4-dhcp-el7 --device=00-f0-54-1a-7e-e0
# Partition table should create /boot and a volume atomicos
zerombr
clearpart --all    --initlabel
part /boot --fstype ext3 --size=100 --asprimary
part /     --fstype ext3 --size=1024 --grow
part swap  --recommended

bootloader --timeout=3
text

ostreesetup --nogpg --osname=centos-atomic-host --remote=centos-atomic-host-ostree --url=http://mirror.centos.org/centos/7/os/x86_64 --ref=centos-atomic-host/7/x86_64/standard
services --disabled cloud-init,cloud-config,cloud-final,cloud-init-local
rootpw --iscrypted $1$rtd8Ub7R$5Ohzuy8WXlkaK9cA2T1wb0

reboot


%pre --log=/tmp/install.pre.custom.log
# Custom pre snippet generated by "Atomic Kickstart default custom pre"

%end

# copy %pre log files into chroot
%post --nochroot
cp -vf /tmp/*pre*log /mnt/sysimage/root/
%end

%post







rm -f /etc/ostree/remotes.d/*.conf



touch /tmp/foreman_built
%end

%post --log=/root/install.post.custom.log
# Custom post snippet generated by "Atomic Kickstart default custom post"

%end


%post --erroronfail
if test -f /tmp/foreman_built; then
  echo "calling home: build is done!"
  if [ -x /usr/bin/curl ]; then
    /usr/bin/curl -o /dev/null --noproxy \* -H 'Content-Type: text/plain' --data @/root/install.post.log --silent 'http://foreman.example.com/unattended/built'
  elif [ -x /usr/bin/wget ]; then
    /usr/bin/wget -q -O /dev/null --no-proxy --method POST --header 'Content-Type: text/plain' --body-file=/root/install.post.log 'http://foreman.example.com/unattended/built'
  else
    wget -q -O /dev/null --header 'Content-Type: text/plain' 'http://foreman.example.com/unattended/built'
  fi
else
  echo "calling home: build failed!"
  if [ -x /usr/bin/curl ]; then
    /usr/bin/curl -o /dev/null --noproxy \* -H 'Content-Type: text/plain' --data @/root/install.post.log --silent 'http://foreman.example.com/unattended/failed'
  elif [ -x /usr/bin/wget ]; then
    /usr/bin/wget -q -O /dev/null --no-proxy --method POST --header 'Content-Type: text/plain' --body-file=/root/install.post.log 'http://foreman.example.com/unattended/failed'
  else
    wget -q -O /dev/null --header 'Content-Type: text/plain' 'http://foreman.example.com/unattended/failed'
  fi
fi

sync
%end
