The Code use for gathering Cisco Secure Endpoint Linux connector status by Ansible
This will export the output to the local of control machine to verify and validate the status of connector that might cannot connect to Cisco Secure Endpoint portal.
Requirements
Important
The control machine requires to reach the Linux machines via SSH version 2.
Your user should have right to run sudo.
The control machine requires to install Ansible.
The control machine requires to follow structure of folders of Ansible.
For this code, we use following structure of folders.
This code use username and password to authenticate on remote machines then run ansible-vault to create crypted credentials and keep in group_vars. In this code, we give example that you have different credentail in each group so that we created 3 type.yml
ansible-vault create group_vars/type1.yml
It will ask for New Vault password then create your own vault to protect credential. Then add following on it.
ansible_user: your_username #user to connect Linux machine on type X via SSH
ansible_password: your_password
You can create as much as you need if they using different credentails but need to link to hosts.
Create your hosts file, following is example as mentioned earlier need to link on your vault as we use type1 style then your hosts group by type1 style. Also, you can specific port of your SSH for some machines if not use standard.
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer: Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.