Automation and setup for sites I own.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- resource "null_resource" "post_setup" {
- depends_on = [ linode_instance.prod ]
- connection {
- host = linode_instance.prod.ip_address
- user = "root"
- private_key = file("~/.ssh/id_rsa")
- }
- provisioner "remote-exec" {
- inline = [<<FIN
- apk update
- apk upgrade
- apk add iproute2 sqlite bind-tools tar xz
- sed -i -e 's/AllowTcpForwarding .*/AllowTcpForwarding yes/g' /etc/ssh/sshd_config
- rc-service sshd restart
- FIN
- ]
- }
- }
-
- resource "null_resource" "nginx_install" {
- depends_on = [ null_resource.post_setup ]
- connection {
- host = linode_instance.prod.ip_address
- user = "root"
- private_key = file("~/.ssh/id_rsa")
- }
- provisioner "remote-exec" {
- inline = [<<FIN
- flock -x /tmp/apk -c 'apk add nginx'
- apk add nginx muacme gitea iproute2 sqlite bind-tools tar xz
- rc-update add nginx default
- rc-service nginx restart
- FIN
- ]
- }
- }
-
- resource "null_resource" "uacme_install" {
- depends_on = [ null_resource.post_setup ]
- connection {
- host = linode_instance.prod.ip_address
- user = "root"
- private_key = file("~/.ssh/id_rsa")
- }
- provisioner "remote-exec" {
- inline = [<<FIN
- flock -x /tmp/apk -c 'apk add muacme'
- FIN
- ]
- }
- }
-
- resource "null_resource" "gitea_install" {
- depends_on = [ null_resource.post_setup ]
- connection {
- host = linode_instance.prod.ip_address
- user = "root"
- private_key = file("~/.ssh/id_rsa")
- }
- provisioner "remote-exec" {
- inline = [<<FIN
- flock -x /tmp/apk -c 'apk add gitea'
- FIN
- ]
- }
- }
|