Files
resf-testing-repo/ansible/roles/golden_image/tasks/customize.sh
Stephen Simpson ec04f0bec5 Implement Ansible roles for Rocky Linux Testing Framework
- Added `bootstrap_sparrowdo` role for bootstrapping Sparrowdo on a VM.
- Introduced `cleanup_vm` role for cleaning up VMs and disk images.
- Created `download_image` role to download and cache QCOW2 images.
- Developed `golden_image` role for creating and customizing golden images.
- Implemented `provision_vm` role for provisioning VMs as linked clones.
- Added `run_test` role for executing tests with Sparrowdo.
- Created playbooks for building golden images, running single tests, and running test suites.
- Enhanced documentation with usage examples, configuration details, and troubleshooting tips.
- Added support for multiple cloud providers (AWS, Azure) in the test execution workflow.

Signed-off-by: Stephen Simpson <ssimpson89@users.noreply.github.com>
2025-12-29 16:02:39 -06:00

18 lines
307 B
Bash

#!/bin/bash
set -eux
# Create user if it doesn't exist
if ! id -u rocky >/dev/null 2>&1; then
useradd -m rocky
fi
# Set password
echo "rocky:rockypass" | chpasswd
# Sudoers
echo "rocky ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/rocky
chmod 0440 /etc/sudoers.d/rocky
# Enable ssh
systemctl enable sshd