ansible-pull: what does `fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “one of the following is required: name, list”}` mean?

355 views
Skip to first unread message

Ron Barak

unread,
Aug 22, 2018, 1:06:15 PM8/22/18
to Ansible Project

What does the following message mean?


fatal: [localhost]: FAILED! => {"changed": false, "msg": "one of the following is required: name, list"}


The scenario:


I run:


$ sudo ansible-pull -C ${user}/ansible -U https://github.com/${user}/${company}/ansible.git


I get:


Starting Ansible Pull at 2018-08-22 09:31:09
/bin/ansible-pull -C ${user}/ansible -U https://github.com/${user}/${company}/ansible.git
 [WARNING]: Could not match supplied host pattern, ignoring: main
localhost  [WARNING]| SUCCESS : Your git=> {
    " version iafter": "fs too old 737822b1d4to fully s01e8f0c3b3upport the1a033be175 depth argcc1634b1c"ument.
Fal, 
    "beling back fore": "f7to full ch37822b1d40eckouts.
1e8f0c3b31a033be175cc1634b1c", 
    "changed": false, 
    "remote_url_changed": false
}
 [WARNING]: provided hosts list is empty, only localhost is available. Note
that the implicit localhost does not match 'all'
 [WARNING]: Could not match supplied host pattern, ignoring: main

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [update repositories] *****************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "one of the following is required: name, list"}
    to retry, use: --limit @/root/.ansible/pull/main/local.retry

PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1  


Where:


$ cat local.yml 
- hosts: localhost
  become: true
  pre_tasks:
    - name: update repositories
      yum: update_cache=yes
      changed_when: False

  tasks:
    - include: tasks/packages.yml


And


$ cat tasks/packages.yml
  - name: Install packages
    yum: name={{item}}
    with_items:
    - vim
    - htop
    - mc
    - byobu

vinoth kumar

unread,
Aug 23, 2018, 7:38:09 AM8/23/18
to ansible...@googlegroups.com
HI Ron,

why don't you use name=* update_cache=yes in pre task, also I think you forget to add a state in tasks/packages.yml where there is no action in play.

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2d56c418-319f-4472-8600-09cf41631153%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages