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?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b6dc9908-6da3-4836-843b-0302189eb92f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to