The following playbook runs without any problem from command line --- - name: testing group_vars hosts: localhost connection: local gather_facts: false pre_tasks: - name: include services yaml files ansible.builtin.include_vars: dir: group_vars/services roles: - role: print-test but when I run this from packer ansible skip pre_tasks section we are using packer 1.8.3 since we are also using chef provisioner