Skip to content

Commit 51779bb

Browse files
committed
added firewall rules
1 parent 3689018 commit 51779bb

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

installation_scripts/install_salt_minion.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ gpgkey=https://repo.saltstack.com/yum/redhat/\$releasever/\$basearch/latest/SALT
3636
saltrepo
3737

3838
yum update -y
39-
yum install systemd systemd-python -y
39+
yum install systemd systemd-python firewalld -y
4040
}
4141

4242
prerequisites_debian() {
@@ -45,7 +45,7 @@ prerequisites_debian() {
4545

4646
apt-get upgrade -y
4747
apt-get update -y
48-
apt-get install systemd python-systemd -y
48+
apt-get install systemd firewalld python-systemd -y
4949
}
5050

5151
install_saltminion_centos() {
@@ -57,8 +57,12 @@ install_saltminion_debian() {
5757
}
5858

5959
configure_saltminion() {
60+
sed -i.bak "s/\#master\:\ salt/master\: $salt_master/g" /etc/salt/minion
61+
62+
firewall-cmd --zone=public --add-port=4506/tcp --permanent
63+
firewall-cmd --reload
64+
6065
systemctl enable salt-minion
61-
sed -i.bak "s/\#master\:\ salt/master\: $ip_address/g" /etc/salt/minion
6266
systemctl start salt-minion
6367
}
6468

@@ -71,3 +75,5 @@ elif [[ $os_type == "debian" || $os_type == "ubuntu" ]]; then
7175
prerequisites_debian
7276
install_saltminion_debian
7377
fi
78+
79+
configure_saltminion

0 commit comments

Comments
 (0)