Conditionals — Ansible Documentation
docs.ansible.com › ansible › latest# main.yml-include_tasks: other_tasks.yml when: x is not defined # if condition is met, Ansible includes other_tasks.yml # other_tasks.yml-name: Set a variable ansible.builtin.set_fact: x: foo # no condition applied to this task, Ansible sets the value of x to foo-name: Print a variable ansible.builtin.debug: var: x # no condition applied to this task, Ansible prints the debug statement