Управление Eltex vESR через модули Ansible от Cisco

В июне 2023 года российский разработчик и производитель телекоммуникационного оборудования Eltex представил виртуальный сервисный маршрутизотор vESR, доступный для бесплатного тестированя в базовой версии. Конфигурационные команды схожи с Cisco, и при небольших изменениях кода модули Ansible ios_command и ios_config тоже успешно работают. Для этого надо поменять (у меня Ansible установлен в домашнем каталоге пользователя): в файле ~/.local/lib/python3.10/dist-packages/ansible_collections/cisco/ios/plugins/cliconf/ios.py в строке self.send_command("configure terminal") выражение "configure terminal" на "configure" в файле ~/.local/lib/python3.10/dist-packages/ansible_collections/cisco/ios/plugins/terminal/ios.py в строке self....

October 29, 2023

Starting a production Django server

I wrote ansible playbook for starting up a production Django server with PostgreSQL, Gunicorn and Nginx. When I tested the script, I used the Ubuntu Server image from this link. All I needed to install additionally was an ssh server for ansible to work. sudo apt update && sudo apt upgrade sudo apt install openssh-server I used a VirtualBox image and set the network settings to bridge mode. The IP address was obtained via the dhcp protocol....

October 15, 2021

Start Ansible for Docker containers

For some pet projects, I need multiple instances of different servers. The best way is to use Docker. And the best way to automate configuration services that run in docker containers is Ansible. This is the sequence of steps to run Ansible to configure containerized services in Ubuntu. Installing Docker Engine on Ubuntu is very well described on the official website. A summary of the steps: sudo apt-get update sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common curl -fsSL https://download....

September 19, 2020

Управление роутером в GNS3 с Ansible в Windows

В Windows запущен GNS3 с роутером, доступным по telnet (ip 192.168.2.2), установлена Ubuntu в WSL. Как управлять роутером через Ansible? Ставим Ansible sudo apt install ansible Создаем файлы в домашнем каталоге myhosts [cisco-routers] 192.168.2.2 ansible.cfg [defaults] inventory = ./myhosts gathering = explicit telnet_command_show_ver.yml (логин без ввода имени пользователя) --- - name: Run show command on routers hosts: cisco-routers tasks: - name: run show commands telnet: login_prompt: "Password: " password: cisco prompts: - "[>#]" command: - terminal length 0 - show version Выполняем...

April 3, 2020