-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(PRECHECK): use jsonschema to validate precheck env.yml
- Loading branch information
1 parent
61398f5
commit d04ee04
Showing
9 changed files
with
107 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
Mac Maker Profiles | ||
================== | ||
|
||
Profiles are essentially a standardized Ansible Playbook, with explicitly defined dependencies, and some a some extra metadata. | ||
|
||
The directory structure is defined as follows: | ||
|
||
:: | ||
|
||
root | ||
│ | ||
├── profile | ||
│ │ | ||
│ ├── __precheck__ | ||
│ │ │ | ||
│ │ ├── env.yml | ||
│ │ └── notes.txt | ||
│ │ | ||
│ ├── requirements.yml | ||
│ └── install.yml | ||
│ | ||
└── pyproject.toml | ||
|
||
|
||
================= | ||
Precheck Metadata | ||
================= | ||
|
||
This information exists to give the end user of a profile a way of validating they have set any required environment variables, and provides a way for them to review any release notes. | ||
|
||
- The `notes.txt` file contains free form release notes about the profile. | ||
- The `env.yml` file defines all required environment files consumed by the profile. | ||
|
||
.. toctree:: | ||
profiles/env.yml.spec.rst | ||
|
||
=================== | ||
Galaxy Requirements | ||
=================== | ||
|
||
The `requirements.yml` file is the Ansible Galaxy dependencies definition file. Any external roles or collections the profile requires should be defined here. Mac Maker will download and install these dependencies prior to applying your profile. | ||
|
||
- `requirements.yml File Specification <https://docs.ansible.com/ansible/devel/user_guide/collections_using.html#install-multiple-collections-with-a-requirements-file>`_ | ||
|
||
====================== | ||
`install.yml` Playbook | ||
====================== | ||
|
||
The `install.yml` playbook is the Ansible `entrypoint` into the profile. This playbook is called when Mac Maker applies the profile. | ||
|
||
All roles and tasks should be defined in this file, and should be accessed from relative paths to this file. | ||
|
||
(Frequently it makes sense to created sub-folders under profile to nest `task`, `vars` and `handler` files for a profile). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
`env.yml` File Specification | ||
============================================= | ||
|
||
.. jsonschema:: ../../../../mac_maker/schemas/env_v1.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"description": "Mac Maker v1 Profile Environment File Specification", | ||
"type": "array", | ||
"items": | ||
{ | ||
"type": "object", | ||
"properties": | ||
{ | ||
"name": | ||
{ | ||
"type": "string", | ||
"description": "The name of the environment variable that is required to be set, in order to apply this profile." | ||
}, | ||
"description": | ||
{ | ||
"type": "string", | ||
"description": "A description of the environment variable explaining it's purpose and function." | ||
} | ||
}, | ||
"required": ["name", "description"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters