aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jinwei.me/config/roles/debian_init/tasks/main.yaml9
-rw-r--r--jinwei.me/config/site.yaml1
-rw-r--r--jinwei.me/infra/rds.tf1
-rw-r--r--jinwei.me/infra/variables.tf4
4 files changed, 15 insertions, 0 deletions
diff --git a/jinwei.me/config/roles/debian_init/tasks/main.yaml b/jinwei.me/config/roles/debian_init/tasks/main.yaml
index 48e8380..664d41c 100644
--- a/jinwei.me/config/roles/debian_init/tasks/main.yaml
+++ b/jinwei.me/config/roles/debian_init/tasks/main.yaml
@@ -12,6 +12,9 @@
12 - ca-certificates 12 - ca-certificates
13 - mariadb-client 13 - mariadb-client
14 - lsb-release 14 - lsb-release
15 - python3
16 - python3-dev
17 - python3-pip
15 - unzip 18 - unzip
16 - gnupg 19 - gnupg
17 - htop 20 - htop
@@ -50,6 +53,12 @@
50 state: latest 53 state: latest
51 update_cache: true 54 update_cache: true
52 55
56- name: Install Docker Module for Python
57 pip:
58 name:
59 - docker
60 - docker-compose
61
53- name: enable docker service 62- name: enable docker service
54 systemd: 63 systemd:
55 name: docker 64 name: docker
diff --git a/jinwei.me/config/site.yaml b/jinwei.me/config/site.yaml
index 3dbcc71..438033b 100644
--- a/jinwei.me/config/site.yaml
+++ b/jinwei.me/config/site.yaml
@@ -1,3 +1,4 @@
1- hosts: jinwei-me 1- hosts: jinwei-me
2 roles: 2 roles:
3 - role: debian_init 3 - role: debian_init
4 - role: wordpress
diff --git a/jinwei.me/infra/rds.tf b/jinwei.me/infra/rds.tf
index 6565332..381868e 100644
--- a/jinwei.me/infra/rds.tf
+++ b/jinwei.me/infra/rds.tf
@@ -6,6 +6,7 @@ resource "aws_db_parameter_group" "jinwei-me" {
6 6
7resource "aws_db_instance" "jinwei-me" { 7resource "aws_db_instance" "jinwei-me" {
8 identifier = var.name 8 identifier = var.name
9 db_name = var.rds_initial_db_name
9 instance_class = var.rds_instance_class 10 instance_class = var.rds_instance_class
10 allocated_storage = var.rds_storage 11 allocated_storage = var.rds_storage
11 engine = var.rds_engine 12 engine = var.rds_engine
diff --git a/jinwei.me/infra/variables.tf b/jinwei.me/infra/variables.tf
index 6745915..575b118 100644
--- a/jinwei.me/infra/variables.tf
+++ b/jinwei.me/infra/variables.tf
@@ -14,6 +14,10 @@ variable "region" {
14 14
15 15
16# RDS 16# RDS
17variable "rds_initial_db_name" {
18 default = "wordpress"
19}
20
17variable "rds_instance_class" { 21variable "rds_instance_class" {
18 default = "db.t3.micro" 22 default = "db.t3.micro"
19} 23}
Powered by cgit v1.2.3 (git 2.41.0)