This commit is contained in:
DeveloperDurp 2025-04-06 20:32:46 -05:00
parent 860c329dcb
commit cc9350cd6d
3 changed files with 19 additions and 5 deletions

9
ansible/devpod.yml Normal file
View file

@ -0,0 +1,9 @@
- hosts: localhost
connection: local
become: true
vars:
DEVPOD: true
roles:
- packages
- customize

View file

@ -3,6 +3,7 @@
become: true become: true
vars: vars:
GITLAB_TOKEN: "{{ lookup('env', 'GITLAB_TOKEN') }}" GITLAB_TOKEN: "{{ lookup('env', 'GITLAB_TOKEN') }}"
DEVPOD: false
# vars_prompt: # vars_prompt:
roles: roles:

View file

@ -1,11 +1,15 @@
- name: Load devpod variables if DEVPOD is true
include_vars: "vars/devpod.yml"
when: DEVPOD | bool
- name: Load a variable file - name: Load a variable file
include_vars: "{{ item }}" include_vars: "{{ item }}"
with_first_found: with_first_found:
- "vars/{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml" - "vars/{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml"
- "vars/{{ ansible_distribution }}.yml" - "vars/{{ ansible_distribution }}.yml"
- "vars/{{ ansible_os_family }}.yml" - "vars/{{ ansible_os_family }}.yml"
- "vars/defaults.yml" - "vars/defaults.yml"
when: not DEVPOD | bool
- name: - name:
include_tasks: "defaults.yml" include_tasks: "defaults.yml"