Skip to content

Commit e9f4814

Browse files
authored
Remove firewall for amazon linux (#164)
1 parent 788797b commit e9f4814

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

modules/tfe_init_replicated/templates/install_packages.func

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@ function install_packages {
55
# Description: Install AWS packages
66

77
%{ if distribution == "rhel" || distribution == "amazon-linux-2023" ~}
8-
echo "[$(date +"%FT%T")] [Terraform Enterprise] Install unzip and firewalld with yum" | tee -a $log_pathname
9-
yum install -y firewalld unzip
8+
echo "[$(date +"%FT%T")] [Terraform Enterprise] Install unzip with yum" | tee -a $log_pathname
9+
yum install -y unzip
1010

1111
%{ if distribution == "rhel" ~}
12+
echo "[$(date +"%FT%T")] [Terraform Enterprise] Install firewalld with yum" | tee -a $log_pathname
13+
yum install -y firewalld
14+
1215
# Amazon Linux 2023 already has amazon-ssm-agent so install on rhel only
1316
echo "[$(date +"%FT%T")] [Terraform Enterprise] Install ssm-agent with yum" | tee -a $log_pathname
1417
yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm
18+
19+
systemctl enable firewalld
20+
systemctl start firewalld
1521
%{ endif ~}
1622

1723
%{ if distribution == "amazon-linux-2023" ~}
@@ -26,8 +32,6 @@ function install_packages {
2632

2733
systemctl enable amazon-ssm-agent
2834
systemctl start amazon-ssm-agent
29-
systemctl enable firewalld
30-
systemctl start firewalld
3135
%{ else ~}
3236
echo "[$(date +"%FT%T")] [Terraform Enterprise] Install unzip with apt-get" | tee -a $log_pathname
3337
retry 10 apt-get update -y

0 commit comments

Comments
 (0)