RHCE Certification Guide
Red Hat Certified Engineer — Ansible 자동화 기반 실기 엔지니어 자격증
🎯 RHCE란?
Red Hat Certified Engineer (RHCE) 는 Red Hat이 운영하는 고급 실기(performance-based) 자격증. 현재 EX294 시험은 100% Ansible 자동화에 초점을 맞추며, Red Hat Ansible Automation Platform을 사용하여 시스템 관리 태스크를 자동화하는 능력을 평가.
RHCE 취득 시 RHCA(Red Hat Certified Architect) 를 향한 크레딧으로도 인정.
시험 요약
| 항목 | 내용 |
|---|---|
| 시험 코드 | EX294 |
| 주관 | Red Hat |
| 형태 | 온라인 원격 감독 또는 테스트 센터, 실기(performance-based) |
| 시간 | 4시간 |
| 합격 기준 | 210/300 (70%) |
| 비용 | $500 USD (리트라이 1회 포함) |
| 유효기간 | 3년 |
| 선수 조건 | RHCSA (EX200) 취득 필수 |
| 배포판 | RHEL (최신 버전 기반) |
시험 환경
- 여러 대의 시스템이 제공됨 (Control Node + Managed Nodes)
- Ansible Automation Platform을 구성하고 시스템 관리 태스크 자동화
- Playbook을 작성하여 시스템을 특정 상태로 구성
- 평가 방식: 작성한 Playbook을 새로 설치된 시스템에 적용하여 검증
- VS Code 에디터 사용 환경
- 허용 리소스: 제품 내장 문서 (
ansible-doc,ansible-navigator doc) - 비허용: 외부 웹사이트, 인터넷 접속, 메모, 별도 문서
RHCSA → RHCE 경로
flowchart LR RHCSA["RHCSA (EX200)<br/>Linux 시스템 관리<br/>$500 / 3시간"] RHCE["RHCE (EX294)<br/>Ansible 자동화<br/>$500 / 4시간"] RHCA["RHCA<br/>Red Hat Architect<br/>Specialist × 5"] RHCSA -->|"필수"| RHCE RHCE -->|"크레딧 1개"| RHCA
📊 시험 도메인 (출제 범위)
flowchart TD EX294["RHCE EX294"] subgraph Pre["선행 지식"] RHCSA_Skills["RHCSA 전 범위<br/>(Essential Tools, Storage,<br/>Security, Networking 등)"] end subgraph Core["Ansible 핵심"] D1["Ansible 핵심 구성요소 이해"] D2["Ansible 설치 및 설정"] D3["Managed Node 구성"] D4["ansible-navigator로 실행"] end subgraph Advanced["Playbook & 자동화"] D5["Play & Playbook 작성"] D6["Role & Content Collections"] D7["RHCSA 태스크 자동화"] D8["콘텐츠 관리<br/>(Template, Vault)"] end subgraph Tools["도구"] D9["VS Code + Git 사용"] end EX294 --> Pre EX294 --> Core EX294 --> Advanced EX294 --> Tools
선행 조건: RHCSA 전 범위
RHCE 응시자는 RHCSA 수준의 모든 태스크를 수행할 수 있어야 한다:
- Essential tools (파일, 권한, 리다이렉션)
- Running systems 운영 (프로세스, 서비스, 부팅)
- Local storage 구성 (파티션, LVM)
- File systems 설정 (NFS, autofs)
- 시스템 배포/유지보수 (패키지, 스케줄링)
- Users/Groups 관리
- Security 관리 (SELinux, firewalld)
- 간단한 shell script 분석
💡 RHCE 시험에서도 기본 Linux 관리 태스크가 출제될 수 있으므로 RHCSA 실력을 유지해야 한다.
1. VS Code & Git 사용
| 주제 | 핵심 내용 |
|---|---|
| Git 클론 | VS Code에서 Git 저장소 클론 |
| Playbook 작성 | VS Code에서 Playbook 작성 및 Git push |
| ansible-navigator 설정 | VS Code 내에서 설정 |
| Playbook 실행 | Ansible 개발 컨테이너로 실행 |
연습 포인트:
# Git 기본 조작
git clone https://git.example.com/playbooks.git
cd playbooks
git add .
git commit -m "Add web server playbook"
git push origin main
# VS Code 터미널에서 ansible-navigator 실행
ansible-navigator run site.yml -m stdout2. Ansible 핵심 구성요소 이해
| 주제 | 핵심 내용 |
|---|---|
| Inventories | 정적 인벤토리 파일 작성 |
| Modules | 모듈 사용법 및 문서 조회 |
| Variables | 변수 정의 및 우선순위 |
| Facts | 시스템 정보 수집 및 활용 |
| Loops | 반복 처리 |
| Conditional Tasks | 조건부 실행 (when) |
| Plays | Play 구성 |
| Task Failure | 에러 처리 |
| Playbooks | Playbook 작성 |
| Configuration Files | ansible.cfg 설정 |
| Roles | Role 구조 및 사용 |
| 문서 활용 | ansible-doc, ansible-navigator doc |
연습 포인트:
# 모듈 문서 조회 (시험 중 핵심 리소스)
ansible-doc -l # 모듈 전체 목록
ansible-doc -l | grep firewall # 검색
ansible-doc firewalld # 상세 문서
ansible-doc -s firewalld # 스니펫 (예시)
# ansible-navigator로 문서 조회
ansible-navigator doc firewalld -m stdout3. Ansible 설치 및 설정
| 주제 | 핵심 내용 |
|---|---|
| 패키지 설치 | 필수 패키지 설치 |
| ansible.cfg | 설정 파일 생성/수정 |
| ansible-navigator.yml | Navigator 설정 |
| 정적 인벤토리 | 호스트/그룹 정의 |
연습 포인트:
# 패키지 설치
dnf install -y ansible-core ansible-navigator
# ansible.cfg 설정
cat > ansible.cfg << 'EOF'
[defaults]
inventory = ./inventory
remote_user = automation
ask_pass = false
[privilege_escalation]
become = true
become_method = sudo
become_user = root
become_ask_pass = false
EOF
# ansible-navigator.yml
cat > ansible-navigator.yml << 'EOF'
ansible-navigator:
execution-environment:
image: ee-supported-rhel9:latest
pull:
policy: missing
mode: stdout
playbook-artifact:
enable: false
EOF
# 정적 인벤토리
cat > inventory << 'EOF'
[web]
web1.example.com
web2.example.com
[db]
db1.example.com
[all:vars]
ansible_user=automation
ansible_become=true
EOF4. Managed Node 구성
| 주제 | 핵심 내용 |
|---|---|
| SSH 키 | SSH 키 생성 및 배포 |
| 권한 상승 | sudo 설정 (privilege escalation) |
| 파일 배포 | 파일을 managed node에 배포 |
연습 포인트:
# SSH 키 생성 및 배포
ssh-keygen -t ed25519 -f ~/.ssh/ansible_key -N ""
ssh-copy-id -i ~/.ssh/ansible_key.pub automation@web1.example.com
# Managed node에서 sudo 설정
# /etc/sudoers.d/automation
# automation ALL=(ALL) NOPASSWD: ALL
# 연결 테스트
ansible all -m ping5. ansible-navigator로 Playbook 실행
| 주제 | 핵심 내용 |
|---|---|
| Playbook 실행 | ansible-navigator run |
| 모듈 탐색 | Content Collections에서 새 모듈 찾기 |
| 인벤토리/환경 설정 | navigator를 통한 설정 |
연습 포인트:
# Playbook 실행
ansible-navigator run site.yml -m stdout
# 특정 인벤토리로 실행
ansible-navigator run site.yml -i production -m stdout
# Dry run (체크 모드)
ansible-navigator run site.yml --check -m stdout
# 특정 태그만 실행
ansible-navigator run site.yml --tags "install" -m stdout
# 콘텐츠 컬렉션 내 모듈 탐색
ansible-navigator collections -m stdout6. Play & Playbook 작성
| 주제 | 핵심 내용 |
|---|---|
| 모듈 사용 | 자주 쓰는 Ansible 모듈 활용 |
| register | 명령 실행 결과를 변수에 저장 |
| 조건문 | when으로 실행 제어 |
| 에러 처리 | ignore_errors, block/rescue/always |
| 상태 구성 | 시스템을 특정 상태로 구성하는 Playbook |
연습 포인트:
---
- name: Web Server 구성
hosts: web
become: yes
vars:
http_port: 80
packages:
- httpd
- mod_ssl
- firewalld
tasks:
- name: 패키지 설치
ansible.builtin.dnf:
name: "{{ packages }}"
state: present
- name: httpd 서비스 시작
ansible.builtin.systemd:
name: httpd
state: started
enabled: yes
- name: 방화벽에 HTTP 허용
ansible.posix.firewalld:
service: http
permanent: yes
state: enabled
immediate: yes
- name: 버전 확인
ansible.builtin.command: httpd -v
register: httpd_version
changed_when: false
- name: 버전 출력
ansible.builtin.debug:
msg: "{{ httpd_version.stdout }}"
# 에러 처리
- name: 안전한 배포
block:
- name: 새 설정 배포
ansible.builtin.template:
src: httpd.conf.j2
dest: /etc/httpd/conf/httpd.conf
notify: Restart httpd
rescue:
- name: 기본 설정 복원
ansible.builtin.copy:
src: /etc/httpd/conf/httpd.conf.bak
dest: /etc/httpd/conf/httpd.conf
remote_src: yes
always:
- name: httpd 상태 확인
ansible.builtin.systemd:
name: httpd
state: started
handlers:
- name: Restart httpd
ansible.builtin.systemd:
name: httpd
state: restarted7. Role & Content Collections
| 주제 | 핵심 내용 |
|---|---|
| Role 생성 | Role 디렉토리 구조 생성 및 작성 |
| Role 설치 | ansible-galaxy role install |
| Role 사용 | Playbook에서 Role 호출 |
| Content Collections 설치 | ansible-galaxy collection install |
| Collections 사용 | Playbook에서 Collection 모듈 사용 |
연습 포인트:
# Role 생성
ansible-galaxy role init roles/webserver
# requirements.yml로 Role/Collection 설치
cat > requirements.yml << 'EOF'
roles:
- name: geerlingguy.nginx
version: "3.1.0"
collections:
- name: ansible.posix
- name: community.general
EOF
ansible-galaxy install -r requirements.yml
ansible-galaxy collection install -r requirements.yml# Role 구조
# roles/webserver/
# ├── tasks/main.yml
# ├── handlers/main.yml
# ├── templates/
# ├── defaults/main.yml
# └── meta/main.yml
# roles/webserver/defaults/main.yml
---
webserver_port: 80
webserver_docroot: /var/www/html
# roles/webserver/tasks/main.yml
---
- name: 패키지 설치
ansible.builtin.dnf:
name: httpd
state: present
- name: 설정 배포
ansible.builtin.template:
src: httpd.conf.j2
dest: /etc/httpd/conf/httpd.conf
notify: Restart httpd
- name: 서비스 시작
ansible.builtin.systemd:
name: httpd
state: started
enabled: yes
# roles/webserver/handlers/main.yml
---
- name: Restart httpd
ansible.builtin.systemd:
name: httpd
state: restarted# Playbook에서 Role 사용
---
- name: Web Server 구성
hosts: web
become: yes
roles:
- role: webserver
vars:
webserver_port: 80808. RHCSA 태스크 Ansible 자동화
Ansible 모듈을 사용하여 일반적인 RHCSA 관리 태스크를 자동화:
| RHCSA 태스크 | Ansible 모듈 |
|---|---|
| 패키지/저장소 | ansible.builtin.dnf, ansible.builtin.yum_repository |
| 서비스 | ansible.builtin.systemd, ansible.builtin.service |
| 방화벽 | ansible.posix.firewalld |
| 파일시스템 | community.general.filesystem, ansible.posix.mount |
| 스토리지 | community.general.lvg, community.general.lvol |
| 파일 내용 | ansible.builtin.copy, ansible.builtin.template, ansible.builtin.lineinfile |
| 아카이브 | community.general.archive, ansible.builtin.unarchive |
| 작업 스케줄링 | ansible.builtin.cron, ansible.builtin.at |
| 보안 (SELinux) | ansible.posix.seboolean, community.general.sefcontext |
| 사용자/그룹 | ansible.builtin.user, ansible.builtin.group |
연습 포인트:
---
- name: RHCSA 태스크 자동화 예시
hosts: all
become: yes
tasks:
# 사용자/그룹 관리
- name: 그룹 생성
ansible.builtin.group:
name: developers
state: present
- name: 사용자 생성
ansible.builtin.user:
name: "{{ item.name }}"
groups: "{{ item.groups }}"
shell: /bin/bash
state: present
loop:
- { name: jay, groups: "developers,wheel" }
- { name: deploy, groups: "developers" }
# 패키지 관리
- name: 패키지 설치
ansible.builtin.dnf:
name:
- httpd
- mariadb-server
- firewalld
state: present
# 서비스 관리
- name: 서비스 시작 및 활성화
ansible.builtin.systemd:
name: "{{ item }}"
state: started
enabled: yes
loop:
- httpd
- mariadb
- firewalld
# 방화벽
- name: 방화벽 규칙
ansible.posix.firewalld:
service: "{{ item }}"
permanent: yes
state: enabled
immediate: yes
loop:
- http
- https
# 파일 관리
- name: 설정 파일 배포 (Template)
ansible.builtin.template:
src: httpd.conf.j2
dest: /etc/httpd/conf/httpd.conf
owner: root
group: root
mode: '0644'
# cron 스케줄링
- name: 백업 크론 설정
ansible.builtin.cron:
name: "Daily backup"
minute: "0"
hour: "3"
job: "/opt/scripts/backup.sh"
user: root
# SELinux boolean
- name: SELinux boolean 설정
ansible.posix.seboolean:
name: httpd_can_network_connect
state: yes
persistent: yes
# LVM 관리
- name: VG 생성
community.general.lvg:
vg: vg_data
pvs: /dev/sdb1
- name: LV 생성
community.general.lvol:
vg: vg_data
lv: lv_data
size: 5G9. 콘텐츠 관리
| 주제 | 핵심 내용 |
|---|---|
| Template | Jinja2 템플릿으로 동적 설정 파일 생성 |
| Ansible Vault | 민감 데이터 암호화 |
연습 포인트:
{# templates/httpd.conf.j2 #}
# Managed by Ansible - Do not edit
ServerRoot "/etc/httpd"
Listen {{ http_port | default(80) }}
ServerName {{ ansible_fqdn }}
<VirtualHost *:{{ http_port | default(80) }}>
DocumentRoot {{ docroot | default('/var/www/html') }}
ServerName {{ server_name | default(ansible_fqdn) }}
</VirtualHost># Ansible Vault - 암호화된 변수 파일 생성
ansible-vault create vars/secrets.yml
ansible-vault edit vars/secrets.yml
ansible-vault view vars/secrets.yml
# 암호화된 변수 파일 내용 예시:
# db_password: "s3cr3t_p@ss"
# api_key: "abc123def456"
# Vault 사용하여 Playbook 실행
ansible-navigator run site.yml --vault-password-file ~/.vault_pass -m stdout
# 또는
ansible-navigator run site.yml --ask-vault-pass -m stdout
# 기존 파일 암호화/복호화
ansible-vault encrypt vars/plain.yml
ansible-vault decrypt vars/secrets.yml
# 문자열 단위 암호화
ansible-vault encrypt_string 'secret_value' --name 'db_password'# Playbook에서 Vault 변수 사용
---
- name: DB 서버 구성
hosts: db
become: yes
vars_files:
- vars/secrets.yml
tasks:
- name: DB 패스워드 설정
ansible.builtin.lineinfile:
path: /etc/myapp/config.ini
regexp: '^password='
line: "password={{ db_password }}"⚖️ RHCSA vs RHCE 비교
| 항목 | RHCSA (EX200) | RHCE (EX294) |
|---|---|---|
| 초점 | Linux 시스템 관리 | Ansible 자동화 |
| 시간 | 3시간 | 4시간 |
| 작업 방식 | 직접 CLI에서 수동 작업 | Playbook 작성으로 자동화 |
| 비용 | $500 | $500 |
| 선수 조건 | 없음 | RHCSA 필수 |
| SELinux | 직접 설정 | Ansible 모듈로 설정 |
| LVM | 직접 명령어 | Ansible 모듈로 자동화 |
| 에디터 | vim | VS Code |
| 커리어 | 시스템 관리자 | 자동화 엔지니어, DevOps |
flowchart TB subgraph RHCSA["RHCSA — 수동 작업"] Manual["CLI에서 직접 수행<br/>systemctl, nmcli, firewall-cmd<br/>useradd, lvextend, semanage"] end subgraph RHCE["RHCE — 자동화"] Auto["Playbook으로 자동화<br/>ansible.builtin.systemd<br/>ansible.posix.firewalld<br/>ansible.builtin.user<br/>community.general.lvol"] end RHCSA -->|"같은 태스크를"| RHCE Manual -->|"자동화로"| Auto
📖 학습 리소스
공식 교육 과정
| 과정 | 설명 |
|---|---|
| RH294 — Red Hat Enterprise Linux Automation with Ansible | RHCE 시험 대비 공식 과정, 시험 범위의 90% 커버 |
| Red Hat Learning Subscription | 전체 교육 과정 무제한 접근 (~$5,000/년) |
추천 학습 자료
| 리소스 | 설명 |
|---|---|
| Sander van Vugt — RHCE EX294 (O’Reilly/Udemy) | 실습 중심, 각 레슨 랩 포함 |
| Lisenet.com — RHCE EX294 Sample Exam | 무료 모의시험 18문제, VM 5대 환경 |
| Ansible 공식 문서 | 모듈 레퍼런스, Best Practices |
| GitHub — RHCE EX294 Study Guide | 도메인별 학습 노트 및 예제 |
블로그 내 관련 시리즈
| 글 | 설명 |
|---|---|
| Ansible Overview | Ansible 아키텍처, 설치, Ad-hoc 기본 |
| Ansible Playbook | 변수, 조건문, 반복문, Handler, Template |
| Ansible Role | Role 구조, Galaxy, 프로젝트 구조 |
🗓️ 학습 계획 (8~12주, RHCSA 취득 후)
gantt title RHCE 학습 계획 dateFormat YYYY-MM-DD section Ansible 기초 (2주) 설치 및 환경 구성 :a1, 2026-05-01, 4d Ad-hoc 명령 & 인벤토리 :a2, after a1, 5d Playbook 기초 (tasks, handlers) :a3, after a2, 5d section Playbook 심화 (3주) 변수, Facts, Register :a4, after a3, 5d 조건문, 반복문 :a5, after a4, 5d 에러 처리 (block/rescue) :a6, after a5, 4d Template (Jinja2) :a7, after a6, 3d Ansible Vault :a8, after a7, 3d section Role & Collections (2주) Role 생성 및 사용 :a9, after a8, 5d Content Collections :a10, after a9, 5d Galaxy (Role/Collection 설치) :a11, after a10, 4d section RHCSA 태스크 자동화 (2주) 패키지, 서비스, 방화벽 :a12, after a11, 5d 스토리지, 파일시스템 :a13, after a12, 5d 사용자, SELinux, 스케줄링 :a14, after a13, 4d section 실전 준비 (2주) 모의시험 1차 :a15, after a14, 3d 약점 보완 :a16, after a15, 7d 모의시험 2차 :a17, after a16, 3d section 시험 시험 응시 :milestone, after a17, 0d
💡 시험 팁
ansible-doc 활용 — 최고의 무기
시험 중 인터넷은 차단되지만 ansible-doc은 사용 가능. 모듈 사용법을 모를 때 생명줄:
# 모듈 검색
ansible-doc -l | grep -i firewall
ansible-doc -l | grep -i user
ansible-doc -l | grep -i lvol
# 모듈 상세 문서 (EXAMPLES 섹션이 핵심)
ansible-doc ansible.builtin.user
ansible-doc ansible.posix.firewalld
ansible-doc community.general.lvol
# 스니펫 (바로 복사 가능한 예시)
ansible-doc -s ansible.builtin.user
ansible-doc -s ansible.posix.firewalld💡
-s옵션의 스니펫을 복사해서 수정하면 빠르게 태스크를 작성할 수 있다.
FQCN (Fully Qualified Collection Name) 사용
시험에서 모듈을 FQCN으로 사용하는 것이 안전:
# 짧은 이름 (동작하지만 경고 가능)
- name: 패키지 설치
dnf:
name: httpd
# FQCN (권장)
- name: 패키지 설치
ansible.builtin.dnf:
name: httpd| 카테고리 | FQCN 예시 |
|---|---|
| 내장 모듈 | ansible.builtin.dnf, ansible.builtin.user, ansible.builtin.systemd |
| POSIX | ansible.posix.firewalld, ansible.posix.seboolean, ansible.posix.mount |
| Community | community.general.lvol, community.general.lvg, community.general.filesystem |
Playbook 작성 시 주의
# 1. 항상 멱등하게 작성
# 나쁜 예: shell/command → 멱등성 없음
- name: 사용자 추가
ansible.builtin.shell: useradd jay
# 좋은 예: 전용 모듈 → 멱등성 보장
- name: 사용자 추가
ansible.builtin.user:
name: jay
state: present
# 2. changed_when으로 정확한 상태 표시
- name: 버전 확인
ansible.builtin.command: httpd -v
register: result
changed_when: false # 정보 조회는 변경 아님
# 3. handler는 notify로만 호출
# changed 상태일 때만 실행됨시간 관리
- 4시간은 넉넉해 보이지만 Playbook 디버깅에 시간 소요
- 문법 검증을 자주 수행:
ansible-navigator run --check ansible-lint로 문법 오류 사전 방지- 쉬운 태스크부터 완료하여 점수 확보
- Vault 관련 문제는 비교적 간단하므로 빨리 끝내기
랩 환경 구성 (학습용)
최소 VM 구성:
├── control.example.com (Control Node — Ansible 설치)
├── web1.example.com (Managed Node — Web)
├── web2.example.com (Managed Node — Web)
├── db1.example.com (Managed Node — DB)
└── utility.example.com (Managed Node — 기타)
요구사항:
- RHEL 9 (개발자 구독 무료)
- Control Node: 2GB RAM
- Managed Nodes: 1GB RAM 각각
- 네트워크: 동일 서브넷, SSH 연결 가능
🔗 관련 문서
- Certification Roadmap — 전체 자격증 로드맵
- RHCSA Certification Guide — RHCSA 시험 가이드 (RHCE 선행)
- LFCS Certification Guide — LFCS 시험 가이드
- Ansible Overview — Ansible 기초
- Ansible Playbook — Playbook 작성법
- Ansible Role — Role 구조 및 활용