mirror of
https://github.com/ublue-os/forge.git
synced 2025-07-17 15:15:45 +03:00
wip - finalize
This commit is contained in:
parent
aaa38993bd
commit
45f497cf1f
13 changed files with 48 additions and 56 deletions
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
# data variables
|
||||
forge_data_path: "{{ lookup('ansible.builtin.env', 'FORGE_DATA_PATH', default=ansible_facts.env.HOME + '/ublue-os_forge') }}"
|
||||
forge_data_default_variables_file_path: "{{ forge_data_path }}/forge_default_vars.env"
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
# git variables
|
||||
forge_git_repository_url: "{{ lookup('ansible.builtin.env', 'FORGE_GIT_REPOSITORY_URL', default='https://github.com/ublue-os/bluefin.git') }}"
|
||||
forge_git_repository_destination: "{{ lookup('ansible.builtin.env', 'FORGE_GIT_REPOSITORY_DESTINATION', default=forge_data_path + '/bluefin') }}"
|
||||
forge_git_repository_version: "{{ lookup('ansible.builtin.env', 'FORGE_GIT_REPOSITORY_VERSION', default='main') }}"
|
||||
forge_git_repository_url: "https://github.com/ublue-os/bluefin.git"
|
||||
forge_git_repository_destination: "{{ forge_data_volume_mountpoint }}/data/bluefin"
|
||||
forge_git_repository_version: "main"
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
# container registry variables
|
||||
forge_registry_url: "{{ lookup('ansible.builtin.env', 'FORGE_REGISTRY_URL', default='registry.ublue.local') }}"
|
||||
forge_registry_url: "registry.ublue.local"
|
||||
|
|
|
@ -2,6 +2,17 @@
|
|||
- name: Configure host system
|
||||
hosts: host.ublue.local
|
||||
gather_facts: true
|
||||
pre_tasks:
|
||||
- name: Get information on podman volume ublue-os_forge_data
|
||||
containers.podman.podman_volume_info:
|
||||
name: ublue-os_forge-data
|
||||
register: __podman_volume_info
|
||||
|
||||
- name: Persist podman ublue-os_forge_data mountpoint
|
||||
ansible.builtin.set_fact:
|
||||
forge_data_volume_mountpoint: "{{ __podman_volume_info.volumes[0].Mountpoint }}"
|
||||
cacheable: true
|
||||
|
||||
tasks:
|
||||
- name: Add ublue.local entries to /etc/hosts
|
||||
ansible.builtin.lineinfile:
|
||||
|
@ -25,25 +36,19 @@
|
|||
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
|
||||
- name: Create example extra-vars configuration file
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ forge_data_default_variables_file_path }}"
|
||||
dest: "{{ forge_data_volume_mountpoint }}/forge_example_vars.yml"
|
||||
content: |
|
||||
## ublue-os forge configuration variables defaults
|
||||
## ublue-os forge extra-vars example configuration
|
||||
## 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) }}
|
||||
{{ item }}: {{ 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_.+
|
||||
__regex_search: ^forge_(?!data).+
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
- name: DEBUG | forge variables
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ item }}: {{ lookup('ansible.builtin.vars', item) }}"
|
||||
# verbosity: 1
|
||||
verbosity: 1
|
||||
loop: "{{ __forge_vars_used }}"
|
||||
loop_control:
|
||||
extended: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue