Could you please state clearly ALL of the below:
- What goal you are trying to achieve.
- How you are doing this.
- What problems you encounter.
- Which command did you run, and what actual output did you get from
that (copied as plain text - not as images, attachments, or
screenshots).
- What the relevant tasks/playbooks/code/variables look like.
thx
On Wed, 4 Mar 2020 at 16:52, Meyna88 <
meyn...@gmail.com> wrote:
>
> inventory:
>
> [local]
> localhost
>
> [switch:children]
> hosts
>
> [hosts]
> sw host=xx.xx.xx.xx
>
>
> [switch:vars]
> username = xxx
> password = xxx
> password_enable = xxx
> ansible_connection = network_cli
> ansible_network_os = ios
> ansible_user = xxx
> ansible_password = xxx
> ansible_become = yes
> ansible_become_method = enable
>
>
>
> Le mercredi 4 mars 2020 14:45:18 UTC+1, Meyna88 a écrit :
>>
>> Bonjour;
>>
>> Lorsque j'essaie d'exécuter playbook via une connexion network_cli, je reçois toujours les erreurs suivantes: AnsibleConnectionFail ure [Errno -2] Nom ou service inconnu
>> J'ai besoin de vos suggestions.
>>
>> Rapport d'erreur
>>
>> Nom du composant:
>>
>> connexion: network_cli
>>
>>
>>
>> Version:
>> ansible 2.7.6
>> config file = /etc/ansible/cisco/test/paramiko/ansible.cfg
>> chemin de recherche du module configuré = [u '/ etc / ansible / ntc-ansible / ntc-ansible / library']
>> emplacement du module python ansible = /usr/lib/python2.7/site- packages / ansible
>> emplacement exécutable = / bin / ansible
>> version python = 2.7.5 (par défaut, 7 août 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
>>
>> Environnement:
>>
>> Système d'exploitation Ansible: système d'
>> exploitation géré Red Hat Linux : Cisco IOS
>>
>>
>>
>> Utilisation de la connexion: network_cli déclenche AnsibleConnectionFailure [ Errno -2] Nom ou service inconnu
>>
>>
>>
>> Définition de ansible.conf
>>
>> [paramiko_connection]
>> look_for_keys=False
>>
>>
>> Playbook :
>>
>> - name: Cisco Catalyse
>> hôtes: hôtes
>> recueillir_facts: non
>>
>> dans lesquels:
>> compliant_ios_version: xxx
>> ansible_python_interpreter: /usr/bin/python3.6
>>
>> Tâches:
>> - nom: faits cisco
>> ios_facts:
>>
>> - nom: copie de l'image au flash
>> ios_command:
>> commander:
>> - "copie sftp: //XXX/XXX.bin bootflash:"
>> dans lesquels:
>> ansible_command_timeout: 18000
>> delay_factor: 12
>>
>>
>> group_vars: hosts.yml
>>
>> ansible_network_os: ios
>> ansible_user: utilisateur
>> ansible_pass: mot de passe
>> ansible_connection: network_cli
>> ansible_become_method: activer
>> ansible_become: oui
>>
>>
>> Résultats actuels:
>>
>>
>> Le retraçage complet est:
>> Traceback (dernier appel le plus récent):
>> Fichier "/ bin / ansible-connection", ligne 106, au début
>> self.connection._connect ()
>> Fichier "/usr/lib/python2.7/site- packages / ansible / plugins / connection / network_cli.py", ligne 307, dans _connect
>> ssh = self.paramiko_conn._connect ()
>> Fichier "/usr/lib/python2.7/site- packages / ansible / plugins / connection / paramiko_ssh.py", ligne 250, dans _connect
>> self.ssh = SSH_CONNECTION_CACHE [cache_ key] = self._connect_uncached ()
>> Fichier "/usr/lib/python2.7/site- packages / ansible / plugins / connection / paramiko_ssh.py", ligne 370, dans _connect_uncached
>> augmenter AnsibleConnectionFailure (msg)
>> AnsibleConnectionFailure: [Errno -2] Nom ou service inconnu
>>
>> fatal: [cisco]: ÉCHEC! => {
>> "msg": "[Errno -2] Nom ou service inconnu"
>>
> --
> 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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b9897d94-e6d9-46e7-896a-88e7629ee7e8%40googlegroups.com.