Give up and use scratch for for the whole /home/ci

There are too many places within Zuul standard jobs which just expect
the working directory to be writable. We can init that dir pretty
easily, after all...

Change-Id: Ica24340d54ccb222518de7b8679bf601c40597e4
diff --git a/roles/virt_node_for_ci/templates/ci-f29-potemkin.ks b/roles/virt_node_for_ci/templates/ci-f29-potemkin.ks
index 1defc74..0a52173 100644
--- a/roles/virt_node_for_ci/templates/ci-f29-potemkin.ks
+++ b/roles/virt_node_for_ci/templates/ci-f29-potemkin.ks
@@ -43,8 +43,6 @@
 sed -i s/^TEMPORARY_STATE.*/TEMPORARY_STATE=yes/ /etc/sysconfig/readonly-root
 sed -i 's/defaults/defaults,ro/' /etc/fstab
 dracut -f -v
-echo 'files /home/ci/.ssh' >> /etc/rwtab.d/zuul-ci
-echo 'files /home/ci/.ansible' >> /etc/rwtab.d/zuul-ci
 
 echo \\6 >> /etc/issue
 
@@ -59,7 +57,7 @@
 IPv6AcceptRA=true
 EOF
 
-cat <<EOF>/etc/systemd/system/scratch-disk-mkfs.service
+cat <<EOF>/etc/systemd/system/home-ci-mkfs.service
 [Unit]
 Description=Prepare scratch FS
 DefaultDependencies=no
@@ -73,49 +71,48 @@
 [Install]
 WantedBy=local-fs.target
 EOF
-cat <<EOF>/etc/systemd/system/ci.mount
+cat <<EOF>/etc/systemd/system/home-ci.mount
 [Unit]
-Description=Mount /ci
+Description=Mount /home/ci
 DefaultDependencies=no
 Conflicts=umount.target
-Requires=scratch-disk-mkfs.service
-After=scratch-disk-mkfs.service
+Requires=home-ci-mkfs.service
+After=home-ci-mkfs.service
 
 [Mount]
 What=/dev/vdb
-Where=/ci
+Where=/home/ci
 Type=auto
 Options=relatime,nosuid,nodev
 EOF
-cat <<EOF>/etc/systemd/system/scratch-disk-permissions.service
+cat <<EOF>/etc/systemd/system/home-ci-content.service
 [Unit]
-Description=Scratch disk permissions
+Description=Scratch disk content
 DefaultDependencies=no
 Conflicts=umount.target
 Before=local-fs.target umount.target
-After=ci.mount
-Requires=ci.mount
+After=home-ci.mount
+Requires=home-ci.mount
 
 [Service]
 Type=oneshot
-ExecStart=/usr/bin/chown ci:ci /ci
+ExecStart=/usr/bin/mkdir /home/ci/.ssh
+ExecStart=/usr/bin/chmod 700 /home/ci/.ssh
+ExecStart=/bin/sh -c 'echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7ayaYkyMixjdmb7Ym2lJVec5daGlyg5dXjpij9jCdAQwP8uUUVKLegrI5NUh/Gg4g4Yf5cqh6sRnX9xl0L0lvSAYXsYdbwOiBtCHPyIsD/uyRTZ/MO9+FwvrfId3uswNgOXTqiQgHLaA9W4dNoMBEZtXsp7/McWN2GltZ+GvyHUPNHgmY7NTSQMgCa24o72glM0JkD4RMy2FGyqiZXKjD4BHUlLuKXchK3xfdGFC9NefCwBP98908ZQ2giZfTmu7VkR3o2CpmCNNtcnFqFhKutICfufy3D+23MasnGM6Vv+mldJsTWQCX8fCvjzc1g+Xif/r39CUXo3J+wRg4CVKf" > /home/ci/.ssh/authorized_keys'
+ExecStart=/usr/bin/chown -R ci:ci /home/ci
+ExecStart=/usr/sbin/restorecon -vr /home/ci
 
 [Install]
 WantedBy=local-fs.target
 EOF
-systemctl enable scratch-disk-mkfs
-systemctl enable scratch-disk-permissions
-mkdir /ci
+systemctl enable home-ci-mkfs
+systemctl enable home-ci-content
 
 for KEY in rsa ecdsa ed25519; do
   /usr/libexec/openssh/sshd-keygen $KEY
 done
 
 useradd ci
-mkdir ~ci/.ssh
-mkdir /home/ci/.ansible
-echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7ayaYkyMixjdmb7Ym2lJVec5daGlyg5dXjpij9jCdAQwP8uUUVKLegrI5NUh/Gg4g4Yf5cqh6sRnX9xl0L0lvSAYXsYdbwOiBtCHPyIsD/uyRTZ/MO9+FwvrfId3uswNgOXTqiQgHLaA9W4dNoMBEZtXsp7/McWN2GltZ+GvyHUPNHgmY7NTSQMgCa24o72glM0JkD4RMy2FGyqiZXKjD4BHUlLuKXchK3xfdGFC9NefCwBP98908ZQ2giZfTmu7VkR3o2CpmCNNtcnFqFhKutICfufy3D+23MasnGM6Vv+mldJsTWQCX8fCvjzc1g+Xif/r39CUXo3J+wRg4CVKf' > ~ci/.ssh/authorized_keys
-chown -R ci:ci ~ci/
 
 %end