feat: Reorganizes files
This commit is contained in:
9
justfile
9
justfile
@@ -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}}
|
||||
|
||||
0
project_directories/Airflow/.gitkeep
Normal file
0
project_directories/Airflow/.gitkeep
Normal file
0
project_directories/ManJ/.gitkeep
Normal file
0
project_directories/ManJ/.gitkeep
Normal file
0
project_directories/img/.gitkeep
Normal file
0
project_directories/img/.gitkeep
Normal file
1
project_files/project.gitignore
Normal file
1
project_files/project.gitignore
Normal file
@@ -0,0 +1 @@
|
||||
.build/*
|
||||
@@ -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")]
|
||||
@@ -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.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user