refactor(bootstrap,configuration,environment): add defaults/main.yml and extract hardcoded values

This commit is contained in:
2026-02-22 02:32:36 +01:00
parent 87fd69b825
commit 1221249546
8 changed files with 38 additions and 35 deletions

View File

@@ -0,0 +1,10 @@
---
# Connection and timing
environment_wait_timeout: 180
environment_wait_delay: 5
# Pacman installer settings
environment_parallel_downloads: 20
environment_pacman_lock_timeout: 120
environment_pacman_retries: 4
environment_pacman_retry_delay: 15

View File

@@ -1,8 +1,8 @@
---
- name: Wait for connection
ansible.builtin.wait_for_connection:
timeout: 180
delay: 5
timeout: "{{ environment_wait_timeout }}"
delay: "{{ environment_wait_delay }}"
- name: Gather facts
ansible.builtin.setup:

View File

@@ -4,14 +4,14 @@
ansible.builtin.lineinfile:
path: /etc/pacman.conf
regexp: ^#ParallelDownloads =
line: ParallelDownloads = 20
line: "ParallelDownloads = {{ environment_parallel_downloads }}"
- name: Wait for pacman lock to be released
when: not (custom_iso | bool)
ansible.builtin.wait_for:
path: /var/lib/pacman/db.lck
state: absent
timeout: 120
timeout: "{{ environment_pacman_lock_timeout }}"
changed_when: false
- name: Setup Pacman
@@ -31,8 +31,8 @@
- { name: ubuntu-keyring, os: [ubuntu, ubuntu-lts] }
loop_control:
label: "{{ item.name }}"
retries: 4
delay: 15
retries: "{{ environment_pacman_retries }}"
delay: "{{ environment_pacman_retry_delay }}"
- name: Prepare /iso mount and repository for RHEL-based systems
when: os == "rhel"