no idea if this will even work

This commit is contained in:
Mark Riedesel 2024-11-20 13:25:40 -06:00
parent 3d064bb41a
commit 199a12f025
5 changed files with 22 additions and 8 deletions

View file

@ -1,6 +1,6 @@
--- ---
ansible_user: root ansible_user: root
ansible_host: 10.4.0.49 #ansible_host: 10.4.0.49
base_root_swap_mib: "{{ 1024 * 16 }}" base_root_swap_mib: "{{ 1024 * 16 }}"
base_root_efi_mib: 512 base_root_efi_mib: 512

View file

@ -1,5 +1,2 @@
[all]
localhost
[base] [base]
hulder hulder

View file

@ -1,7 +1,6 @@
--- ---
- hosts: all - hosts: all
tasks: roles:
- name: determine hostname if this is running from archiso - detect_archiso
debug: msg=hello
- import_playbook: playbooks/install.yaml - import_playbook: playbooks/install.yaml

View file

@ -1,6 +1,11 @@
--- ---
- name: Provision new Arch workstation from scratch - name: Check if we appear to be inside an ArchLinux live install environment
hosts: all hosts: all
roles:
- detect_archiso
- name: Provision new Arch workstation from scratch
hosts: base
tags: base tags: base
roles: roles:
- base - base

View file

@ -0,0 +1,13 @@
- name: check for archinstall in path
command: which archinstall
ignore_errors: true
register: which_archinstall
- name: inspect archinstall result
set_fact:
archiso_detected: "{{ which_archinstall.rc == 0 }}"
- name: override the inventory_hostname
set_fact:
inventory_hostname: "{{ hostname }}"
when: archiso_detected