- name: Load package variables include_vars: file: packages.yml - name: Install global packages using YUM become: true yum: state: latest name: "{{ item }}" with_items: - "{{ packages_global }}" - "{{ packages_yum }}"