Git Product home page Git Product logo

webui's Introduction

Basic WebUI for using Ansible

Buy me a coffee

Documentation Lint Test

DISCLAIMER: This is an unofficial community project! Do not confuse it with the vanilla Ansible product!

The goal is to allow users to quickly install & run a WebUI for using Ansible locally.

Keep it simple.

This project is still in early development! DO NOT USE IN PRODUCTION!


Setup

Local - PIP

Requires Python >=3.10

# install
python3 -m pip install ansibleguy-webui

# run
python3 -m ansibleguy-webui

Docker

Images: webui, webui-unprivileged, webui-aws

docker image pull ansible0guy/webui:latest
docker run -d --name ansible-webui --publish 127.0.0.1:8000:8000 ansible0guy/webui:latest

# or with persistent data (volumes: /data = storage for logs & DB, /play = ansible playbook base-directory)
docker run -d --name ansible-webui --publish 127.0.0.1:8000:8000 --volume $(pwd)/ansible/data:/data --volume $(pwd)/ansible/play:/play ansible0guy/webui:latest

Demo

Check out the demo at: demo.webui.ansibleguy.net

Login: User demo, Password Ansible1337


Usage

Documentation


Contribute

Feel free to contribute to this project using pull-requests, issues and discussions!

Testers are also very welcome! Please give feedback

See also: Contributing


Roadmap

  • Ansible Config

    • Static Playbook-Directory

    • Git Repository support

  • Users

  • Jobs

    • Execute Ansible using ansible-runner

    • Job Logging

      • Write job metadata to database

      • Write full job-logs to Filesystem

    • Secret handling (Connect, Become, Vault)

      • User-specific job credentials
    • Alerting on Failure

      • E-Mail

      • Support for external Plugins (simple Interface for Scripts)

  • WebUI

    • Job Dashboard

      Status, Execute, Time of last & next execution, Last run User, Links to Warnings/Errors

    • Job Output

      Follow the jobs output in realtime

    • Job Errors

      UI that allows for easy error analysis. Access to logs and provide links to possible solutions

    • Show Ansible Running-Config

    • Show Ansible Collections

      • Check Collections for available updates (Galaxy + GitHub releases)
    • Mobile Support

    • Multi-Language Support

  • API

    • Manage and execute Jobs
  • Database

    • Support for MySQL
  • Testing

    • Unit Tests

    • Integration Tests

      • Basic WebUI checks

      • API Endpoints

      • Permission system

webui's People

Contributors

ansibleguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

webui's Issues

Feature: ansible role to deploy

Scope

Unknown

Description

I'm an anxiously awaiting your ansible role to cleanly install ag-webui. I'd expect this to be a low priority.

Off to do my first install. Expect more "Issues"!

Side bar; probably due to UBO medium mode and/or user.js on firefox, the checkboxes for Docs and Ansible Docs are not not clickable.

Feature: Execution Forms

Scope

Frontend (User Interface)

Description

Sometimes users want/need to executes jobs with some override or a job is always meant to be ran with some given variables (pe. create user X with privilege Y on server Z)

Feature: Custom Job-Edit Form

Scope

Frontend (User Interface)

Description

To optimize that view - as it is and will be the most used form in the app

The job screen could be limited to those two fields (playbook/inventory) only with an expander (similar to the "show logs" button?) to reveal the remaining fields.

The schedule-enabled flag is ignored if no schedule is supplied - so that one should be fine in my opinion. Maybe it could also be hidden if no schedule was supplied.

Problem: E-Mail Template not distributed

Versions

0.0.19

Scope

Service (Job Scheduling, Job Preparation)

Issue

When sending emails we see: django.template.exceptions.TemplateDoesNotExist: email/alert.txt
This might be because the extension is not distributed - see pyproject.toml

After manually adding the email.txt file to the templates/email directory - it works.

Feature: Password-change

Scope

Frontend (User Interface)

Description

You can change your own password using the System - Admin page if you are marked as staff.
But not every user is.
There should be a System - Password UI or something like that

Problem: Older logs not showing

Versions

0.0.18

Scope

Frontend (User Interface)

Issue

The way the log-polling/-filtering is done will not work for logs that are older. As the N (unfiltered) entries polled may not include any of the job we filter on

Feature: Cleaner API-Data-Fetching

Scope

Backend (API)

Description

Currently we fetch all the data-entries of the current view every refresh-interval (1 sec).
We then check if the data has changed using JS and update the table-rows in that case.

It would be nicer to only fetch the changed datasets. That way we could save on transferred data.
This would mean we will have to pre-filter the data on the backend and implement web-sockets

This is not really an issue for now - but I dislike the current handling as it is somewhat unclean.

Problem: SQLite Write Lock

Versions

latest

Scope

Backend (API)

Issue

Since implementing the repository functionality we randomly see OperationalError: database is locked errors occurring.
It looks like some write operation locks the database for multiple seconds.
SQLite only supports one write-operation at a time. This is a known limitation.
We should not run into that limitation for some time. The writes we perform are not data-intensive and should easily be done in < 0.1s

Problem: Alert Mail - without Credentials

Versions

0.0.19

Scope

Service (Job Scheduling, Job Preparation)

Issue

If you want to use a mailserver without authentication (p.e. local postfix) the alert will fail with error SMTP AUTH extension not supported by server

