Essential reference for RHCE Exam (EX294)
ansible-doc
during the test. Practice these commands before your exam!
ansible-doc -l
Lists all available Ansible modules.
ansible-doc <module_name>
Show full documentation for a module.
# Example: ansible-doc yum
ansible-doc -s <module_name>
Show brief syntax and parameters.
# Example: ansible-doc -s service
Module | Purpose | Common Parameters |
---|---|---|
yum /dnf |
Package management | name , state (present/absent/latest) |
service |
Manage services | name , state (started/stopped), enabled |
copy |
Copy files | src , dest , owner , mode |
template |
Jinja2 templating | src , dest |
file |
Manage files/dirs | path , state (file/directory/link) |
firewalld |
Firewall configuration | service , port , permanent |
- name: Install Apache ansible.builtin.yum: name: httpd state: latest
- name: Start and enable httpd ansible.builtin.service: name: httpd state: started enabled: yes
- name: Ensure directory exists ansible.builtin.file: path: /etc/myapp state: directory mode: '0755'
ansible-doc
to check module syntax, but you won't have internet access. Practice these commands thoroughly before your exam.