Ansible Galaxy is essentially a large public repository of Ansible roles. Galaxy contains a large number of roles that are constantly evolving and increasing. In other words, Ansible Galaxy allows you to share your own written roles with other users or use the roles that the other users have already uploaded to Ansible Galaxy.
access ansible codes of this course in github
this is a video-based training therefore the output of running commands are not show in the text.
At galaxy.ansible.com, you have access to about 28,000 resources shared by a community of approximately 30,000 people.
You can upload your roles through github repository.
About 1,330 of these resources relate to networking. The most popular ones, downloaded more often than the others, are Firewall, Junos, OpenVPN, and SNMP.
When I search for Cisco there are about 25 roles in the result and the most popular one is cisco_ise.
When I read the readme portion of this role, it shows that it does the basic configuration of cisco_ise. The source of the role is actually in github. You can download It directly from github or you can install it with ansible-galaxy install command.
# ansible-galaxy install maxrainer.cisco_ise
default installation path is /root/.ansible/roles which you can copy it to your own roles folder.
You can remove installed role with ansible-galaxy remove command.
# ansible-galaxy remove maxrainer.cisco_ise
You can also search roles by ansible-galaxy search command. If you search cisco by this commad, you can see that there are ansible roles related to cisco ios, ios_xr and also nxos.
# ansible-galaxy search cisco
with ansible-galaxy info command, you can read detail explanation of the ansible role and also github repository link.
# ansible-galaxy info ansible-network.cisco_nxos
ansible-galaxy list displays a list of installed roles.
# ansible-galaxy list
In the last video, we have also learned that “ansible-galaxy init” can be used to create a role template suitable for submission to Ansible Galaxy.
# ansible-galaxy init test