Compare commits

...

17 Commits

Author SHA1 Message Date
3a726c832f chore: rebuild for renovate 2025-10-07 23:21:28 +10:00
95e4549ae6 chore: renovatebot pin digests 2025-10-07 21:22:01 +10:00
651b7e7e10 chore: split renovatebot managers 2025-10-07 21:20:24 +10:00
638e7c23f5 chore: split renovatebot managers 2025-10-07 21:13:46 +10:00
41458d1442 chore: update renovate.json for custom registry 2025-10-07 21:10:44 +10:00
b8a1792db9 chore: update renovate.json for depNameTemplate 2025-10-07 20:58:05 +10:00
adf61d7fe0 chore: update renovate regres for tagging 2025-10-07 20:55:03 +10:00
68de69c85f chore: update renovate regrex 2025-10-07 20:45:55 +10:00
6c84f51c53 chore: update renovate regrex 2025-10-07 20:43:16 +10:00
eed09be8b1 chore: update renovate regrex 2025-10-07 20:40:15 +10:00
027533eb26 chore: update renovate regrex 2025-10-07 20:37:04 +10:00
f2d6cade13 chore: update renovate regrex 2025-10-07 20:29:48 +10:00
3c8e382b91 chore: update renovate regrex 2025-10-07 20:13:53 +10:00
81023b1bd3 Merge pull request 'chore(config): migrate renovate config' (#4) from renovate/migrate-config into master
Reviewed-on: #4
2025-10-04 09:28:41 +10:00
b9028ca0da chore(config): migrate config renovate.json 2025-10-03 23:26:56 +00:00
3f65252b67 chore: update renovate cron 2025-10-04 09:23:10 +10:00
fa81df67d9 chore: update renovate cron 2025-10-04 09:13:43 +10:00
7 changed files with 49 additions and 62 deletions

View File

@ -16,11 +16,23 @@ Built using Infrastructure as Code (IaC) with [OpenTofu](https://opentofu.org/)
## 🔄 Usage
### 🛠️ Opentofu
1. Checkout repo
2. From the opentofu folder, generate `terraform.auto.tfvars` using the supplied ```prepareEnv.sh```
2. From the opentofu folder, generate `terraform.auto.tfvars` using the supplied `prepareEnv.sh`
3. Run `tofu init`, `tofu fmt`, `tofu validate`
4. Execute `tofu plan`
5. If successful, run `tofu apply`
6. From the ansible folder, run `ansible-playbook main.yml`
### 🧩 Ansible
1. Checkout repo
2. From the ansible folder, run `export GITEA_RUNNER_TOKEN="{{ YOUR_GITEA_RUNNER_TOKEN }}"`
3. Run `ansible-playbook main.yml -e "GITEA_RUNNER_TOKEN=$GITEA_RUNNER_TOKEN"`

View File

@ -1,10 +1,6 @@
---
install_packages:
- apt-transport-https
- ca-certificates
- curl
- gnupg
- lsb-release
- vim
- git
- htop
@ -12,8 +8,3 @@ install_packages:
- mc
- net-tools
- unattended-upgrades
data_folder: /data
alpine_latest_image: "alpine:latest"
ubuntu_latest_image: "node:22-trixie"
debian_latest_image: "git.comprofix.com/mmckinnon/debian-latest:2025.08.31-093853"

View File

@ -20,8 +20,5 @@
- administrator
tasks:
- name: Deploy docker apps
include_tasks: "tasks/{{ container }}.yml"
loop:
- gitea-runner
loop_control:
loop_var: container
import_tasks: "tasks/gitea-runner.yml"

View File

@ -1,6 +0,0 @@
---
- name: Create directories for {{ container }}
file:
path: "{{ data_folder }}/{{ container }}/{{ item }}"
state: directory
loop: "{{ subfolders | default(['config', 'data', 'logs']) }}"

View File

@ -1,17 +1,20 @@
- name: Create Folders
include_tasks: create_folders.yml
vars:
subfolders:
- config
- name: Create folders
file:
path: "{{ item }}"
state: directory
with_items:
- "/data/gitea-runner"
- "/data/gitea-runner/config"
- name: Check that config.yaml exists
stat:
path: "{{ data_folder }}/gitea-runner/config/config.yaml"
path: "/data/gitea-runner/config/config.yaml"
register: configyaml
- name: Create config.yaml file
file:
path: "{{ data_folder }}/gitea-runner/config/config.yaml"
path: "/data/gitea-runner/config/config.yaml"
state: touch
mode: "0600"
access_time: preserve
@ -29,12 +32,13 @@
# - 127.0.0.11
volumes:
- "/etc/resolv.conf:/etc/resolv.conf:ro"
- /var/run/docker.sock:/var/run/docker.sock
- "{{ data_folder }}/gitea-runner/config/config.yaml:/config.yaml"
- "/data/gitea-runner/config/config.yaml:/config.yaml"
- "/etc/hosts:/etc/hosts:ro"
env:
CONFIG_FILE: "/config.yaml"
GITEA_INSTANCE_URL: "https://git.comprofix.com"
GITEA_RUNNER_REGISTRATION_TOKEN: "{{ GITEA_RUNNER_TOKEN }}"
GITEA_RUNNER_NAME: "gtar-runner"
GITEA_RUNNER_LABELS: "alpine-latest:docker://{{ alpine_latest_image }},ubuntu-latest:docker://{{ ubuntu_latest_image }},gtar-latest:docker://{{ debian_latest_image }}"
GITEA_RUNNER_LABELS: "alpine-latest:docker://alpine:latest,ubuntu-latest:docker://node:22-trixie,gtar-latest:docker://git.comprofix.com/mmckinnon/debian-latest:latest"

View File

@ -1,17 +0,0 @@
---
# Reusable snippet for pulling Docker images
- name: Set {{ image_name }} image reference
set_fact:
"{{ image_var }}_image_ref": "{{ image_ref }}"
- name: Ensure {{ image_name }} image is pulled
community.docker.docker_image:
name: "{{ image_ref }}"
source: pull
register: pulled_image
- name: Save image result under dynamic key
set_fact:
container_images: >-
{{ container_images | default({}) | combine({ image_var: pulled_image }) }}

View File

@ -4,22 +4,28 @@
"local>RenovateBot/renovate-config",
":semanticCommitTypeAll(chore)"
],
"automerge": false,
"schedule": ["every hour"],
"commitBodyTable": true,
"ignoreTests": true,
"major": {
"automerge": false,
"commitMessagePrefix": "chore(deps-major): ",
"labels": ["dependencies", "breaking"]
},
"ignoreDeps": ["postgres"],
"regexManagers": [
{
"fileMatch": ["(^|/)tasks/.*\\.ya?ml$", "(^|/)playbooks/.*\\.ya?ml$"],
"matchStrings": [
"(?<varName>\\w+_image):\\s+\"(?<depName>[\\w./-]+):(?<currentValue>[\\w.-]+)\""
],
"datasourceTemplate": "docker"
"fileMatch": ["group_vars/all.yml"],
"matchStrings": ["^(\\s*(?<depName>\\w+_latest_image):\\s*\"?(?<currentValue>[^\"]+)\"?)"],
"datasourceTemplate": "docker",
"depNameTemplate": "{{ currentValue }}",
"versioningTemplate": "docker",
"pinDigests": true
}
],
"packageRules": [
{
"managers": ["docker"],
"matchPackageNames": ["alpine", "node"],
"pinDigests": true
},
{
"managers": ["docker"],
"matchPackageNames": ["git.comprofix.com/mmckinnon/debian-latest"],
"registryUrls": ["https://git.comprofix.com/v2/"],
"pinDigests": true
}
]
}