feat: Begins setup-project role.

This commit is contained in:
2024-11-25 20:48:57 -05:00
parent e2d1360ab3
commit 3a4285a397
8 changed files with 71 additions and 57 deletions

View File

@@ -1,47 +0,0 @@
# Definitions
<!-- NOTE: Keep these at the very bottom, if any new definitions are added then
they should also be added as links to the content section near the top. -->
### CFM50 {#cfm50-definition}
Is a unit of measurement that is taken when a blower door test is performed on the home. Stands for
$C$ubic $F$eet per $M$inute at 50 pascals.
### IAQ {#iaq-definition}
Stands for $I$ndoor $A$ir $Q$uality. We spend most of our time indoors, so having good indoor air
quality can help reduce illness and potentially improve the quality and longevity of life.
### LAIR {#lair-definition}
Stands for $L$eakage $A$ir $I$nfiltration $R$ate, which is a metric that compares the square footage
of the home and it's blower door number. This aids in determining if a home is controllable by
properly sized HVAC equipment or if [shell] improvements (air sealing and insulation) should be
considered.
### Load Caclulation {#load-calculation-definition}
A load calculation, also called a Manual-J, calculates the heating and cooling requirements for a
home. Each home has a unique heating and cooling load based on the direction it faces, the air
leakage, the location, the insulation values, the types and sizes of windows, among other factors.
### Shell {#shell-definition}
Shell is a term used to describe the enclosure of the house. It is often used when talking about air
leakage and insulation levels.
### SHR {#shr-definition}
Stands for $S$ensible $H$eat $R$atio. Sensible heat ratio is the ratio of work required by the air
conditioner to remove moisture, as well as maintain the sensible temperature. The higher the number
the better.
### TESP {#tesp-definition}
Stands for $T$otal $E$xternal $S$tatic $P$ressure, which is a metric used to determine how much
resistance the blower motor has to overcome for the airflow requirement of the system.
### WC {#wc-definition}
Stands for $W$ater $C$olumn, which is a unit of measurement for pressure.

View File

@@ -1,3 +1,13 @@
work_dir := "/tmp/hpa-playbook-tmp"
run-playbook *ARGS:
ansible-playbook ./main.yml "$@"
@ansible-playbook ./main.yml \
--extra-vars output_dir={{work_dir}} \
{{ARGS}}
test *ARGS:
@ansible-playbook ./test/test.yml {{ARGS}}
[group("utilities")]
clean:
@rm -rf {{work_dir}}

View File

@@ -2,4 +2,6 @@
- name: HPA Playbook
hosts: all
roles:
- "repo_template"
- role: "repo_template"
tags:
- never # makes it so a tag must be supplied to run.

View File

@@ -4,7 +4,13 @@
msg: "Output directory: {{ output_dir }}"
tags:
- "repo-template"
- "never"
- name: Ensure output directory exists.
ansible.builtin.file:
path: "{{ output_dir }}"
state: directory
tags:
- repo-template
- name: Copy general files.
ansible.builtin.copy:
@@ -17,17 +23,16 @@
- "footer.tex"
tags:
- "repo-template"
- "never"
- name: Copy vars files.
- name: Copy basic vars files.
ansible.builtin.copy:
src: "files/vars.default.yml"
dest: "{{ output_dir }}/vars.yml"
when: "not 'with-vault' in ansible_run_tags"
tags:
- "with-default-vars"
- "never"
- "repo-template"
- name: Copy vars files.
- name: Copy vault and vars files.
ansible.builtin.copy:
src: "files/{{ item.src }}"
dest: "{{ output_dir }}/{{ item.dest }}"
@@ -37,5 +42,5 @@
- src: "vault.default.yml"
dest: "vault.yml"
tags:
- "with-vault-vars"
- "never"
- "with-vault"
- never

View File

@@ -0,0 +1,11 @@
---
template_repo:
repo: "https://example.com/repo.git"
version: "main"
dest: "/path/to/clone"
output_dir: "{{ lookup('env', 'PWD') }}"
files_to_copy:
- "Report.md"
- "vars.yml"

View File

@@ -0,0 +1,14 @@
---
- name: Starting setup project.
ansible.builtin.debug:
msg: "Output dir: {{ output_dir }}"
tags:
- setup-project
- name: Ensure repo.
ansible.builtin.git:
repo: "{{ template_repo.repo }}"
dest: "{{ template_repo.dest }}"
version: "{{ template_repo.version }}"
tags:
- setup-project

3
test/ansible.cfg Normal file
View File

@@ -0,0 +1,3 @@
[defaults]
inventory = ../inventory.ini
roles_path = ../roles

16
test/test.yml Normal file
View File

@@ -0,0 +1,16 @@
---
- name: Test ansible-hpa-playbook
hosts: all
roles:
- role: setup-project
tags:
- never # force passing tags to run.
vars:
template_repo:
repo: "https://git.housh.dev/michael/ansible-hpa-playbook.git"
dest: "/tmp/playbook-clone"
version: "main"
- role: repo_template
tags:
- never # force passing tags to run.