feat: Reorganizes files

This commit is contained in:
2024-11-27 08:55:37 -05:00
parent 6e6c887085
commit f279d17065
13 changed files with 42 additions and 6 deletions

View File

@@ -1,3 +1,4 @@
playbook_dir := "${ANSIBLE_LOCAL}/ansible-hpa-playbook"
edit-repo-vault:
@ansible-vault edit ./repo_vars/vault.yml
@@ -7,3 +8,11 @@ create-repo-vault:
edit-project-vault:
@ansible-vault edit ./vault.yml
create-project dir *ARGS:
@ansible-playbook {{playbook_dir}}/main.yml \
--inventory {{playbook_dir}}/inventory.ini \
--tags setup-project \
--extra-vars "output_dir={{dir}}" \
--extra-vars "@{{justfile_directory()}}/repo_vars/vars.yml" \
{{ARGS}}

View File

View File

View File

View File

@@ -0,0 +1 @@
.build/*

View File

@@ -1,3 +1,4 @@
playbook_dir := "${ANSIBLE_LOCAL}/ansible-hpa-playbook"
build_dir_name := ".build"
@@ -14,10 +15,17 @@ run_pandoc dir output_file: build
{{build_dir_name}}/"Report.md" \
{{build_dir_name}}/"Definitions.md"
[private]
run-playbook *ARGS:
@ansible-playbook {{playbook_dir}}/main.yml \
--inventory {{playbook_dir}}/inventory.ini \
--extra-vars "output_dir={{justfile_directory()}}" \
--extra-vars "project_dir={{justfile_directory()}}" \
{{ARGS}}
# Builds and fills the templates into the .build directory.
[group('build')]
build:
@just --justfile {{playbook_dir}}/justfile build {{justfile_directory()}}
build: (run-playbook "--tags build-project")
# Build & generate an HTML report.
[group("generate")]

View File

@@ -2,6 +2,10 @@
document_title: "Home Performance Report"
template:
path: "{{ lookup('env', 'HOME') }}/projects/consult-template/"
vars: repo_vars
# Files to copy to the project directory when setting up a new consult project.
#
# These can be specified as a single item which is a path to the file
@@ -11,10 +15,21 @@ document_title: "Home Performance Report"
# dest: "FileName"
# mode: '0600' # optional mode, defaults to 0600
copy_on_setup:
- "Report.md"
- "vars.yml"
- "vault.yml"
- src: project.justfile
- src: "project_files/Report.md"
dest: "Report.md"
- src: "project_files/vars.yml"
dest: "vars.yml"
- src: "project_files/vault.yml"
dest: "vault.yml"
- src: "project_directories/img/"
dest: img
- src: "project_directories/Airflow/"
dest: Airflow
- src: "project_directories/ManJ/"
dest: ManJ
- src: project_files/project.gitignore
dest: .gitignore
- src: project_files/project.justfile
dest: justfile
# Files to copy to the build directory when building a consult document.
@@ -28,6 +43,9 @@ copy_on_setup:
copy_on_build:
- "{{ template.path }}/Definitions.md"
- "{{ template.path }}/head.tex"
- "{{ template.path }}/img"
- "{{ template.path }}/Airflow"
- "{{ template.path }}/ManJ"
# Files to fill with their template values and copy to the build directory.
#