- name: Set loader to YAML for task foo set_loader: loader: yaml when: "'foo' in inventory_hostname" tasks: - name: Load data for foo include_vars: file: "{{ inventory_hostname }}.yml"In this example, the `set_loader` task sets the loader to YAML for the task named `foo`. If the inventory hostname contains the string `foo`, then a separate task named `Load data for foo` is executed using the `include_vars` module to load data from a YAML file named after the inventory hostname. The package library used in this example is `yaml`, which is a popular package for working with YAML data in Python. The `set_loader` task allows the user to specify which package or library to use for loading data, making it a versatile tool for working with different data formats in Ansible.