mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Place minion keys in minion sub-directory if it exists
This commit is contained in:
parent
9f405012b2
commit
d9e63880f6
1 changed files with 11 additions and 4 deletions
|
@ -858,14 +858,21 @@ config_minion() {
|
|||
# Copy the minions configuration if found
|
||||
[ -f "$TEMP_CONFIG_DIR/minion" ] && mv "$TEMP_CONFIG_DIR/minion" /etc/salt
|
||||
|
||||
PKI_DIR=/etc/salt/pki
|
||||
|
||||
# Minion keys moved to minion directory in Salt 0.11.0
|
||||
if [[ -d $PKI_DIR/minion ]]; then
|
||||
PKI_DIR=$PKI_DIR/minion
|
||||
fi
|
||||
|
||||
# Copy the minion's keys if found
|
||||
if [ -f "$TEMP_CONFIG_DIR/minion.pem" ]; then
|
||||
mv "$TEMP_CONFIG_DIR/minion.pem" /etc/salt/pki
|
||||
chmod 400 /etc/salt/pki/minion.pem
|
||||
mv "$TEMP_CONFIG_DIR/minion.pem" $PKI_DIR/
|
||||
chmod 400 $PKI_DIR/minion.pem
|
||||
fi
|
||||
if [ -f "$TEMP_CONFIG_DIR/minion.pub" ]; then
|
||||
mv "$TEMP_CONFIG_DIR/minion.pub" /etc/salt/pki
|
||||
chmod 664 /etc/salt/pki/minion.pub
|
||||
mv "$TEMP_CONFIG_DIR/minion.pub" $PKI_DIR/
|
||||
chmod 664 $PKI_DIR/minion.pub
|
||||
fi
|
||||
}
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue