Zaldy B schrieb am 23.04.20 um 05:45: > HI Brian, > > Thank you for the reply. > > I did the 5v's as you mentioned, and dont know why it is saying that the > hosts does not match. > > TEMPLATES]# cp IOS_telnet.yaml /etc/ansible/ > [root@spm6637 TEMPLATES]# ansible-playbook -i Cisco_Telnet IOS_telnet.yaml
Zaldy,
-i is not to be followed by a hostname the playbook will be excuted on,
but by an inventory list (either a file name or a host list). You have
to specify the hosts file here, at least that is what the first WARNING
is about
> [WARNING]: Unable to parse /etc/ansible/TEMPLATES/Cisco_Telnet as an
> inventory source
The rest is a follow-up error: since the mentioned inventory list has
not been found, there is no 'all' host group and no host other than
'localhost' at all.
> [WARNING]: No inventory was parsed, only implicit localhost is available
> [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: Cisco_Telnet
My proposal: you should skip the "-i Cisco_Telnet" part of the
commandline and instead put the hostname inside the playbook.
>
> PLAY [Telnet do show version for IOS]
> ***********************************************************************************************************************
> skipping: no hosts matched
>
> PLAY RECAP
> **************************************************************************************************************************************************
>
>
> I tried pinging it, and it was successful.
>
> TEMPLATES]# ansible Cisco_Telnet -m ping
> d2c2e-be-ag249-o | SUCCESS => {
> "changed": false,
> "ping": "pong"
>
>
> TEMPLATES]# ansible --list-host Cisco_Telnet
> hosts (1):
> d2c2e-be-ag249-o
>
>
>
> On Tuesday, April 21, 2020 at 1:04:54 AM UTC-4, Brian Coca wrote:
>>
>> for telnet use 5 v's (-vvvvv) , 3 won't show anything about the task.
>>
>>
>> --
>> ----------
>> Brian Coca
>>
>>
>
--
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/1076f1ca-5cf1-802a-78b4-79dae3b611fe%40ufz.de.
smime.p7s
Description: S/MIME Cryptographic Signature
