Modify the following task to use a variable instead of the value "zlib" and have "zlib" as the default in case the variable is not defined
- name: Install a package
package:
name: "zlib"
state: present
Answer
- name: Install a package
package:
name: "{{ package_name|default('zlib') }}"
state: present