noticket - version bumps and github actions runner
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "ansible/roles/monolithprojects.github_actions_runner"]
|
||||||
|
path = ansible/roles/monolithprojects.github_actions_runner
|
||||||
|
url = https://github.com/MonolithProjects/ansible-github_actions_runner.git
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
---
|
|
||||||
- hosts: all
|
- hosts: all
|
||||||
vars_files:
|
vars_files:
|
||||||
- vars/vault.yml
|
- vars/vault.yml
|
||||||
@@ -7,3 +6,4 @@
|
|||||||
- role: git
|
- role: git
|
||||||
- role: podman
|
- role: podman
|
||||||
- role: ssl
|
- role: ssl
|
||||||
|
- role: github-actions
|
||||||
|
|||||||
3
ansible/roles/github-actions/defaults/main.yml
Normal file
3
ansible/roles/github-actions/defaults/main.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
runner_user: actions-runner
|
||||||
|
runner_dir: /home/actions-runner
|
||||||
14
ansible/roles/github-actions/tasks/deps.yml
Normal file
14
ansible/roles/github-actions/tasks/deps.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
- name: enable required dnf repositories
|
||||||
|
become: true
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
|
||||||
|
creates: /etc/yum.repos.d/hashicorp.repo
|
||||||
|
|
||||||
|
- name: install github dependencies
|
||||||
|
become: true
|
||||||
|
ansible.builtin.dnf:
|
||||||
|
name:
|
||||||
|
- awscli
|
||||||
|
- terraform
|
||||||
|
state: present
|
||||||
5
ansible/roles/github-actions/tasks/main.yml
Normal file
5
ansible/roles/github-actions/tasks/main.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- import_tasks: user.yml
|
||||||
|
tags: github
|
||||||
|
- import_tasks: deps.yml
|
||||||
|
tags: github
|
||||||
60
ansible/roles/github-actions/tasks/user.yml
Normal file
60
ansible/roles/github-actions/tasks/user.yml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
---
|
||||||
|
- name: create github actions user
|
||||||
|
become: true
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: "{{ runner_user }}"
|
||||||
|
shell: /usr/bin/nologin
|
||||||
|
createhome: true
|
||||||
|
home: "{{ runner_dir }}"
|
||||||
|
|
||||||
|
- name: set ulimits for github user
|
||||||
|
become: true
|
||||||
|
community.general.pam_limits:
|
||||||
|
domain: "{{ runner_user }}"
|
||||||
|
limit_type: "{{ item.type }}"
|
||||||
|
limit_item: "{{ item.name }}"
|
||||||
|
value: "{{ item.value }}"
|
||||||
|
loop:
|
||||||
|
- name: memlock
|
||||||
|
type: soft
|
||||||
|
value: "unlimited"
|
||||||
|
- name: memlock
|
||||||
|
type: hard
|
||||||
|
value: "unlimited"
|
||||||
|
- name: nofile
|
||||||
|
type: soft
|
||||||
|
value: 39693561
|
||||||
|
- name: memlock
|
||||||
|
type: hard
|
||||||
|
value: 39693561
|
||||||
|
tags: github
|
||||||
|
|
||||||
|
- name: check if github user lingering enabled
|
||||||
|
become: true
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: "/var/lib/systemd/linger/{{ runner_user }}"
|
||||||
|
register: user_lingering
|
||||||
|
tags: github
|
||||||
|
|
||||||
|
- name: enable github user lingering
|
||||||
|
become: true
|
||||||
|
become_user: "{{ runner_user }}"
|
||||||
|
ansible.builtin.command: |
|
||||||
|
loginctl enable-linger {{ runner_user }}
|
||||||
|
when:
|
||||||
|
- not user_lingering.stat.exists
|
||||||
|
tags: github
|
||||||
|
|
||||||
|
- name: selinux context for github directories
|
||||||
|
become: true
|
||||||
|
community.general.sefcontext:
|
||||||
|
target: "{{ item.target }}(/.*)?"
|
||||||
|
setype: "{{ item.setype }}"
|
||||||
|
state: present
|
||||||
|
notify: restorecon podman
|
||||||
|
loop:
|
||||||
|
- { target: "{{ runner_dir }}", setype: "user_home_dir_t" }
|
||||||
|
- { target: "{{ runner_dir }}/.local/share", setype: "container_file_t" }
|
||||||
|
tags:
|
||||||
|
- github
|
||||||
|
- selinux
|
||||||
@@ -69,6 +69,7 @@
|
|||||||
- shared
|
- shared
|
||||||
env:
|
env:
|
||||||
APP_URL: "https://wiki.skudakrennsport.com"
|
APP_URL: "https://wiki.skudakrennsport.com"
|
||||||
|
APP_KEY: "{{ bookstack_app_key }}"
|
||||||
DB_HOST: "bookstack-db"
|
DB_HOST: "bookstack-db"
|
||||||
DB_USERNAME: "bookstack"
|
DB_USERNAME: "bookstack"
|
||||||
DB_DATABASE: "bookstack"
|
DB_DATABASE: "bookstack"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
- import_tasks: container-hass.yml
|
- import_tasks: container-hass.yml
|
||||||
vars:
|
vars:
|
||||||
image: ghcr.io/home-assistant/home-assistant:stable
|
image: ghcr.io/home-assistant/home-assistant:2023.11
|
||||||
tags: hass
|
tags: hass
|
||||||
|
|
||||||
- import_tasks: container-partkeepr.yml
|
- import_tasks: container-partkeepr.yml
|
||||||
@@ -34,30 +34,30 @@
|
|||||||
- import_tasks: container-bookstack.yml
|
- import_tasks: container-bookstack.yml
|
||||||
vars:
|
vars:
|
||||||
db_image: docker.io/library/mysql:5.7.21
|
db_image: docker.io/library/mysql:5.7.21
|
||||||
image: docker.io/solidnerd/bookstack:23.6
|
image: docker.io/solidnerd/bookstack:23.10
|
||||||
tags: bookstack
|
tags: skuwiki
|
||||||
|
|
||||||
- import_tasks: container-photos.yml
|
- import_tasks: container-photos.yml
|
||||||
vars:
|
vars:
|
||||||
db_image: docker.io/library/mariadb:10.8
|
db_image: docker.io/library/mariadb:10.8
|
||||||
image: docker.io/photoprism/photoprism:230625-ce
|
image: docker.io/photoprism/photoprism:231021-ce
|
||||||
tags: photos
|
tags: photos
|
||||||
|
|
||||||
- import_tasks: container-cloud.yml
|
- import_tasks: container-cloud.yml
|
||||||
vars:
|
vars:
|
||||||
db_image: docker.io/library/mariadb:10.5
|
db_image: docker.io/library/mariadb:10.6
|
||||||
image: docker.io/library/nextcloud:24.0.5-apache
|
image: docker.io/library/nextcloud:27.1.3-apache
|
||||||
tags: cloud
|
tags: cloud
|
||||||
|
|
||||||
- import_tasks: container-cloud-skudak.yml
|
- import_tasks: container-cloud-skudak.yml
|
||||||
vars:
|
vars:
|
||||||
db_image: docker.io/library/mariadb:10.5
|
db_image: docker.io/library/mariadb:10.6
|
||||||
image: docker.io/library/nextcloud:24.0.5-apache
|
image: docker.io/library/nextcloud:27.1.3-apache
|
||||||
tags: skucloud
|
tags: skucloud
|
||||||
|
|
||||||
- import_tasks: container-fulfillr.yml
|
- import_tasks: container-fulfillr.yml
|
||||||
vars:
|
vars:
|
||||||
image: "{{ aws_ecr_endpoint }}/fulfillr:20231005.1415"
|
image: "{{ aws_ecr_endpoint }}/fulfillr:20231113.1809"
|
||||||
tags: fulfillr
|
tags: fulfillr
|
||||||
|
|
||||||
- import_tasks: configuration-nginx.yml
|
- import_tasks: configuration-nginx.yml
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user