Gives you a possibility to distribute your ssh key on any Mikrotik device reached via a network.
Pre-requirements:
-
You need to have Mikrotik device with SSH service enabled (IP - Services)
-
Edit and enter your IP and credentials in ./inventory/hosts file
-
Generated or installed id.rsa.pub key in your $HOME/.ssh/ dir.
-
Install required RouterOS community modules from Ansible galaxy:
user@Ubuntu:~/mikrotik-ansible$ ansible-galaxy collection install -r requirements.yml
Run playbook by command:
user@Ubuntu:~/mikrotik-ansible$ ansible-playbook play.yml
TODO:
Creating backups. Update version.