aws gitea no ssh

This commit is contained in:
Bartosz Karwacki 2021-11-26 14:25:25 +01:00
parent bcf868a621
commit b7d560edcd
4 changed files with 0 additions and 47 deletions

View File

@ -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

View File

@ -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

View File

@ -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
}
}

View File

@ -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