This should allow just having a general 'target' system for ansible which will take all the modifications - but not care whether we connect to it locally (i.e. running from void) or through chroot. We can set the connection method for the specific system(s) in whatever we group as part of the target group then. For local installation we simply add locally connected hosts and for chroot set up chrooted hosts.
28 lines
893 B
YAML
28 lines
893 B
YAML
---
|
|
- name: Import host tasks
|
|
ansible.builtin.import_playbook: host.yaml
|
|
|
|
# Get python onto void - otherwise we can not interact through ansible
|
|
- name: Bootstrap void python
|
|
hosts: target_system
|
|
gather_facts: false
|
|
tasks:
|
|
- name: install python
|
|
raw: test -e /usr/bin/python || xbps-install -y python
|
|
register: python_install
|
|
changed_when: "'installed successfully' in python_install.stdout"
|
|
|
|
- name: Import chroot void base tasks
|
|
ansible.builtin.import_playbook: void_base.yaml
|
|
|
|
- name: Import chroot void network tasks
|
|
ansible.builtin.import_playbook: void_network.yaml
|
|
|
|
- name: Import chroot void wayland tasks
|
|
ansible.builtin.import_playbook: void_wayland.yaml
|
|
|
|
- name: Import chroot user management tasks
|
|
ansible.builtin.import_playbook: void_user.yaml
|
|
|
|
- name: Import chroot void customizations
|
|
ansible.builtin.import_playbook: void_packages.yaml
|