mirror of
https://github.com/ublue-os/forge.git
synced 2025-07-18 23:55:47 +03:00
wip - nicegui
This commit is contained in:
parent
c3ed45a21b
commit
85b0b3fdc5
39 changed files with 2748 additions and 896 deletions
49
anvil/ansible/playbooks/configure_host.yml
Normal file
49
anvil/ansible/playbooks/configure_host.yml
Normal file
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
- name: Configure host system
|
||||
hosts: host.ublue.local
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- name: Add ublue.local entries to /etc/hosts
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/hosts
|
||||
search_string: 127.0.0.1 rvproxy.ublue.local registry.ublue.local forge.ublue.local
|
||||
line: 127.0.0.1 rvproxy.ublue.local registry.ublue.local forge.ublue.local
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Add ublue.local TSL root certificate to trust anchors
|
||||
ansible.builtin.copy:
|
||||
src: /certs/tls/ublue-os_forge-root.pem
|
||||
dest: /etc/pki/ca-trust/source/anchors/ublue-os_forge-root.pem
|
||||
force: true
|
||||
mode: "0644"
|
||||
become: true
|
||||
|
||||
- name: Update ca-trust store
|
||||
ansible.builtin.command:
|
||||
cmd: update-ca-trust
|
||||
changed_when: false
|
||||
become: true
|
||||
|
||||
- name: Create default directory for forge content
|
||||
ansible.builtin.file:
|
||||
path: "{{ forge_data_path }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: Create default configuration variable file
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ forge_data_default_variables_file_path }}"
|
||||
content: |
|
||||
## ublue-os forge configuration variables defaults
|
||||
## For more details got to https://github.com/ublue-os/forge/blob/main/docs/variables.md
|
||||
|
||||
{% for item in __vars_used %}
|
||||
#{{ item | upper }}={{ lookup('ansible.builtin.vars', item) }}
|
||||
{% endfor %}
|
||||
backup: true
|
||||
owner: "{{ ansible_facts.env.USER }}"
|
||||
mode: "0644"
|
||||
vars:
|
||||
__vars_used: "{{ lookup('ansible.builtin.varnames', __regex_search, wantlist=true) }}"
|
||||
__regex_search: ^forge_.+
|
29
anvil/ansible/playbooks/project_build.yml
Normal file
29
anvil/ansible/playbooks/project_build.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
- name: Build project
|
||||
hosts: host.ublue.local
|
||||
gather_facts: true
|
||||
pre_tasks:
|
||||
- name: DEBUG - forge variables
|
||||
ansible.builtin.include_role:
|
||||
name: debug_forge_vars
|
||||
|
||||
tasks:
|
||||
- name: Build and push image to registry
|
||||
containers.podman.podman_image:
|
||||
name: "{{ forge_git_repository_url | regex_search(__regex_search) }}"
|
||||
tag: latest
|
||||
path: "{{ forge_git_repository_destination }}"
|
||||
build:
|
||||
file: Containerfile
|
||||
format: oci
|
||||
pull: false
|
||||
push: true
|
||||
push_args:
|
||||
dest: "{{ forge_registry_url }}"
|
||||
vars:
|
||||
__regex_search: (?<=/)[^/]+(?=\.git)
|
||||
register: __podman_image_info
|
||||
|
||||
- name: INFO | Status from build and push
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ __podman_image_info }}"
|
19
anvil/ansible/playbooks/project_clone.yml
Normal file
19
anvil/ansible/playbooks/project_clone.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
- name: Clone project
|
||||
hosts: host.ublue.local
|
||||
gather_facts: true
|
||||
pre_tasks:
|
||||
- name: DEBUG - forge variables
|
||||
ansible.builtin.include_role:
|
||||
name: debug_forge_vars
|
||||
tasks:
|
||||
- name: Clone project
|
||||
ansible.builtin.git:
|
||||
repo: "{{ forge_git_repository_url }}"
|
||||
dest: "{{ forge_git_repository_destination }}"
|
||||
version: "{{ forge_git_repository_version }}"
|
||||
register: __git_clone_info
|
||||
|
||||
- name: INFO | Status from git clone
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ __git_clone_info }}"
|
Loading…
Add table
Add a link
Reference in a new issue