mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2026-09-19 15:29:08 +02:00
these are all the systems that the new redirect snippet can be cleanly applied to. there are a few others not included, that will need a more manual approach: - gitlab (multiple domains) - mta.sts(multiple domains) - archweb(mutltiple domains, snippets) - buildbtw(dynamic dev domains) - redirects(different structure) - public html(multiple domains) - archweb maintenence(different structure) - maintenence(different structure) some of these might be solvable by tweaking the snippet to accept multiple domains. I'll look into this Co-authored-by: Christian Heusel <christian@heusel.eu>
70 lines
2.5 KiB
YAML
70 lines
2.5 KiB
YAML
- name: Install dependencies
|
|
pacman: name=arch-pkg-repo-updater,devtools,jq,nvchecker,git,pyalpm,python-awesomeversion,python-jq,python-lxml,python-packaging state=present
|
|
|
|
- name: Clone bumpbuddy repo # noqa: latest
|
|
git: repo=https://gitlab.archlinux.org/archlinux/bumpbuddy.git dest=/opt/bumpbuddy version="{{ bumpbuddy_version }}" force=true
|
|
register: git_clone_state
|
|
|
|
- name: Create bumpbuddy user
|
|
user: name=bumpbuddy state=present shell=/usr/bin/bash
|
|
|
|
- name: Create clones directory
|
|
file: path=/opt/bumpbuddy/source_repos state=directory mode=0755 owner=bumpbuddy group=bumpbuddy
|
|
|
|
- name: Create data directory
|
|
file: path=/opt/bumpbuddy/data state=directory mode=0755 owner=bumpbuddy group=bumpbuddy
|
|
|
|
- name: Create nvchecker config directory
|
|
file: path=/home/bumpbuddy/.config/nvchecker state=directory mode=0755 owner=bumpbuddy group=bumpbuddy
|
|
|
|
- name: Create symlink for main script
|
|
file: src=/opt/bumpbuddy/checker.sh dest=/usr/local/bin/bumpbuddy.sh owner=root group=root state=link
|
|
|
|
- name: Install systemd services and timers
|
|
copy: src="{{ item }}" dest="/etc/systemd/system/{{ item }}" owner=root group=root mode=0644
|
|
loop:
|
|
- bumpbuddy.service
|
|
- bumpbuddy.timer
|
|
- arch-pkg-repo-updater.service
|
|
- arch-pkg-repo-updater.timer
|
|
notify:
|
|
- Daemon reload
|
|
|
|
- name: Install conf files
|
|
template: src="{{ item }}" dest="/etc/conf.d/{{ item | split('.') | first }}" owner=root group=root mode=0600
|
|
loop:
|
|
- bumpbuddy.conf.j2
|
|
- arch-pkg-repo-updater.conf.j2
|
|
|
|
- name: Install keyfile
|
|
template: src=keyfile.toml.j2 dest=/home/bumpbuddy/.config/nvchecker/keyfile.toml owner=bumpbuddy group=bumpbuddy mode=0600
|
|
|
|
- name: Setup HTTP redirect
|
|
include_role:
|
|
name: http_redirect
|
|
vars:
|
|
domain: "{{ bumpbuddy_domain }}"
|
|
|
|
- name: Make nginx log dir
|
|
file: path=/var/log/nginx/{{ bumpbuddy_domain }} state=directory owner=root group=root mode=0755
|
|
|
|
- name: Install nginx conf file
|
|
template: src=bumpbuddy-nginx.conf.j2 dest=/etc/nginx/nginx.d/bumpbuddy.conf owner=root group=root mode=0600
|
|
notify:
|
|
- Reload nginx
|
|
|
|
- name: Install gitconfig
|
|
copy: src=gitconfig dest=/etc/gitconfig owner=root group=root mode=0644
|
|
|
|
- name: Invoke dl-web-deps script # noqa no-changed-when
|
|
command: /opt/bumpbuddy/dl-web-deps.sh
|
|
args:
|
|
chdir: /opt/bumpbuddy
|
|
when: git_clone_state.changed
|
|
|
|
- name: Start and enable systemd timers
|
|
systemd_service: name="{{ item }}" enabled=true state=started
|
|
loop:
|
|
- bumpbuddy.timer
|
|
- arch-pkg-repo-updater.timer
|