RHCE flashcards
RHCE · Build recall with a focused review session.
32 cards. Read the term and the definition here. The deck at the top of this page is optional.
- Control node
- Machine where the Ansible CLI runs; it holds inventory, playbooks, and configuration and initiates connections to managed nodes over SSH; no agent is required on targets.
- Managed node
- Target host configured by Ansible; it requires a Python interpreter and an SSH server but no Ansible agent, because tasks are pushed from the control node.
- Inventory
- File or plugin that lists managed hosts and groups; static formats are INI or YAML, while dynamic inventory plugins pull host lists from external sources at runtime.
- ansible.cfg precedence
- Configuration search order is the ANSIBLE_CONFIG environment variable, then ./ansible.cfg, then ~/.ansible.cfg, then /etc/ansible/ansible.cfg; the first file found wins.
- Idempotence
- Property where running the same task repeatedly produces the same end state; modules report changed only when they actually modify the system.
- Collection FQCN
- Fully qualified collection name in namespace.collection.module form, such as ansible.builtin.copy; it identifies exactly which collection supplies the module.
- ansible-core package
- Minimal Ansible installation containing the core engine and builtin modules; installed on RHEL with dnf install ansible-core, while collections add extra modules.
- ansible-config init
- Command that generates a sample ansible.cfg; ansible-config init --disabled writes every setting commented out, providing a template for a control node configuration.
- host_key_checking
- ansible.cfg setting under [defaults]; when False it skips SSH host key verification prompts, which is convenient for first connections but weaker than pre-populating known_hosts.
- requirements.yml
- File listing collections or roles for ansible-galaxy install -r; entries specify name, source, and version, enabling reproducible control-node setup.
- ansible-navigator
- Tool that runs playbooks inside execution environments, which are container images bundling ansible-core, collections, and Python dependencies; it replaces direct ansible-playbook invocation in many workflows.
- Ad hoc command
- One-off ansible invocation of the form ansible pattern -m module -a arguments; used for quick checks like ping, fact gathering, or service status without writing a playbook.
- Ping module
- ansible.builtin.ping verifies SSH connectivity and a usable Python interpreter on managed nodes; it does not use ICMP and returns pong on success.
- Pattern all
- Inventory pattern matching every host; patterns may be hostnames, groups, wildcards, or combinations using colon, ampersand, and exclamation mark operators.
- setup module
- Gathers facts from a managed node; run ad hoc as ansible host -m setup, optionally with filter=ansible_* to limit output to matching fact names.
- copy module
- Transfers a file from the control node to a managed node using src and dest; supports owner, group, mode, and content for inline text.
- file module
- Manages file attributes and existence; state=directory creates directories, state=absent removes them, state=touch creates empty files; sets mode, owner, and group.
- systemd module
- Controls systemd units; name selects the unit, state started/stopped/restarted changes runtime state, and enabled=true makes it start at boot; system units need privilege escalation.
- Playbook structure
- YAML list of plays; each play names hosts and may define become, vars, tasks, handlers, and roles; tasks call modules with arguments and optional conditionals.
- Handler
- Task triggered by notify from a changed task; it runs once at the end of a play even if notified multiple times, and meta: flush_handlers forces earlier execution.
- Variable precedence
- Extra vars (-e) override all; then task vars, play vars, host_vars, group_vars, and role defaults lowest; within a level, more specific sources win.
- set_fact
- Module that creates or updates a host variable during a play; the value persists for later tasks and can combine registered output with Jinja2 expressions.
- register
- Task keyword storing a task's result in a variable; access fields such as stdout, stderr, rc, changed, and failed for conditionals or later tasks.
- when conditional
- Task or block keyword evaluating a Jinja2 expression without braces; the task runs only if the expression is true, commonly testing registered results or facts.
- loop keyword
- Repeats a task once per list item, exposing each item as the item variable; loop_control label reduces output verbosity for complex items.
- Role directory layout
- Standard structure with tasks/main.yml, handlers/main.yml, defaults/main.yml, vars/main.yml, files, templates, and meta; ansible-galaxy init creates the skeleton.
- authorized_key module
- Adds or removes SSH public keys in a user's authorized_keys file; parameters user, key, and state make SSH key distribution repeatable across managed nodes.
- lvg and lvol
- Modules that create volume groups and logical volumes; lvg defines a VG from physical devices, and lvol creates LVs with a specified size inside that VG.
- mount module
- Configures mounts in /etc/fstab and optionally activates them now; parameters path, src, fstype, opts, and state=present/mounted/absent control persistence.
- firewalld module
- Manages firewall rules through firewalld; specify service or port, zone, permanent=true to persist, and state=enabled or disabled; a reload may be needed.
- cron module
- Schedules recurring jobs in crontab; parameters name, minute, hour, day, month, weekday, job, and user control the entry, and state=absent removes the named job.
- template module
- Renders a Jinja2 template from templates/ to a destination on the managed node; supports variables, owner, group, and mode, and notifies handlers on change.