Applying Salt states to minions

In this recipe, we will learn how to synchronize minions with the master and apply the states to minions that are configured on the master.

How to do it...

We will perform both the push and the pull mechanisms for applying states to minions.

  1. Check if the minion has got automatically signed by the master:
    [root@salt-master ~]# salt-key -l accepted
    Accepted Keys:
    salt-minion
    

    If all the previous recipes were followed correctly, then the preceding output will be found and here salt-minion is the minion name whose key has been accepted.

  2. The communication between the master and the minion can be checked with a couple of Salt commands:
    [root@salt-master ~]# salt 'salt-minion' test.ping
    salt-minion:
        True
    
    [root@salt-master ...

Get Salt Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.