Ch 29: Introduction to Automation Tools Flashcards
T/F: Configuring network components by using the CLI is considered the fastest approach when dealing with a large number of devices.
False.
Configuring a large number of devices by using the CLI is not only time- consuming but also leads to an increase in human error, ultimately putting the business at risk.
Which of these tools are agentless in operation? (Choose three.)
- Ansible
- Puppet Bolt
- SaltStack
- Chef
- Salt SSH
A, B, and E.
Ansible, Puppet Bolt, and Salt SSH all are agentless tools.
Which of the following are features of Ansible? (Choose two.)
a. Manifests
b. Modules
c. Playbooks
d. Tasks
e. Recipes
C and D.
Ansible uses playbooks, plays, and tasks.
What configuration management software is built on Python? (Choose two.)
a. Ansible
b. Chef
c. Puppet
d. SaltStack
A and D.
Ansible and SaltStack are built on Python and can leverage Python to programmatically interact with the tool.
Which of the following is a YAML example?
a.
{
“user”: “root”, “user”: “Jason”, “user”: “Jamie”, “user”: “Luke”
}
b.
HR Employee record
Employee1:
Name: John Dough
Title: Developer
Nickname: Mr. DBug
c.
root
Jason
Jamie
Luke
d.
[users[root|Jason|Jamie|Luke]]
B. This is a YAML structure.
A YAML file can also begin with three dashes (—).
What is the language associated with Chef?
a. Python
b. C++
c. Ruby
d. Q-Basic
e. Tcl
C.
Chef uses Ruby DSL for its cookbooks.
What are some of the benefits of Puppet Forge and GitHub? (Choose all that apply.)
- Keeping track of various versions of code
- Knowing which developers are involved with code revisions
- Collaborating with other developers and sharing code
- Increasing the speed in working on software projects
- Accessing a real-time telemetry software database
- Automatically blocking malicious code
A, B, C, and D.
Puppet Forge and GitHub can help with many different aspects of software delivery, including code revisions, associated developers, sharing of code, and becoming more agile in the development process.
What are the PPDIOO lifecycle components?
- Prepare, Plan, Design, Implement, Observe, Optimize
- Prepare, Plan, Design, Implement, Operate, Optimize
- Prepare, Plan, Design, Implement, Operate, Optimize
- Plan, Prepare, Design, Implement, Observe, Optimize
- Prepare, Plan, Design, Integrate, Observe, Optimize
B.
PPDIOO consists of six components: Prepare, Plan, Design, Implement, Operate, and Optimize. Figure 29-9 provides more information.
T/F: Ansible uses the TAML syntax, which starts with three dashes (—), in the creation of playbook files.
B. Ansible uses Yet Another Markup Language (YAML) for the creation of playbook files. TAML doesn’t exist.
What is the proper command to execute a playbook using Ansible?
- ansible-playbook ConfigureInterface.yaml
- ansible ConfigureInterface.yaml
- play ansible-book ConfigureInterface.yaml
- play ansible-book ConfigureInterface.taml
A.
ansible-playbook FileName.yaml is the correct command to execute a playbook.
Playbooks are built from Yet Another Markup Language (YAML) files.
Which of these tools are agent-based in operation? (Choose two.)
- Ansible
- Puppet Bolt
- SaltStack
- Chef
- Salt SSH
B and C.
Chef and SaltStack are agent-based tools.
EEM applets are composed of multiple building blocks. Two of the primary building blocks that make up EEM applets are _______ and _______.
EEM applets are composed of multiple building blocks. This chapter focuses on two of the primary building blocks that make up EEM applets: events and actions.
EEM applets use a similar logic to the if-then statements used in some of the common program- ming languages (for instance, if an event happens, then an action is taken). The following example illustrates a very common EEM applet that is monitoring syslog messages on a router.
What is TcL?
The Cisco IOS Tcl shell was designed to allow customers to run Tcl commands directly from the Cisco IOS CLI prompt. Cisco IOS software does contain some subsystems such as Embedded Syslog Manager (ESM) and Interactive Voice Response (IVR) that use Tcl interpreters as part of their implementation. These subsystems have their own proprietary commands and keyword options that are not available in the Tcl shell.
Several methods have been developed for creating and running Tcl scripts within Cisco IOS software. A Tcl shell can be enabled, and Tcl commands can be entered line by line. After Tcl commands are entered, they are sent to a Tcl interpreter. If the commands are recognized as valid Tcl commands, the commands are executed and the results are sent to the tty. If a command is not a recognized Tcl command, it is sent to the Cisco IOS CLI parser. If the command is not a Tcl or Cisco IOS command, two error messages are displayed. A predefined Tcl script can be created outside of Cisco IOS software, transferred to flash or disk memory, and run within Cisco IOS software. It is also possible to create a Tcl script and precompile the code before running it under Cisco IOS software.
What does the attached EEM script do?
Example 29-1 shows an applet that is looking for a specific syslog message, stating that the Loopback0 interface went down. The specific syslog message is matched using regular expressions. This is a very powerful and granular way of matching patterns. If this specific syslog pattern is matched (an event) at least once, then the following actions will be taken:
- The Loopback0 interface will be shut down and brought back up (because of shutdown and no shutdown).
- The router will generate a syslog message that says, “I’ve fallen, and I can’t get up!”
- An email message that includes the output of the show interface loopback0 command will be sent to the network administrator.
NOTES:
Remember to include the enable and configure terminal commands at the begin- ning of actions within an applet. This is necessary as the applet assumes the user is in exec mode, not privileged exec or config mode. In addition, if AAA command authorization is being used, it is important to include the event manager session cli username username command. Otherwise, the CLI commands in the applet will fail.
It is also good practice to use decimal labels similar to 1.0, 2.0, and so forth when building applets. This makes it possible to insert new actions between other actions in the future. For example, you could insert a 1.5 action between the 1.0 and 2.0 actions. Remember that labels are parsed as strings, which means 10.0 would come after 1.0, not 9.0.
What is the command used to debug EEM?
Based on the output from the debug event manager action cli command, you can see the actions taking place when the applet is running.
Example 29-2 shows the applet being engaged when a user issues the shutdown command on the Loopback0 interface. It also shows that an error occurred when trying to connect to the SMTP server to send the email to the administrator. This is because the SMTP server being used for this test is not configured.
Notice that because the $_cli_result keyword was used in the configuration, the output will include the output of any CLI commands that were issued in the applet. In this case, the output of the show interface loopback0 command will be included in the debugging and in the email message.