no idea if this will even work
This commit is contained in:
parent
3d064bb41a
commit
199a12f025
5 changed files with 22 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
ansible_user: root
|
||||
ansible_host: 10.4.0.49
|
||||
#ansible_host: 10.4.0.49
|
||||
|
||||
base_root_swap_mib: "{{ 1024 * 16 }}"
|
||||
base_root_efi_mib: 512
|
||||
|
|
|
@ -1,5 +1,2 @@
|
|||
[all]
|
||||
localhost
|
||||
|
||||
[base]
|
||||
hulder
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: determine hostname if this is running from archiso
|
||||
debug: msg=hello
|
||||
roles:
|
||||
- detect_archiso
|
||||
|
||||
- import_playbook: playbooks/install.yaml
|
||||
|
|
|
@ -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
|
||||
roles:
|
||||
- detect_archiso
|
||||
|
||||
- name: Provision new Arch workstation from scratch
|
||||
hosts: base
|
||||
tags: base
|
||||
roles:
|
||||
- base
|
||||
|
|
13
roles/detect_archiso/tasks/main.yaml
Normal file
13
roles/detect_archiso/tasks/main.yaml
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue