Vyos management using ansible


We are working on setting up ansible management of our various vyos routers. One thing that i’m struggling with is ssh key management.
For a normal debian or ubuntu install i’d take over managing the /home/username/.ssh/authorized_keys file, but for ansible the cli will overwrite that file.
I was hoping i could find something in the vyos.vyos ansible collection, but there doesn’t seem to be anything there other than the commands or config modules. Is this truely the best way? or what do others do?


Do you want to load key from ansible to vyos host?
Example Ansible — VyOS 1.4.x (sagitta) documentation

yes, and taking a closer look at that i figured out what i need to know.
Unfortunately, it looks like you need to re run the set commands for each key you want to add. I wish i could loop it somehow but i don’t see a good way to do so.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.