From b7d560edcd3be05e885c96e09acddf42638e9f66 Mon Sep 17 00:00:00 2001 From: Bartosz Karwacki Date: Fri, 26 Nov 2021 14:25:25 +0100 Subject: [PATCH] aws gitea no ssh --- aws/db.yaml | 21 --------------------- aws/deploy.sh | 3 --- aws/main.tf | 2 -- aws/server.yaml | 21 --------------------- 4 files changed, 47 deletions(-) diff --git a/aws/db.yaml b/aws/db.yaml index e0b056d..02df09d 100644 --- a/aws/db.yaml +++ b/aws/db.yaml @@ -1,25 +1,4 @@ #cloud-config -# Add groups to the system -# Adds the ubuntu group with members 'root' and 'sys' -# and the empty group hashicorp. -groups: - - ubuntu: [root,sys] - - hashicorp - -# Add users to the system. Users are added after groups are added. -users: - - default - - name: terraform - gecos: terraform - shell: /bin/bash - primary_group: hashicorp - sudo: ALL=(ALL) NOPASSWD:ALL - groups: users, admin - lock_passwd: false - ssh_authorized_keys: - - ${rss_key} - - packages: - apt-transport-https - ca-certificates diff --git a/aws/deploy.sh b/aws/deploy.sh index 9834cb6..31aed51 100755 --- a/aws/deploy.sh +++ b/aws/deploy.sh @@ -1,8 +1,5 @@ #!/bin/bash cp ~/.aws/credentials ./credentials -ssh-keygen -t rsa -C "your_email@example.com" -f ./tf-cloud-init -q -N "" docker build -t gitea-aws . docker run -p 80:80 gitea-aws -rm tf-cloud-init -rm tf-cloud-init.pub rm credentials diff --git a/aws/main.tf b/aws/main.tf index f8ee21c..ab012e2 100644 --- a/aws/main.tf +++ b/aws/main.tf @@ -182,14 +182,12 @@ data "template_file" "user_data_server" { template = file("server.yaml") vars = { - rss_key = file("tf-cloud-init.pub"), private_ip = "${aws_instance.db.private_ip}:5432" } } data "template_file" "user_data_db" { template = file("db.yaml") vars = { - rss_key = file("tf-cloud-init.pub"), fes_address = aws_efs_mount_target.alpha.dns_name } } diff --git a/aws/server.yaml b/aws/server.yaml index 6d14fbd..e74f7d8 100644 --- a/aws/server.yaml +++ b/aws/server.yaml @@ -1,25 +1,4 @@ #cloud-config -# Add groups to the system -# Adds the ubuntu group with members 'root' and 'sys' -# and the empty group hashicorp. -groups: - - ubuntu: [root,sys] - - hashicorp - -# Add users to the system. Users are added after groups are added. -users: - - default - - name: terraform - gecos: terraform - shell: /bin/bash - primary_group: hashicorp - sudo: ALL=(ALL) NOPASSWD:ALL - groups: users, admin - lock_passwd: false - ssh_authorized_keys: - - ${rss_key} - - packages: - apt-transport-https - ca-certificates