November 2016
Intermediate to advanced
378 pages
7h 36m
English
When building an SLS tree, the directory structure is only part of the equation. There are a number of strategies that can be employed in the SLS files, which will increase their ease of use and maintainability.
Like a number of modern languages and file formats, SLS files were designed to take advantage of code reuse. Rather than creating large, monolithic files, states can be broken down into smaller files, which can be combined together across multiple environments.
Consider the following partial SLS file:
iptables:
service:
- dead
httpd:
pkg:
- installed
service:
- running
/opt/codebase:
file.recurse:
- source: salt://codebase/files
Obviously, a production version of this would be far longer, but this short ...
Read now
Unlock full access