32 lines
832 B
YAML
32 lines
832 B
YAML
- name: Prepare the base environment
|
|
hosts: localhost
|
|
connection: local
|
|
gather_facts: false
|
|
|
|
pre_tasks:
|
|
- name: Ensure the "chezmoi" variable is set
|
|
ansible.builtin.assert:
|
|
that:
|
|
- chezmoi is not undefined
|
|
- chezmoi is mapping
|
|
fail_msg: 'Pass with: --extra-vars "$(chezmoi data --format=json)"'
|
|
|
|
- name: Verify the become password is correct
|
|
become: true
|
|
ansible.builtin.command:
|
|
cmd: "true"
|
|
changed_when: false
|
|
|
|
- name: Verify the distro
|
|
ansible.builtin.debug:
|
|
msg: "The setup script for now supports only Arch Linux!"
|
|
when: chezmoi.osRelease.id != "arch"
|
|
|
|
roles:
|
|
- role: shell
|
|
when: features.shell == true
|
|
- role: git
|
|
when: features.git == true
|
|
- role: editor
|
|
when: features.editor == true
|