CiscoDevNet / ansible-cml

17 stars 22 forks source link

Feature access node console #28

Open ppajersk opened 1 year ago

ppajersk commented 1 year ago

Use case: be able to access a nodes console and enter commands Commands could be used to access a node's data, or install services on a node and configure those services This module will use pyats

ppajersk commented 1 year ago

Pyats only supports python 3.10 so I'm currently running playbooks this way. Will update the documentation to include all the relevant imports necessary to ensure this runs.

ansible-playbook playbook_name.yaml -e 'ansible_python_interpreter=/opt/homebrew/bin/python3.10' (note: my python is installed in /opt/homebrew/bin)

ppajersk commented 1 year ago

Because pyats only supports python3.10

python3.10 -m pip install virl2_client python3.10 -m pip install pyats

These commands need to be run before this feature is usable. To run a playbook that uses the cml_node_connect module:

ansible-playbook sample-playbook.yml -e 'ansible_python_interpreter=/path/to/python3.10'