Problem: Connect/Become user issue

Versions

Ansible Web-UI latest
Django 4.2.10
Django Rest-Framework 3.14.0
Gunicorn 21.2.0
Ansible Core ansible [core 2.15.9]
Ansible Runner 2.3.5

Scope

Ansible (Job Execution)

Issue

The target server logs: sshd: Invalid user ansible-webui
It seems the ansible_user variable is not set/used in a consistent manner.
If I create credentials - they work for a few runs. But they stop working after some time.

As a workaround I added -e ansible_user=<USER> as 'Commandline Arguments' of the job.

Also:
It seems if I do not set a specific become-user it defaults to the connect-user - which is not the expected/default behavior: (should be root)
-u <USER> --become-user <USER>
See: https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_privilege_escalation.html#become-directives

Problem: Crashing on Request if AW_TIMEZONE is set

Versions

0.0.15

Scope

Backend (API)

Issue

Something about the timezone handling is buggy.
If one supplies the AW_TIMEZONE env-var (CET in my test-case) - it will break the request handling.
Probably because it is referenced in the settings.py of django

Problem: Staff-user/Manager Permission Access

Versions

Ansible Web-UI latest
Django 4.2.10
Django Rest-Framework 3.14.0
Gunicorn 21.2.0
Ansible Core ansible [core 2.15.9]
Ansible Runner 2.3.5

Scope

Backend (API)

Issue

Manager users marked as staff are able to change permissions they that limit their own access.
They are able to add permissions to grant themselves higher privileges

Problem: Git-Repository - host-key verification

Versions

0.0.15

Scope

Service (Job Scheduling, Job Preparation)

Issue

The git cloning is not using the configured known_hosts file.
The Git Override Initialize-Command should be documented with some examples.

Got error: 'Cloning into '/tmp/ansible-webui/repositories/TEST'...
Host key verification failed.
fatal: Could not read from remote repository.

Feature: Sort job view

Scope

Frontend (User Interface)

Description

Sort by next run time or alphabetically via name

Feature: Default Execution Prompts

Scope

Frontend (User Interface)

Description

If no execution prompts are configured, it would make sense to show some common used ones by default.

All optional:

  • Limit
  • Check mode
  • Diff mode
  • Tags

Also: add all supported options for the execution-prompts to the UI and/or docs.

Problem: Logs concat

Versions

0.0.16

Scope

Frontend (User Interface)

Issue

If one opens multiple logs one after another - they get concatted/merged some times.

Problem: DB Migration Issue

Versions

0.0.18 (PIP install)

Scope

Database

Issue

It shows the error sqlite3.DatabaseError: database disk image is malformed before the upgrade starts.
After deleting aw.db-shm and aw.db-wal it works without issues.

Feature: Execution duration

Scope

Frontend (User Interface)

Description

We currently have no way of knowing how long an execution has taken.
Maybe add the finish time and duration to the log UI

Problem: Diff mode not working

Versions

Ansible Web-UI latest
Django 4.2.10
Django Rest-Framework 3.14.0
Gunicorn 21.2.0
Ansible Core ansible [core 2.15.9]
Ansible Runner 2.3.5

Scope

Ansible (Job Execution)

Issue

Ansible config:

DIFF_ALWAYS	False	default
DIFF_CONTEXT	3	default

If I enable diff-mode for a job - the -D/-diff flag is not added

Feature: Job-Edit Button on Logs UI

Scope

Frontend (User Interface)

Description

When you are troubleshooting some job-setting issue, it would be nice to save on the 'Job - Manage' step

Problem: Database Upgrades

Versions

0.0.13

Scope

Database

Issue

I've seen that the Upgrade from 0.0.12 to 0.0.13 failed because the DB schema migration was not executed. It was a PIP-install. A docker install worked without any issues.

Feature: Job retries

Scope

Unknown

Description

It would be nice to have a job-retry setting.
If the job execution fails because of environmental errors (timeout, network, ...) it could be re-ran automatically.
Default may be 0 - no retries

Feature: Settings for gunicorn SSL

Scope

Unknown

Description

I have not installed the new ansibleguy-webui, but I've been following progress. I was also following the lack of progress on Semaphore. Thank you for your efforts on this. The demo site is down right now, but I'm planning to install.

Now onto my feature request, I would like native support for SSL certificates, particularly those from Lets Encrypt, but specific support is not essential.

A similar request fell on tone deaf ears in Semaphore. Hoping it evolves here. I don't use containers.

Thanks for the consideration. No scope fits this request, so leaving it Unknown.

Problem: Manager Privileges - Edit/Delete

Versions

0.12

Scope

Backend (API)

Issue

The manager permissions are a little unintuitive.
P.e. usere in 'Jobs Managers' can create jobs, but not edit them afterwards without an additional permission.
Not even 'Permission Managers' can do so - even though they can just add a permission for themselves to allow it.

I can't think of a situation where a 'Job Manager' should not be allowed to edit/delete a job

Problem: Marking/Selecting text in Logs UI

Versions

0.12

Scope

Frontend (User Interface)

Issue

It seems the log-view page refreshes in the background, resetting the text the user marked (p.e. to copy an error)

Feature: Choose credentials in execution prompts

Scope

Frontend (User Interface)

Description

It would be nice if we could choose the user- or global-credentials to use in the execution prompts as an alternative to the 'credential category'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.