Files
ansible-role-hpa/README.md
2024-11-24 13:24:33 -05:00

133 lines
4.8 KiB
Markdown

# ansible-role-hpa
An ansible role for managing and building Home Performance Assessment reports.
In general this role is used to generate files from templates. The role provides the templates and
uses the variables to inject information into the final documents that can be used by `pandoc` to
generate an output file (generally a PDF).
## Requirements
The role itself does not have any requirements, however generating reports uses:
- [Pandoc](https://pandoc.org/)
- [MacTex](https://www.tug.org/mactex/)
- [ImageMagick](https://imagemagick.org/index.php)
- [gettext](https://www.gnu.org/software/gettext/)
## Role Variables
### Author Name (author_name):
Defines the author name for the Home Performance Assessment report.
### Document Title (document_title):
Defines the document title for the Home Performance Assessment report.
### Company (company):
Defines company attributes for the company who is generating the Home Performance Assessment report.
It has the following variables:
- **website**: The company's website.
- **phone**: The company's phone number.
- **url_display_title**: The display title used for links to the company's website.
### Links (links):
Defines links used in the Home Performance Assessment report.
#### Image Links (links.images):
- **logo**: An image file that is the companies logo.
- **trueflow**: An image file that is of the TrueFlow Report.
- **trueflow_forecast**: An image file that is of the TrueFlow Forecast Report.
#### Document Links (links.documents):
- **loads_folder**: A link to the customers load calculations.
- **trueflow_file**: A link to the customers TrueFlow report.
- **trueflow_forecast_file**: A link to the customers TrueFlow Forecast report.
- **document_folder**: A link to all the customers documents.
### Customer (customer):
Defines the customer information that the Home Performance Assessment report is being generated for.
- **name**: The customers name.
- **address**:
- **street**: The customers street address.
- **city**: The customers city.
- **state**: The customers state.
- **zip**: The customers zip code.
### Home (home):
Defines variables about the customers home that are used in the Home Performance Assessment report.
- **square_feet**: The home's square footage.
- **cfm50**: The home's leakage rate in CFM-50.
- **lair**: The home's Leakage Air Infiltration Rate.
### Config (config):
This stores lesser used variables. They are generally for internal use of the role. In general you
should not have to declare or change these variables and should use the defaults.
- **build_dir_name**: The directory name for build files (default is ".build")
- **work_dir**: The current working directory (default is `pwd`)
- **build_dir**: The build directory (defaults to `pwd/<build_dir_name>`)
- **paths**:
- **report_path**: Path to the customize report template file (defaults is `pwd/Report.md`).
- **footer_path**: Path to the `footer.tex` file (default is the internal template)
- **head_path**: Path to the `head.tex` file (default is the internal template).
- **definitions_path**: Path to the `Definitions.md` file (default is the internal definitions
file)
## Tags
The following tags are used to control which tasks the role runs.
### Setup Tags
The setup tags are used to copy template files to your working directory. These are used prior to
calling the `build` tag.
#### Primary setup tags to use:
- **setup**: Setup the templates and variables in your working directory. This will make a copy of
the default Report file and the default variables for you to adjust to your needs.
- **setup-with-vault**: Setup the templates and variables using variable templates for use with
ansible-vault.
#### Lesser used setup tags:
- **setup-definitions**: Copy the default definitions in your working directory to be customized.
- **setup-head**: Copy the default head file in your working directory to be customized.
- **setup-footer**: Copy the default footer file in your working directory so that it can be
customized.
- **setup-all**: Copies all files, templates, and variables in your working directory, not using
ansible-vault variables.
- **setup-all-with-vault**: Copies all files, templates, and variables in your working directory,
using the ansible-vault variables.
> Note: When using any of the above commands, except `setup` and `setup-with-vault`, you will want
> to change the appropriate `config.paths` variables to point to the files you customize before
> using the `build` tag.
### Build Tag
The `build` tag is used after you've customized the documents and templates for your client. It will
then replace any template variable values defined in your variables to be able to be processed by
`pandoc` to generate your final PDF output.
## License
MIT
## Author Information
An optional section for the role authors to include contact information, or a website (HTML is not
allowed).