Consider these tasks:
`
-
name: Gather facts about new VM
delegate_to: “{{ new_vm }}”
delegate_facts: true
setup:
register: host_info -
name: install prereqs
delegate_to: “{{ new_vm }}”
package:
name: “{{ item }}”
state: present
with_items: -
at
`
This results in:
TASK [provision_vm_and_set_ip : Gather facts about new VM] *********************
ok: [jenkins2 → 10.120.8.220]
TASK [provision_vm_and_set_ip : install prereqs] *******************************
failed: [jenkins2 → 10.120.8.220] (item=[u’at’]) => {“failed”: true, “item”: [“at”], “msg”: “Could not detect which package manager to use. Try gathering facts or setting the "use" option.”}
Why does the package task fail when the setup task appeared to pass?