Skip to content

Add practice exam environment with comprehensive lab provisioning#1

Merged
kraker merged 15 commits intomainfrom
provision-lab
Sep 3, 2025
Merged

Add practice exam environment with comprehensive lab provisioning#1
kraker merged 15 commits intomainfrom
provision-lab

Conversation

@kraker
Copy link
Owner

@kraker kraker commented Sep 3, 2025

Summary

  • Add complete Practice Exam A environment with Vagrant automation
  • Include 5-server RHEL 9 setup matching RHCE exam requirements
  • Add exam-start.sh script for standardized practice sessions
  • Update Claude Code settings for improved Vagrant workflow support

Test plan

  • Vagrant environment provisions successfully with 5 RHEL 9 servers
  • Ansible automation properly configures control and managed nodes
  • SSH key distribution works between control and managed hosts
  • Practice exam structure matches official RHCE requirements
  • All documentation passes markdownlint validation
  • Pre-commit hooks pass successfully

🤖 Generated with Claude Code

kraker and others added 9 commits August 27, 2025 00:09
Remove unnecessary performance optimizations that don't provide value in a
simple lab environment:
- Remove gathering=smart (default is fine for small lab)
- Remove fact_caching=memory (no multi-play complexity to justify)
- Remove bin_ansible_callbacks=true (not using custom callbacks)
- Keep stdout_callback=yaml (improves readability for learning)
- Fix interpreter_python comment formatting issue

Focus on settings that actually matter for RHCE study environment.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Fix yamllint so that `---` header is used. I'm not sure why Claude Code
overrode this...

Lint the repo and fix all the things...

Refactor site.yml by spliting control and managed into their own
playbooks:
- control.yml
- managed.yml

This is prep for adding necessary tasks to fully provision control1 as
an ansible control node. I'm implementing this myself for practice.
Create focused exam day command reference and reorganize documentation:

- Add docs/rhce_exam_commands.md with ~50 essential commands for actual exam use
- Update docs/exam_quick_reference.md to focus on playbook syntax vs ad-hoc commands
- Archive docs/command_reference_by_topic.md as comprehensive learning reference
- Update mkdocs.yml navigation to prioritize exam-focused content

Key insight: RHCE exam tests playbook writing, not ad-hoc system administration.
Removed 80% of commands that won't be used during the 4-hour practical exam.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update command references to favor standard ansible-playbook commands:

- Replace ansible-navigator with ansible-playbook as primary execution method
- Update validation sequences: syntax-check && check && execute pattern
- Keep ansible-navigator as secondary option for RHEL/AAP environments
- Update "Big 5" exam commands to use ansible-playbook
- Add note explaining ansible-playbook is more portable vs AAP-specific navigator

Rationale: ansible-playbook works across all Ansible installations while
ansible-navigator is Red Hat AAP specific. Better for portability and
matches traditional Ansible workflows.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update documentation to properly emphasize ansible-navigator as REQUIRED:

CRITICAL CORRECTION: Official RHCE exam objectives specifically mandate:
- "Run playbooks with Automation content navigator"
- "Use Automation content navigator to find new modules in available Ansible Content Collections"
- "Use Automation content navigator to create inventories and configure the Ansible environment"

Changes made:
- Prioritize ansible-navigator commands throughout both reference files
- Mark ansible-navigator usage as "EXAM REQUIRED" vs "alternative"
- Update "Big 5" exam commands to use ansible-navigator
- Add prominent warnings about exam compliance requirements
- Keep ansible-playbook as "general knowledge" but secondary

Source: https://www.redhat.com/en/services/training/ex294-red-hat-certified-engineer-rhce-exam-red-hat-enterprise-linux-9

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replace ephemeral SSH port forwarding with static IP addresses for reliable connectivity:

- Update all hosts to use 192.168.4.x IP addresses from Vagrantfile
- Keep individual SSH private keys per VM for security
- Add RHCE practice groups: webservers, databases, development, production
- Test connectivity: all hosts respond successfully to ansible ping

This resolves the issue where Vagrant assigns different SSH ports on each startup,
making the inventory unreliable. Static IP addresses provide consistent connectivity.

Tested with:
- ansible all -m ping -i hosts ✓
- ansible webservers -m ping -i hosts ✓
- ansible-navigator inventory --list --mode stdout -i hosts ✓

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add vagrant/practice-exam-a/ directory with complete lab setup
- Include Vagrantfile for automated RHCE practice environment
- Add exam-start.sh script for standardized exam simulation
- Update Claude Code settings to support additional Vagrant commands
- Enable vagrant destroy, halt, and provision operations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kraker kraker requested a review from Copilot September 3, 2025 13:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a comprehensive Practice Exam A environment that provides a realistic RHCE exam simulation with proper Vagrant automation and minimal configuration to match actual exam conditions.

  • Complete 5-server RHEL 9 environment matching RHCE Practice Exam A specifications
  • Streamlined Vagrant configuration with separate practice exam directory structure
  • Updated documentation structure with exam-focused command references

Reviewed Changes

Copilot reviewed 25 out of 27 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
vagrant/practice-exam-a/ New practice exam environment with Vagrantfile, README, and startup script
vagrant/site.yml Simplified main playbook with modular imports and updated host references
vagrant/control.yml New control node configuration playbook with Ansible automation platform setup
vagrant/managed.yml New managed nodes configuration playbook for SSH key distribution
docs/rhce_exam_commands.md New exam-focused command reference emphasizing ansible-navigator usage
docs/exam_quick_reference.md Updated to emphasize ansible-navigator requirements per exam objectives
docs/command_reference_by_topic.md Renamed and repositioned as comprehensive reference vs exam-day guide
Configuration files Updated YAML document start requirements and improved linting configurations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

kraker and others added 6 commits September 3, 2025 09:01
- Fix ansible-lint issues by installing required collections in CI
- Add collections installation step with proper ANSIBLE_COLLECTIONS_PATH
- Fix all markdownlint formatting issues in vagrant/README.md
- Consolidate lint.yml and deploy.yml into single ci-cd.yml workflow
- Combine linting and site build into one efficient workflow
- Remove redundant workflow files for cleaner CI/CD structure

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Install collections from vagrant/requirements.yml globally
- Move collection installation before pre-commit hooks run
- Remove custom collections path - use default global location
- Ansible-lint can now find required collections during CI
- Install collections to vagrant/collections/ as configured in ansible.cfg
- Follow Jeff Geerling's best practices for project-local collections
- Install both locally (for ansible.cfg compatibility) and globally (for CI)
- Maintains consistency with existing project structure
- Collections directory already excluded from git via .gitignore
- Set ANSIBLE_COLLECTIONS_PATH environment variable before pre-commit runs
- Points to global collections path where ansible-galaxy installs by default
- Keeps ansible-lint in pre-commit workflow as requested
- Pre-commit's isolated environment can now find installed collections
- Both project-local and global collection installations maintained
- Set project_dir: vagrant/ in .ansible-lint configuration
- Ansible-lint now uses vagrant/ansible.cfg for collection paths
- Respects existing project structure with relative paths
- Remove redundant global collection installation
- Much cleaner solution that follows ansible.cfg configuration
- Remove all pre-commit linting from GitHub Actions workflow
- Keep linting available for local development via pre-commit
- Focus workflow on core functionality: build and deploy MkDocs site
- Rename workflow and jobs for clarity (Build and Deploy Documentation)
- Eliminate CI complexity and potential collection dependency issues
@kraker kraker merged commit c6811ed into main Sep 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant