Remove obsolete gitea roles
This commit is contained in:
parent
b02af6f9e6
commit
ba2770c696
12 changed files with 0 additions and 372 deletions
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
gitea_url: >-
|
||||
{{
|
||||
"https://dl.gitea.com/gitea/" + gitea_version + "/gitea-" +
|
||||
gitea_version + "-" + ansible_system | lower + "-amd64"
|
||||
}}
|
|
@ -1,16 +0,0 @@
|
|||
[Unit]
|
||||
Description=Gitea (Git with a cup of tea)
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=gitea
|
||||
Group=gitea
|
||||
WorkingDirectory=/srv/gitea
|
||||
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
|
||||
Restart=always
|
||||
Environment=HOME=/srv/gitea GITEA_WORK_DIR=/srv/gitea
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
- name: Restart gitea
|
||||
ansible.builtin.service:
|
||||
name: gitea
|
||||
state: restarted
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
dependencies:
|
||||
- {role: git}
|
||||
- {role: nginx}
|
|
@ -1,101 +0,0 @@
|
|||
---
|
||||
- name: Download binary
|
||||
ansible.builtin.get_url:
|
||||
url: "{{ gitea_url }}"
|
||||
checksum: "sha256:{{ gitea_url }}.sha256"
|
||||
dest: /usr/local/bin/gitea
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart gitea
|
||||
|
||||
- name: Create group
|
||||
ansible.builtin.group:
|
||||
name: gitea
|
||||
gid: 303
|
||||
|
||||
- name: Create user
|
||||
ansible.builtin.user:
|
||||
name: gitea
|
||||
comment: Service Gitea
|
||||
createhome: false
|
||||
group: gitea
|
||||
home: /var/empty
|
||||
shell: /sbin/nologin
|
||||
uid: 303
|
||||
|
||||
- name: Create config directory
|
||||
ansible.builtin.file:
|
||||
path: /etc/gitea
|
||||
state: directory
|
||||
mode: "0750"
|
||||
owner: root
|
||||
group: gitea
|
||||
|
||||
- name: Create config
|
||||
ansible.builtin.template:
|
||||
dest: /etc/gitea/app.ini
|
||||
src: app.ini.j2
|
||||
mode: "0640"
|
||||
owner: root
|
||||
group: gitea
|
||||
notify: Restart gitea
|
||||
|
||||
- name: Create data directory
|
||||
ansible.builtin.file:
|
||||
path: /export/gitea
|
||||
state: directory
|
||||
mode: "0750"
|
||||
owner: gitea
|
||||
group: gitea
|
||||
|
||||
- name: Link data directory
|
||||
ansible.builtin.file:
|
||||
path: /srv/gitea
|
||||
state: link
|
||||
src: /export/gitea
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
follow: false
|
||||
|
||||
- name: Create service file
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/systemd/system/gitea.service
|
||||
src: gitea.service
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart gitea
|
||||
|
||||
- name: Enable service
|
||||
ansible.builtin.service:
|
||||
name: gitea
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Allow nginx to connect gitea
|
||||
ansible.posix.seboolean:
|
||||
name: httpd_can_network_connect
|
||||
state: true
|
||||
persistent: true
|
||||
|
||||
- name: Copy nginx config
|
||||
ansible.builtin.copy:
|
||||
dest: "/etc/nginx/conf.d/{{ inventory_hostname }}/gitea.conf"
|
||||
content: |
|
||||
client_max_body_size 100m;
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
}
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart nginx
|
||||
|
||||
- name: Add gitea alias for root
|
||||
ansible.builtin.blockinfile:
|
||||
path: /root/.bashrc
|
||||
block: |
|
||||
# run gitea as gitea user
|
||||
alias gitea='sudo -u gitea HOME=/srv/gitea GITEA_WORK_DIR=/srv/gitea \
|
||||
/usr/local/bin/gitea -c /etc/gitea/app.ini'
|
|
@ -1,80 +0,0 @@
|
|||
APP_NAME = foo.sh - GIT
|
||||
RUN_USER = gitea
|
||||
RUN_MODE = prod
|
||||
|
||||
[database]
|
||||
DB_TYPE = mysql
|
||||
HOST = sqldb02.home.foo.sh
|
||||
NAME = gitea
|
||||
USER = gitea
|
||||
PASSWD = {{ gitea_mysql_pass }}
|
||||
SCHEMA =
|
||||
SSL_MODE = true
|
||||
CHARSET = utf8
|
||||
PATH = /srv/gitea/data/gitea.db
|
||||
LOG_SQL = false
|
||||
|
||||
[repository]
|
||||
ROOT = /srv/gitea/data/gitea-repositories
|
||||
|
||||
[server]
|
||||
SSH_DOMAIN = localhost
|
||||
DOMAIN = git.foo.sh
|
||||
HTTP_ADDR = 127.0.0.1
|
||||
HTTP_PORT = 3000
|
||||
ROOT_URL = https://git.foo.sh/
|
||||
DISABLE_SSH = true
|
||||
SSH_PORT = 22
|
||||
LFS_START_SERVER = true
|
||||
LFS_JWT_SECRET = {{ gitea_lfs_jwt_secret }}
|
||||
OFFLINE_MODE = false
|
||||
|
||||
[lfs]
|
||||
PATH = /srv/gitea/data/lfs
|
||||
|
||||
[mailer]
|
||||
ENABLED = false
|
||||
|
||||
[service]
|
||||
REGISTER_EMAIL_CONFIRM = false
|
||||
ENABLE_NOTIFY_MAIL = false
|
||||
DISABLE_REGISTRATION = true
|
||||
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
|
||||
ENABLE_CAPTCHA = false
|
||||
REQUIRE_SIGNIN_VIEW = false
|
||||
DEFAULT_KEEP_EMAIL_PRIVATE = false
|
||||
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
|
||||
DEFAULT_ENABLE_TIMETRACKING = true
|
||||
NO_REPLY_ADDRESS = noreply.localhost
|
||||
|
||||
[openid]
|
||||
ENABLE_OPENID_SIGNIN = false
|
||||
ENABLE_OPENID_SIGNUP = false
|
||||
|
||||
[session]
|
||||
PROVIDER = file
|
||||
|
||||
[log]
|
||||
MODE = console
|
||||
LEVEL = info
|
||||
ROOT_PATH = /srv/gitea/log
|
||||
ROUTER = console
|
||||
|
||||
[repository.pull-request]
|
||||
DEFAULT_MERGE_STYLE = merge
|
||||
|
||||
[repository.signing]
|
||||
DEFAULT_TRUST_MODEL = committer
|
||||
|
||||
[security]
|
||||
INSTALL_LOCK = true
|
||||
INTERNAL_TOKEN = {{ gitea_internal_token }}
|
||||
PASSWORD_HASH_ALGO = pbkdf2
|
||||
REVERSE_PROXY_TRUSTED_PROXIES = 127.0.0.0/8,::1/128
|
||||
REVERSE_PROXY_LIMIT = 1
|
||||
|
||||
[actions]
|
||||
ENABLED = true
|
||||
|
||||
[oauth2]
|
||||
JWT_SECRET = {{ gitea_oauth_jwt_secret }}
|
|
@ -1,2 +0,0 @@
|
|||
---
|
||||
gitea_runner_version: main
|
|
@ -1,14 +0,0 @@
|
|||
[Unit]
|
||||
Description=Act Runner for Gitea
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=act_runner
|
||||
Group=act_runner
|
||||
WorkingDirectory=/var/lib/act_runner
|
||||
Environment=HOME=/var/lib/act_runner
|
||||
ExecStart=/usr/local/bin/act_runner daemon -c /var/lib/act_runner/config.yml
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,50 +0,0 @@
|
|||
---
|
||||
log:
|
||||
# The level of logging, can be trace, debug, info, warn, error, fatal
|
||||
level: info
|
||||
|
||||
runner:
|
||||
# Where to store the registration result.
|
||||
file: .runner
|
||||
# Execute how many tasks concurrently at the same time.
|
||||
capacity: 1
|
||||
# Extra environment variables to run jobs from a file.
|
||||
# It will be ignored if it's empty or the file doesn't exist.
|
||||
env_file: .env
|
||||
# The timeout for a job to be finished.
|
||||
# Please note that the Gitea instance also has a timeout (3h by default)
|
||||
# for the job. So the job could be stopped by the Gitea instance if it's
|
||||
# timeout is shorter than this.
|
||||
timeout: 3h
|
||||
# Whether skip verifying the TLS certificate of the Gitea instance.
|
||||
insecure: false
|
||||
# The timeout for fetching the job from the Gitea instance.
|
||||
fetch_timeout: 5s
|
||||
# The interval for fetching the job from the Gitea instance.
|
||||
fetch_interval: 2s
|
||||
|
||||
cache:
|
||||
# Enable cache server to use actions/cache.
|
||||
enabled: true
|
||||
# The directory to store the cache data.
|
||||
# If it's empty, the cache data will be stored in $HOME/.cache/actcache.
|
||||
dir: ""
|
||||
# The host of the cache server.
|
||||
# It's not for the address to listen, but the address to connect from job
|
||||
# containers. So 0.0.0.0 is a bad choice, leave it empty to detect
|
||||
# automatically.
|
||||
host: ""
|
||||
# The port of the cache server.
|
||||
# 0 means to use a random available port.
|
||||
port: 0
|
||||
|
||||
container:
|
||||
# Which network to use for the job containers. Could be bridge, host, none,
|
||||
# or the name of a custom network.
|
||||
network: bridge
|
||||
# Whether to use privileged mode or not when launching task containers
|
||||
# (privileged mode is required for Docker-in-Docker).
|
||||
privileged: false
|
||||
# And other options to be used when the container is started
|
||||
# (eg, --add-host=my.gitea.url:host-gateway).
|
||||
options:
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
- name: Restart act_runner
|
||||
ansible.builtin.service:
|
||||
name: act_runner
|
||||
state: restarted
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
dependencies:
|
||||
- {role: docker}
|
||||
- {role: git}
|
|
@ -1,85 +0,0 @@
|
|||
---
|
||||
- name: Create group
|
||||
ansible.builtin.group:
|
||||
name: act_runner
|
||||
system: true
|
||||
|
||||
- name: Create user
|
||||
ansible.builtin.user:
|
||||
name: act_runner
|
||||
system: true
|
||||
comment: Gitea act_runner
|
||||
create_home: false
|
||||
home: /var/empty
|
||||
group: act_runner
|
||||
groups:
|
||||
- docker
|
||||
shell: /sbin/nologin
|
||||
|
||||
- name: Install dependencies
|
||||
ansible.builtin.package:
|
||||
name: golang
|
||||
state: installed
|
||||
|
||||
- name: Download binary
|
||||
ansible.builtin.get_url:
|
||||
url: >
|
||||
{{
|
||||
"https://gitea.com/gitea/act_runner/releases/download/v" +
|
||||
gitea_runner_version + "/act_runner-" + gitea_runner_version +
|
||||
"-" + ansible_system | lower + "-amd64"
|
||||
}}
|
||||
dest: /usr/local/bin/act_runner
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart act_runner
|
||||
|
||||
- name: Create config directory
|
||||
ansible.builtin.file:
|
||||
path: /var/lib/act_runner
|
||||
state: directory
|
||||
mode: "0750"
|
||||
owner: root
|
||||
group: act_runner
|
||||
|
||||
- name: Copy config file
|
||||
ansible.builtin.copy:
|
||||
dest: /var/lib/act_runner/.runner
|
||||
src: "/srv/private/files/act_runner/{{ inventory_hostname }}.conf"
|
||||
mode: "0640"
|
||||
owner: root
|
||||
group: act_runner
|
||||
notify: Restart act_runner
|
||||
|
||||
- name: Copy config file
|
||||
ansible.builtin.copy:
|
||||
dest: /var/lib/act_runner/config.yml
|
||||
src: config.yml
|
||||
mode: "0640"
|
||||
owner: root
|
||||
group: act_runner
|
||||
notify: Restart act_runner
|
||||
|
||||
- name: Create cache directory
|
||||
ansible.builtin.file:
|
||||
path: /var/lib/act_runner/.cache
|
||||
state: directory
|
||||
mode: "0770"
|
||||
owner: root
|
||||
group: act_runner
|
||||
notify: Restart act_runner
|
||||
|
||||
- name: Copy unit file
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/systemd/system/act_runner.service
|
||||
src: act_runner.service
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Enable service
|
||||
ansible.builtin.service:
|
||||
name: act_runner
|
||||
state: started
|
||||
enabled: true
|
Loading…
Add table
Reference in a new issue