aoh

A tool for running Ansible playbooks with `curl <url> | python` commands
git clone https://git.ashermorgan.net/aoh/
Log | Files | Refs | README

commit 2133cdf423de8207504ccdceb6b95610397d739c
parent 85a2b047775b9e61d65109dba6a936bb8b82ae06
Author: Asher Morgan <asher@ashermorgan.net>
Date:   Sat, 12 Sep 2026 12:33:02 -0700

Use absolute imports

Diffstat:
Maoh/__init__.py | 4++--
Maoh/__main__.py | 2+-
Maoh/playbook.py | 4++--
Maoh/runner.py | 2+-
Maoh/security.py | 4++--
Maoh/server.py | 12++++++++----
6 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/aoh/__init__.py b/aoh/__init__.py @@ -1,7 +1,7 @@ import logging -from .config import AOH_LOG_LEVEL -from .server import app, scheduler +from aoh.config import AOH_LOG_LEVEL +from aoh.server import app, scheduler logging.basicConfig() logging.getLogger(__name__).setLevel(AOH_LOG_LEVEL) diff --git a/aoh/__main__.py b/aoh/__main__.py @@ -1,3 +1,3 @@ -from . import create_app +from aoh import create_app create_app().run(debug=True) diff --git a/aoh/playbook.py b/aoh/playbook.py @@ -2,8 +2,8 @@ import os import yaml -from .config import AOH_PLAYBOOKS_FILE -from .security import CLI_OPT_BLACKLIST +from aoh.config import AOH_PLAYBOOKS_FILE +from aoh.security import CLI_OPT_BLACKLIST _PLAYBOOKS_DIR = os.path.dirname(AOH_PLAYBOOKS_FILE) diff --git a/aoh/runner.py b/aoh/runner.py @@ -10,7 +10,7 @@ import uuid import ansible_runner -from .config import AOH_DEBUG +from aoh.config import AOH_DEBUG _CONNECTION_PLUGIN_DIR = f'{os.path.dirname(__file__)}/connection_plugins/' diff --git a/aoh/security.py b/aoh/security.py @@ -1,8 +1,8 @@ import bcrypt import yaml -from .config import AOH_PASSWORDS_FILE -from .runner import get_config_values +from aoh.config import AOH_PASSWORDS_FILE +from aoh.runner import get_config_values CLI_OPT_WHITELIST = [ # These options should be safe for clients to invoke diff --git a/aoh/server.py b/aoh/server.py @@ -4,10 +4,14 @@ import os from flask import Flask, abort, render_template, request, session from flask_apscheduler import APScheduler -from .config import AOH_MAX_RUNNERS, AOH_ORIGIN -from .playbook import PlaybookError, get_playbook -from .runner import Runner, RunnerError -from .security import * +from aoh.config import AOH_MAX_RUNNERS, AOH_ORIGIN +from aoh.playbook import PlaybookError, get_playbook +from aoh.runner import Runner, RunnerError +from aoh.security import ( + get_required_passwords, + validate_aoh_password, + validate_args, +) _RUNNERS = {}