aser_ Posted May 16, 2025 Posted May 16, 2025 Приветствую, Уважаемые! Подскажите, кому-нибудь удалось победить такую связку? Хотя бы show running-config через ansible.netcommon.telnet. Прошивки железок 3.0.0.45 (.35), ansible 2.10.17. Вставить ник Quote
aser_ Posted June 18, 2025 Author Posted June 18, 2025 (edited) Расковырял через боль и expect в итоге. Как минимум, работает в ручном запуске playbook-а. --- - hosts: allied_sw gather_facts: false connection: local serial: 1 vars: full_path: /opt/configs/temp tasks: - name: show run ignore_errors: true expect: command: ssh "{{ inventory_hostname }}" echo: yes responses: User Name: "{{ ansible_user }}" Password: "{{ ansible_password }}" (.*)#(.*): - "terminal datadump\n" - "show running-config\n" - "exit\n" timeout: 120 register: conf - name: write conf in file copy: content={{ conf.stdout }} dest={{ full_path }}/{{ inventory_hostname }}.cfg Edited June 18, 2025 by aser_ Вставить ник Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.