1 # Kickstart output config
4 # General system config
10 authconfig --enableshadow --passalgo=sha512
12 # Just have SELinux warn by default, to avoid breaking dev efforts
14 # To enable SELinux, use:
16 # Disable the firewall by default, to avoid breaking dev efforts
18 # To enable the firewall and (required) open the SSH port, use:
19 # firewall --enable --ssh
21 # Delete all existing partitions and create the default ones
22 clearpart --all --initlabel
23 # For unencrypted partitions (default):
25 # For encrypted paritions, use:
26 # autopart --encrypted --passphrase=<your_password>
28 # Default bootloader config
30 # For a GRUB password, use:
31 # bootloader --password=<your_password>
33 # Don't insall the X Window System
36 # Reboot, and don't launch setup wizard after boot
41 # Install minimal set of packages here, let provisioners (Ansible) handle them
45 # In the VM output, this is the "Running post-installation scripts" section.
46 # Unfortunately, it produces no output. The `yum update` step may give the
47 # appearance that the build is hung, as it's slow, uses little CPU and
48 # doesn't transfer much data during the package index building step.
53 # Clear yum cache to save space
56 # Create vagrant user and group, give them correct permissions
57 # This needs to happen before Packer tries to SSH in and poweroff the VM,
58 # (at the end of the builder step), so it must be done here (in the
59 # builder step), not in an external script called by a Packer shell
60 # provisioner (after the builder step).
62 useradd vagrant -g vagrant -G wheel
63 echo "vagrant" | passwd --stdin vagrant
64 echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
66 # Everything requires the ability to run sudo without a tty
67 # Else, may see errors like "sorry, you must have a tty to run sudo"
68 # Need to do this here, before Packer reboots the VM and runs scripts,
69 # because `sudo` in the scripts fails without it. Docker also needs this
70 # (for Ansible to run `sudo`), but it doesn't run this kickstart, so it the
71 # logic must be duplicated in Docker's config script and here.
72 sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers