This gist provides a quick overview of deploying SSL certificates to servers using Salt. I use a wildcard certificate for our domain, which makes management easier.
- Start with
pillar_ssl-certificate.sls, which should be populated with your certificates and placed in Salt'spillar_rootsdirectory (typically/srv/pillar). - Place
state_ssl-certificate.slsin Salt'sfile_rootsdirectory (typically/srv/salt). - Include the contents of
top.slsin both the pillar and statetop.slsfile. (Modify for your minion IDs of course.)
Use pillars to distribute sensitive data, such as SSL certificates. Accoring to the [Salt Pillar Walkthrough][2]:
Information transferred via pillar is guaranteed to only be presented to the minions that are targeted, making Pillar suitable for managing security information, such as cryptographic keys and passwords.