In this chapter, you learned how to make our states more flexible using Jinja2 templating. You learned the basic structures of Jinja2 and templated our apache state file so that it would run on both RedHat and Debian systems. You also learned how to define sensitive data in pillar and use that data in our states using Jinja2.
You now have all the tools you need to make flexible, modular states. In the next chapter, you'll learn how to better organize those files using topfiles in the state system, and you'll learn about environments in Salt.