Skip to content

kshitij1331/rhel9-classroom-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Simple Classroom Server Setup

This is a simple classroom server setup based on a real RHCSA exam server.

Configuration Overview

  • NTP is configured
  • HTTPD is configured
  • NFS is configured

Before Running the Script

  1. Change the interface name in ./classroom/classroom/network/config.yml file.
  2. Change the hosts in ./classroom/classroom.yml.

How to Run the Script

  1. Create a new RHEL 9 machine with yum locally configured on it with network adapters.

  2. Set hostname and domain name.

    hostnamectl set-hostname classroom
    vim /etc/hosts
    # Add the following line:
    172.25.250.254 content.example.com classroom
  3. Install Ansible.

    yum install ansible -y
  4. Configure Ansible.

    pwd
    /root
    
    mkdir ansible
    cd ansible
    vim ansible.cfg

    Add the following content to ansible.cfg:

    [defaults]
    inventory = /root/ansible/inventory
    remote_user = root
    ask_pass = False
    roles_path = /root/ansible/roles/
    vim inventory

    Add the following content to inventory:

    [classroom]
    classroom
  5. Create a role.

    mkdir roles
  6. Copy the classroom.zip file and extract.

    pwd
    /root
    
    ls
    
    unzip classroom.zip
    
    cp -rav classroom/classroom /root/ansible/roles/
    cp classroom/classroom.yml /root/ansible/
  7. Run the playbook classroom.yml.

    pwd
    /root/ansible
    
    ansible-playbook classroom.yml

Note: Make sure to adapt paths and commands based on your system configuration.

Releases

No releases published

Packages

No packages published