Showing results for 
Search instead for 
Did you mean: 

Automate NSO Installation Using Ansible


Good Days,

Recently I installed NSO in few customers environments and I thought it would be helpful to automate the installation procedures instead of repeating it each time or PoC.

So I wrote Ansible module that take three inputs from user and take care of the rest

Variable NameUsage
ncs_package_nameThis is the name of NSO downloaded package (example: nso-4.4.linux.x86_64)
ncs_package_locationWhere you uploaded this package in linux server(example: /root/)
ncs_run_locationThe location of instantiated project from NSO installation (example: ncs-run or access_project)

Once you run the module (locally or via remote host), it will prepare the linux machine first with some settings (like disable selinux and firewalld services, install correct java version, update the cache..etc) then customize the bash profile with ncsrc file and finally install and run the NSO at the end

to run it, simply execute the below command on host that has ansible package installed

#ansible-playbook nso_demo.yml

if you need to run it in verbose mode to see the exact running commands, then add few "vvv" to the command

#ansible-playbook nso_demo.yml -vvv

Sample Output

Script Output


NSO Started


Please share any other ideas to automate the installation or NSO configuration.

Thank You


Bassim Aly


Does this perform a local or system install of NSO?

Judging by the variable "ncs_run_location" it is a local install, right?

Sorry, no time to test, so I thought I'd be quicker to just ask. Thx.

Hello Ian,

Actually it's a local install, I'm planning to add system install tag to ansible playbook

Cisco Employee

Hey, very cool.

As for other ideas, have you checked out the "nct" tool-set?

Cisco Employee

Hi Bassim,

Good initiative, do you think you could upload the module to the github repository in the forum?


I didnt try it yet, but for sure I will work and try to orchestrate it. Thank You for your feedback!

Sure Roque, I will create a pull request to github repo.

Cisco Employee

Do you have a link for the repo?

Cisco Employee

I'm actually working through the process to contribute some playbooks to DevNet.  In the meantime, this is the link:  GitHub - sbarvick-dd/nso-ansible-ops: A collection of Ansible playbooks for managing Cisco NSO installations