Chapter 4. Configuration Management: Introduction
The previous chapters covered the basics: you learned how to install and configure the tools, and began working with the Salt CLI. Now that you have an understanding of those fundamentals, you can start diving into the configuration management and advanced templating capabilities of Salt.
Configuration management is among the most important tasks in the automation process, Salt’s built-in features simplify this process dramatically. It is essential that you have thoroughly reviewed the material covered in previous chpaters before proceeding with this one, as the concepts we’ve discussed previously play an important role in the configuration management methodologies discussed here. For the moment we will mainly use the CLI to apply simple configuration changes: it is important to understand and get comfortable with advanced Salt templating.
Loading Static Configuration
Let’s suppose we are at a point where our large-scale network does not have consistent configuration. Loading a static configuration change can come in very handy for such cases (see Example 4-1).
Example 4-1. Load static configuration changes
$sudo salt -G'vendor:arista'\net.load_config\text='ntp server 172.17.17.1'device2: ---------- already_configured: False comment: diff: @@ -42,6 +42,7 @@ ntp server 10.10.10.1 ntp server 10.10.10.2 ntp server 10.10.10.3 +ntp server 172.17.17.1 ntp serve all ! result: True
By executing net.load_config, you can load a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access