ADD DNSDist(DoH DoT) service

This commit is contained in:
2023-05-22 14:51:55 +02:00
parent 9670b323c0
commit b5852d788d
11 changed files with 73 additions and 74 deletions

View File

@@ -1,40 +1,29 @@
---
- name: Add Yarn apt key
apt_key:
url: https://dl.yarnpkg.com/debian/pubkey.gpg
state: present
- name: Add Yarn Repository
apt_repository:
repo: deb https://dl.yarnpkg.com/debian/ stable main
state: present
- name: Install Yarn
apt:
name: yarn
state: present
- name: Add Nodejs apt key
apt_key:
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
state: present
- name: Add Nodes 12 repository
apt_repository:
repo: deb https://deb.nodesource.com/node_12.x buster main
state: present
- name: Install NodeJs
apt:
name: nodejs
state: present
- name: Install required by mastodon
apt:
name: "{{ requiredPackages }}"
state: present
- name: ensure postgresql is running
service:
name: postgresql
state: restarted
- name: Create postgresql User Mastodon
become: yes
become_user: postgres
shell: psql -c "CREATE USER mastodon CREATEDB;"
- name: Create Mastodon Database for restauration
become: yes
become_user: "{{ username }}"
shell: |
createdb -T template0 -E UTF8 mastodon_production
args:
executable: /bin/bash
when: restore == True
- name: Install Mastodon from git
become: yes
become_user: "{{ username }}"
@@ -44,24 +33,27 @@
eval "$(rbenv init -)"
git clone https://github.com/tootsuite/mastodon.git live
cd live
git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)
git checkout v"{{ mastodon_version }}"
gem install bundler --no-document
bundle config set deployment 'true'
bundle config set without 'development test'
bundle install
args:
executable: /bin/bash
- name: Exec yarn install
become: yes
become_user: "{{ username }}"
ignore_errors: True
shell: |
cd
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
cd live
yarn install --pure-lockfile --non-interactive
args:
executable: /bin/bash
- name: ensure postgresql is running
service:
name: postgresql
state: restarted
- name: Create postgresql Database
become: yes
become_user: postgres
shell: psql -c "CREATE USER mastodon CREATEDB;"
- name: Copy nginx configuration
copy: