diff options
author | clarkzjw <[email protected]> | 2022-12-12 10:58:43 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2022-12-12 10:58:43 -0800 |
commit | 16145f12002624f098be35b4108d38d9d23146df (patch) | |
tree | 96e15ffd3d4bbd2eb36fae0720d47487c8291c2d /rss.jinwei.me/config/roles/rss/tasks/main.yaml | |
parent | fe8cd972b5b72b8983c3f7fd6e7153c78ed278ea (diff) | |
download | jinwei.me-16145f12002624f098be35b4108d38d9d23146df.tar.gz |
config: start rss stack using docker-compose
Diffstat (limited to 'rss.jinwei.me/config/roles/rss/tasks/main.yaml')
-rw-r--r-- | rss.jinwei.me/config/roles/rss/tasks/main.yaml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/rss.jinwei.me/config/roles/rss/tasks/main.yaml b/rss.jinwei.me/config/roles/rss/tasks/main.yaml index 16091cb..070c48e 100644 --- a/rss.jinwei.me/config/roles/rss/tasks/main.yaml +++ b/rss.jinwei.me/config/roles/rss/tasks/main.yaml | |||
@@ -1,3 +1,35 @@ | |||
1 | - name: install packages | ||
2 | apt: | ||
3 | name: | ||
4 | - python3-pymysql | ||
5 | update_cache: true | ||
6 | |||
7 | - name: create ttrss database if not exists | ||
8 | community.mysql.mysql_db: | ||
9 | login_host: "{{ lookup('aws_ssm', '/jinwei-me/mysql/host') }}" | ||
10 | login_port: "{{ lookup('aws_ssm', '/jinwei-me/mysql/port') }}" | ||
11 | login_user: "{{ lookup('aws_ssm', '/jinwei-me/mysql/username') }}" | ||
12 | login_password: "{{ lookup('aws_ssm', '/jinwei-me/mysql/password') }}" | ||
13 | name: "{{ lookup('aws_ssm', '/jinwei-me/mysql/ttrss_db_name') }}" | ||
14 | state: present | ||
15 | |||
16 | - name: create ttrss database user | ||
17 | community.mysql.mysql_user: | ||
18 | login_host: "{{ lookup('aws_ssm', '/jinwei-me/mysql/host') }}" | ||
19 | login_port: "{{ lookup('aws_ssm', '/jinwei-me/mysql/port') }}" | ||
20 | login_user: "{{ lookup('aws_ssm', '/jinwei-me/mysql/username') }}" | ||
21 | login_password: "{{ lookup('aws_ssm', '/jinwei-me/mysql/password') }}" | ||
22 | name: "{{ lookup('aws_ssm', '/jinwei-me/mysql/ttrss_db_user') }}" | ||
23 | host: "*" | ||
24 | password: "{{ lookup('aws_ssm', '/jinwei-me/mysql/ttrss_db_password') }}" | ||
25 | priv: "{{ lookup('aws_ssm', '/jinwei-me/mysql/ttrss_db_name') }}.*:ALL" | ||
26 | state: present | ||
27 | |||
28 | - name: create rss_home | ||
29 | file: | ||
30 | path: "{{ rss_home }}" | ||
31 | state: directory | ||
32 | |||
1 | - name: render Dockerfile.rssbot | 33 | - name: render Dockerfile.rssbot |
2 | template: | 34 | template: |
3 | src: Dockerfile.rssbot.j2 | 35 | src: Dockerfile.rssbot.j2 |