feat: Updates default variable definitions

This commit is contained in:
2024-11-24 21:14:34 -05:00
parent 88cd7c9033
commit 2568d38911
5 changed files with 32 additions and 42 deletions

View File

@@ -36,11 +36,14 @@ build_dir_name: ".build"
work_dir: "{{ lookup('env', 'PWD') }}"
build_dir: "{{ work_dir }}/{{ build_dir_name }}"
# NOTE: These generally do not need changed, unless debugging or customizing files.
# Such as you want to add new definitions or customize the footer.
config:
# NOTE: These generally do not need changed, unless debugging or customizing files.
# Such as you want to add new definitions or customize the footer.
paths:
report_path: "{{ work_dir }}/Report.md"
footer_path: "templates/footer.tex"
head_path: "files/head.tex"
definitions_path: "files/Definitions.md"
default_vars_path: "files/vars.default.yml"
default_vault_path: "files/vault.default.yml"
default_vault_vars_path: "files/vars.vault.yml"

View File

@@ -1,4 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
author_name: "Testy McTestface Jr"
document_title: "Home Performance Report"
@@ -30,21 +29,3 @@ home:
square_feet: "3,000"
cfm50: "3,000"
lair: "1:1"
# NOTE: These generally do not need changed, unless debugging.
#
build_dir_name: ".build"
work_dir: "{{ lookup('env', 'PWD') }}"
build_dir: "{{ work_dir }}/{{ build_dir_name }}"
# NOTE: These generally do not need changed, unless debugging.
config:
# NOTE: These generally do not need changed, unless debugging or customizing files.
# Such as you want to add new definitions or customize the latex footer.
paths:
report_path: "{{ work_dir }}/Report.md"
footer_path: "templates/footer.tex"
head_path: "files/head.tex"
definitions_path: "files/Definitions.md"

View File

@@ -16,17 +16,3 @@ home:
square_feet: "3,000"
cfm50: "3,000"
lair: "1:1"
# NOTE: These generally do not need changed, unless debugging.
build_dir_name: ".build"
work_dir: "{{ lookup('env', 'PWD') }}"
build_dir: "{{ work_dir }}/{{ build_dir_name }}"
config:
# NOTE: These generally do not need changed, unless debugging or customizing files.
# Such as you want to add new definitions or customize the footer.
paths:
report_path: "{{ work_dir }}/Report.md"
footer_path: "templates/footer.tex"
head_path: "files/head.tex"
definitions_path: "files/Definitions.md"

View File

@@ -21,7 +21,7 @@
ansible.builtin.include_tasks:
file: "copy_if_not_exists.yml"
vars:
source: "templates/footer.tex"
source: "{{ config.paths.footer_path }}"
destination: "{{ work_dir }}/footer.tex"
tags:
- setup-footer
@@ -32,7 +32,7 @@
ansible.builtin.include_tasks:
file: "copy_if_not_exists.yml"
vars:
source: "files/head.tex"
source: "{{ config.paths.head_path }}"
destination: "{{ work_dir }}/head.tex"
tags:
- setup-head
@@ -43,7 +43,7 @@
ansible.builtin.include_tasks:
file: "copy_if_not_exists.yml"
vars:
source: "files/Definitions.md"
source: "{{ config.paths.definitions_path }}"
destination: "{{ work_dir }}/Definitions.md"
tags:
- setup-definitions
@@ -54,7 +54,7 @@
ansible.builtin.include_tasks:
file: "copy_if_not_exists.yml"
vars:
source: "defaults/main.yml"
source: "{{ config.paths.default_vars_path }}"
destination: "{{ work_dir }}/vars.yml"
tags:
- setup
@@ -64,7 +64,7 @@
ansible.builtin.include_tasks:
file: "copy_if_not_exists.yml"
vars:
source: "files/vars.vault.yml"
source: "{{ config.paths.default_vault_vars_path }}"
destination: "{{ work_dir }}/vars.yml"
tags:
- setup-vault
@@ -75,7 +75,7 @@
ansible.builtin.include_tasks:
file: "copy_if_not_exists.yml"
vars:
source: "files/vault.default.yml"
source: "{{ config.paths.default_vault_path }}"
destination: "{{ work_dir }}/vault.yml"
tags:
- setup-vault

View File

@@ -11,4 +11,24 @@
ansible.builtin.debug:
msg: "Starting task..."
#- include_tasks: ../tasks/main.yml
- name: Ensure files exist in root working directory.
ansible.builtin.file:
path: "{{ work_dir }}/{{ item }}"
state: file
with_items:
- "Report.md"
- "Definitions.md"
- "footer.tex"
- "head.tex"
- "vars.yml"
- "vault.yml"
- name: Ensure files exist in build directory.
ansible.builtin.file:
path: "{{ build_dir }}/{{ item }}"
state: file
with_items:
- "Report.md"
- "Definitions.md"
- "footer.tex"
- "head.tex"