playbooks are all right (playbook fails cause hosts are not real btw).
ansible-playbook test.yml -i hosts --limit ~host1
PLAY
***************************************************************************
TASK [setup]
*******************************************************************
fatal: [host1]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH
encountered an unknown error during the connection. We recommend you re-run
the command using -vvvv, which will enable SSH debugging output to help
diagnose the issue", "unreachable": true}
fatal: [host10]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH
encountered an unknown error during the connection. We recommend you re-run
the command using -vvvv, which will enable SSH debugging output to help
diagnose the issue", "unreachable": true}
PLAY RECAP
*********************************************************************
host1 : ok=0 changed=0 unreachable=1 failed=0
host10 : ok=0 changed=0 unreachable=1 failed=0
-----
ansible-playbook test.yml -i hosts
PLAY
***************************************************************************
TASK [setup]
*******************************************************************
fatal: [host3]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH
encountered an unknown error during the connection. We recommend you re-run
the command using -vvvv, which will enable SSH debugging output to
help diagnose the issue", "unreachable": true}
fatal: [host2]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH
encountered an unknown error during the connection. We recommend you re-run
the command using -vvvv, which will enable SSH debugging output to
help diagnose the issue", "unreachable": true}
fatal: [host1]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH
encountered an unknown error during the connection. We recommend you re-run
the command using -vvvv, which will enable SSH debugging output to
help diagnose the issue", "unreachable": true}
fatal: [host4]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH
encountered an unknown error during the connection. We recommend you re-run
the command using -vvvv, which will enable SSH debugging output to
help diagnose the issue", "unreachable": true}
fatal: [host5]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH
encountered an unknown error during the connection. We recommend you re-run
the command using -vvvv, which will enable SSH debugging output to
help diagnose the issue", "unreachable": true}
fatal: [host6]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH
encountered an unknown error during the connection. We recommend you re-run
the command using -vvvv, which will enable SSH debugging output to
help diagnose the issue", "unreachable": true}
fatal: [host7]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH
encountered an unknown error during the connection. We recommend you re-run
the command using -vvvv, which will enable SSH debugging output to help
diagnose the issue", "unreachable": true}
fatal: [host10]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH
encountered an unknown error during the connection. We recommend you re-run
the command using -vvvv, which will enable SSH debugging output to
help diagnose the issue", "unreachable": true}
fatal: [host8]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH
encountered an unknown error during the connection. We recommend you re-run
the command using -vvvv, which will enable SSH debugging output to
help diagnose the issue", "unreachable": true}
fatal: [host9]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH
encountered an unknown error during the connection. We recommend you re-run
the command using -vvvv, which will enable SSH debugging output to
help diagnose the issue", "unreachable": true}
PLAY RECAP
*********************************************************************
host1 : ok=0 changed=0 unreachable=1 failed=0
host10 : ok=0 changed=0 unreachable=1 failed=0
host2 : ok=0 changed=0 unreachable=1 failed=0
host3 : ok=0 changed=0 unreachable=1 failed=0
host4 : ok=0 changed=0 unreachable=1 failed=0
host5 : ok=0 changed=0 unreachable=1 failed=0
host6 : ok=0 changed=0 unreachable=1 failed=0
host7 : ok=0 changed=0 unreachable=1 failed=0
host8 : ok=0 changed=0 unreachable=1 failed=0
host9 : ok=0 changed=0 unreachable=1 failed=0
---------
ansible-playbook test.yml -i hosts --limit host4
PLAY
***************************************************************************
TASK [setup]
*******************************************************************
fatal: [host4]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH
encountered an unknown error during the connection. We recommend you re-run
the command using -vvvv, which will enable SSH debugging output to help
diagnose the issue", "unreachable": true}
PLAY RECAP
*********************************************************************
host4 : ok=0 changed=0 unreachable=1 failed=0
On Wednesday, January 13, 2016 at 1:03:42 PM UTC, James Cammarata wrote:
>
> Are you seeing this just with --list-hosts or are you seeing it when
> running a playbook too?
>
> James Cammarata
> Director, Ansible Core Engineering
> github: jimi-c
>
> On Wed, Jan 13, 2016 at 6:56 AM, Mike Christofilopoulos <[email protected]
> <javascript:>> wrote:
>
>> im creating my hosts file with
>>
>> for f in $(seq 1 10); do echo "host$f" >> hosts; done
>>
>> and then try to list hosts with
>>
>>
>> ansible all -i hosts --limit ~host1 --list-hosts
>>
>> with this result
>>
>> hosts (10):
>> host1
>> host2
>> host3
>> host4
>> host5
>> host6
>> host7
>> host8
>> host9
>> host10
>>
>>
>> Also non regex limit reutnrs
>>
>> ansible all -i hosts --limit host4 --list-hosts
>> hosts (10):
>> host1
>> host2
>> host3
>> host4
>> host5
>> host6
>> host7
>> host8
>> host9
>> host10
>>
>>
>> I've tried googling but nothing came up. Has there been any changes ?
>>
>> ansible 2.0.0.0
>> config file = /etc/ansible/ansible.cfg
>> configured module search path = /usr/share/ansible
>>
>> and i've installed itwith `pip install --user ansible --upgrade`.
>>
>>
>> Cheers,
>> Mike
>>
>> --
>> 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] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/81a1731f-957c-48ed-8aa8-19aec8820926%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/ansible-project/81a1731f-957c-48ed-8aa8-19aec8820926%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
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/62f62bf8-7bbd-415b-bd90-f120dc2aadb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.