Ansible Serial Console For Mac
My team and i are looking to build a project using Ansible related to Cisco peripherials. Before we start, we would like to be aware of the limitations. My greatest concern is that if set to factory defaults, i recall Cisco peripherials do not have SSH enabled, and therefore cannot be configured via SSH, but only via console connexion.
Ansible Serial Console For Mac Free
Is it possible to configure Ansible to run via console connexion (serial interface, iirc)? I guess all it would do is connect directly and dump a premade config and reboot, but if it can it would reduce a 2 step automation to a flawless, satisfying singular step. The problem you are running into is not isolated to Cisco Routers and Switches.
Because Ansible module's may only return JSON data, PyEZ's native return. A value of serial results in a NETCONF over serial console connection to the. Not every developer in an organization should probably have access to the serial console by default, so during the beta test, Microsoft decided that only users who have “VM Contributor” or higher privileges to the virtual machines should be able to access the serial console.
In order to configure almost any piece of infrastructure that you'll typically see deployed you first need to apply a base configuration before you can start the automation process. I normally work with with NX-OS devices so its been 5+ years since I have touched an IOS device in any meaningful way. That being said, at a minimum you will need to configure both the management IP address and SSH in order to connect to the switch. If you would like to stick with the serial port option, which traditionally is how you complete the initial configuration, you would need to find a module that has the ability to interact with the serial port. I personally have not seen any but a quick search turns up which you would be able to use to create a custom Ansible module. Depending on your environment, I would recommend looking at utilizing a remote console switch instead.
If you're not familar with those you connect the console port of the IOS device to a port on the remote console switch and then SSH into the remote console switch and access the CLI as if you were directly connected through the serial port. Again, you'll need a custom module (if there is one not already out there) that utilizes to SSH into the console switch and then send the relevant commands to complete the initial device configuration. In both cases you may need to develop a custom module, which is pretty straight forward, but the remote console switch allows you to access and configure the switch from the comfort of your desk or through the 'cloud'. It also scales a lot better. One the initial configuration is complete you can then utilize the to complete your configuration.