
Salt Cookbook
By :

Managing SSH keys and the associated files is a key task that needs to be performed in most infrastructure at present to facilitate a number of functions with remote access between servers. Although this task can be achieved by propagating files to the minions using the file module, Salt has a better way to do it using SSH-specific modules. In this recipe, you will learn how to use these modules.
Configure two minions called salt-minion
and backup-server
. Configure the server_type
grain of salt-minion
to have the value app
and the backup server's value to be backup
.
Create a new state called sshauth
, and create two files inside this directory called pubkey.sls
and known_hosts.sls
. Also create a directory called sshkeys
inside the sshauth
directory.
We will assume that the groups
and users
modules, configured in the last recipe, have been applied on both the minions.
On the salt-minion
minion, change to the stg-app
user, and run the following...
Change the font size
Change margin width
Change background colour