Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
Added schema for Ansible Execution Environments
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Jan 14, 2022
1 parent 26e72c2 commit a5c385a
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
21 changes: 21 additions & 0 deletions examples/execution-environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# Example from https://docs.ansible.com/automation-controller/latest/html/userguide/ee_reference.html
version: 1

build_arg_defaults:
EE_BASE_IMAGE: 'quay.io/ansible/ansible-runner:stable-2.10-devel'

ansible_config: 'ansible.cfg'

dependencies:
galaxy: requirements.yml
python: requirements.txt
system: bindep.txt

additional_build_steps:
prepend: |
RUN whoami
RUN cat /etc/os-release
append:
- RUN echo This is a post-install command!
- RUN ls -la /etc
74 changes: 74 additions & 0 deletions f/ansible-ee.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "Ansible Execution Environment Schema",
"description": "See https://docs.ansible.com/automation-controller/latest/html/userguide/ee_reference.html",
"type": "object",
"additionalProperties": false,
"examples": [
"execution-environment.yml"
],
"properties": {
"build_arg_defaults": {
"type": "object",
"additionalProperties": true,
"properties": {
"EE_BASE_IMAGE": {
"type": "string"
}
}
},
"ansible_config": {
"title": "Ansible configuration file",
"type": "string",
"examples": ["ansible.cfg"]
},
"dependencies": {
"title": "Dependencies",
"description": "Allows adding system, python or galaxy dependencies.",
"type": "object",
"properties": {
"galaxy": {
"title": "Optional galaxy file",
"markdownDescription": "Example `requirements.yml`",
"type": "string",
"examples": ["requirements.yml"]
},
"python": {
"type": "string",
"title": "Optional python package dependencies",
"markdownDescription": "Example `requirements.txt`",
"examples": ["requirements.txt"]
},
"system": {
"type": "string",
"title": "Optional system dependencies using bindep format",
"markdownDescription": "Example `bindep.txt`",
"examples": ["bindep.txt"]
}
}
},
"additional_build_steps": {
"type": "object",
"title": "Commands to append or prepend to container build process.",
"properties": {
"prepend": {
"type": ["string", "array"],
"examples": ["RUN cat /etc/os-release"]
},
"append": {
"type": ["string", "array"],
"examples": ["RUN cat /etc/os-release"]
}
}
},
"version": {
"title": "Version",
"type": "integer",
"enum": [1]
}
},
"required": [
"version",
"dependencies"
]
}

0 comments on commit a5c385a

Please sign in to comment.