17. Ansible Galaxy

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.

Details

16. Ansible roles

Ansible roles allow you to classify your ansible components like variables, tasks, handler, template and files so that it can be easily shared with others and reused. In other words after you classify your content in roles, you can easily reuse them and share them with other users. Ansible roles is the topic of this video.

Details

15. Ansible tags

If you have a large playbook, it make sense to run certain parts of it instead of running the entire playbook especially in troubleshooting time. You can do this with Ansible tags. With tags, you don’t have to write a separate playbook just with those tasks that you want to run. Instead you run the entire playbook but with tags and only tasks with those tags will be run.

Details

14. Ansible Handler

Sometimes you want to run a task, with the condition that another task makes changes to the managed node. For example, you might want to save the configuration or retrieve a backup from a network device only when a configuration changes in network device. more practical examples are when managed nodes are servers. For example, you might want to restart a service like Apache only when the configuration of the service changes. If there are no changes in the Apache configuration file, you do not want to restart the service which disrupt the service. The solution in Ansible Handler, which is the topic of this video.

Details

13. Ansible with jinja2 Template Part 2

In the previous section we defined the Jinja2 template as a configuration file, but with variables that are replaced by device-specific values during the execution time of the playbook. We also saw that jinja2 template is more than just a variable substitution and we used a loop to substitute a list variable, list of networks in EIGRP configuration mode. In this section we would like to see some other features of jinja2 such as “if conditions” and also some other variable types that can be replaced during execution time.

Details

12. Ansible with jinja2 template to configure cisco devices

If you want to configure a lot of devices through Ansible and the configuration is the same but the parameters are different. then Ansible with jinja2 template comes into play, if you don’t want to write a different task for each device.. For example, you want to configure EIGRP in many routers, but the AS-number, router-ID and networks-numbers in EIGRP differ between the devices. Ansible with Jinga2 Template is the Topic of this video.

Details

10. Ansible variable types and methods for variable definition

Ansible variable types and methods of variable definition in Ansible are the subject of this video. We have already used variables in our Playbooks. For example, we have defined the folder name in which the backup files were stored as a variable or the credentials for connecting to devices also as variables in our backup playbooks. In this section we would like to get to know different variable types and how they are defined in ansible.

Details

9. Ansible Facts and conditional Tasks using when command

Ansible facts are metadata information of managed node to which we connect. A fact can be hostname, OS family, OS Version, IP address, and generally system’s software and hardware information. Ansible facts help the admin not only to store inventory information of the infrastructure but also to manage managed nodes based on their metadata information. For example, you might want to configure BGP of your gateway routers, but the configuration will be different depending on the operating system family of the device if it is IOS or IOS XR. or you want to configure EIGRP, but the router ID and network addresses differ depending on the device name. Using ansible_facts, we can collect metadata information from managed nodes and use the when condition to apply the configuration based on these information. “ansible_facts” and ansible “when” conditions is the topic this Video.

Details

8. ansible basic troubleshooting tools

In the Ansible for Cisco Network Engineers course we have seen how to use ansible ahdoc commands and also ansible playbook. Before we move on to more advanced topics in Ansible Playbook, there are a few simple troubleshooting tools that we can use to find and fix Playbook issues. In this section we look at these simple troubleshooting tools (ansible basic troubleshhooting tools).

Details