Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (18 sloc) 967 Bytes

salt-key-accepter

This script will auto accept key requests from machines in the allow_ip_cidrs list.

Thanks to MatthewT1 for the help debugging.

Requirements

On your salt-master, install: incron (part of inotify).

Once install, you can edit your inotify jobs with incrontab -e. Here's my incrontab -l:

/etc/salt/pki/master/minions_pre IN_CREATE /usr/bin/env /usr/bin/python /usr/local/git/salt-key-accepter.py $@ $#

Usage

Just set the following two variables:

allowed_ip_cidrs

A list of IP subnets in CIDR notation.

salt_master_config

The path to your salt master config file.