Skip to content

Instantly share code, notes, and snippets.

@moreati
Last active March 14, 2026 17:31
Show Gist options
  • Select an option

  • Save moreati/d7cb1573e8f00dd320d6569bb35b5f61 to your computer and use it in GitHub Desktop.

Select an option

Save moreati/d7cb1573e8f00dd320d6569bb35b5f61 to your computer and use it in GitHub Desktop.
Table showing Ansible playbook keywords that can be used at play, role, block, or task level

Generated using development version of Ansible on 15 Sep 2024. Details may differ from released versions.

  Play Role Block Task
action       ✔
always     ✔  
any_errors_fatal ✔ ✔ ✔ ✔
args       ✔
async       ✔
become ✔ ✔ ✔ ✔
become_exe ✔ ✔ ✔ ✔
become_flags ✔ ✔ ✔ ✔
become_method ✔ ✔ ✔ ✔
become_user ✔ ✔ ✔ ✔
block     ✔  
changed_when       ✔
check_mode ✔ ✔ ✔ ✔
collections ✔ ✔ ✔ ✔
connection ✔ ✔ ✔ ✔
debugger ✔ ✔ ✔ ✔
delay       ✔
delegate_facts   ✔ ✔ ✔
delegate_to   ✔ ✔ ✔
diff ✔ ✔ ✔ ✔
environment ✔ ✔ ✔ ✔
fact_path ✔      
failed_when       ✔
force_handlers ✔      
gather_facts ✔      
gather_subset ✔      
gather_timeout ✔      
handlers ✔      
hosts ✔      
ignore_errors ✔ ✔ ✔ ✔
ignore_unreachable ✔ ✔ ✔ ✔
local_action       ✔
loop       ✔
loop_control       ✔
max_fail_percentage ✔      
module_defaults ✔ ✔ ✔ ✔
name ✔ ✔ ✔ ✔
no_log ✔ ✔ ✔ ✔
notify     ✔ ✔
order ✔      
poll       ✔
port ✔ ✔ ✔ ✔
post_tasks ✔      
pre_tasks ✔      
register       ✔
remote_user ✔ ✔ ✔ ✔
rescue     ✔  
retries       ✔
roles ✔      
run_once ✔ ✔ ✔ ✔
serial ✔      
strategy ✔      
tags ✔ ✔ ✔ ✔
tasks ✔      
throttle ✔ ✔ ✔ ✔
timeout ✔ ✔ ✔ ✔
until       ✔
vars ✔ ✔ ✔ ✔
vars_files ✔      
vars_prompt ✔      
when   ✔ ✔ ✔
with_<lookup_plugin>       ✔
  Play Role Block Task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment