ansibleguy.sw_ansible_webui

<a href="https://github.com/ansibleguy/webui">
  <img src="https://raw.githubusercontent.com/ansibleguy/webui/latest/src/ansibleguy-webui/aw/static/img/logo.svg" alt="AnsibleGuy-WebUI Logo" width="300"/>
</a>

# Ansible Role - Ansible-WebUI

This role sets up [a simple WebUI to use Ansible](https://github.com/ansibleguy/webui) on a Linux server.

<a href='https://ko-fi.com/ansible0guy' target='_blank'><img height='35' style='border:0px;height:46px;' src='https://az743702.vo.msecnd.net/cdn/kofi3.png?v=0' border='0' alt='Buy me a coffee' />

**DISCLAIMER**: This WebUI is an **unofficial community project**! It is different from the standard [Ansible](https://ansible.com/) product!

[![Molecule Test Status](https://badges.ansibleguy.net/sw_ansible_webui.molecule.svg)](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/molecule.sh.j2)
[![YamlLint Test Status](https://badges.ansibleguy.net/sw_ansible_webui.yamllint.svg)](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/yamllint.sh.j2)
[![PyLint Test Status](https://badges.ansibleguy.net/sw_ansible_webui.pylint.svg)](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/pylint.sh.j2)
[![Ansible-Lint Test Status](https://badges.ansibleguy.net/sw_ansible_webui.ansiblelint.svg)](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/ansiblelint.sh.j2)
[![Ansible Galaxy](https://badges.ansibleguy.net/galaxy.badge.svg)](https://galaxy.ansible.com/ui/standalone/roles/ansibleguy/sw_ansible_webui)

Molecule Logs: [Short](https://badges.ansibleguy.net/log/molecule_sw_ansible_webui_test_short.log), [Full](https://badges.ansibleguy.net/log/molecule_sw_ansible_webui_test.log)

**Tested on:**
* Debian 12

## Installation

```bash
# to install the latest version
ansible-galaxy role install git+https://github.com/ansibleguy/sw_ansible_webui

# to install from Ansible Galaxy
ansible-galaxy install ansibleguy.sw_ansible_webui

# to install in a custom role path
ansible-galaxy install ansibleguy.sw_ansible_webui --roles-path ./roles

# to install dependencies
ansible-galaxy install -r requirements.yml

How to Use

Configuration

Set up the configuration as needed:

Basic configuration example:

ansible_webui:
  config:
    AW_HOSTNAMES: 'ansible.template.ansibleguy.net'

Available options:

ansible_webui:
  manage:
    webserver: true  # install and set up local Nginx with a minimum CA certification
    backup: true  # set up a service for daily local database backups (if database is managed)
    user: true  # create a service user named 'ansible-webui'
    ansible_cfg: true  # set up /home/ansible-webui/ansible.cfg

  requirements:  # requirements needed for your execution environment
    pip: ['httpx']  # any Python3 modules
    collections: ['community.general']  # any Ansible collections (if persistent_requirements=true)
    roles: []  # any Ansible roles (if persistent_requirements=true)

  config:  # for options see: https://webui.ansibleguy.net/en/latest/usage/4_config.html#settings
    AW_HOSTNAMES: 'ansible.template.ansibleguy.net'
    # AW_SECRET: '...'  # must be at least 30 characters; a random one will be used if none provided

  ansible_config:  # /home/ansible-webui/ansible.cfg if manage.ansible_cfg=true; see: https://docs.ansible.com/ansible/latest/reference_appendices/config.html
    defaults:  # section
      remote_port: 48322
      vault_id_match: 'webui'
    diff:
      context: 2

  nginx:
    ...   # configure the web server settings => see: https://github.com/ansibleguy/infra_nginx

For password security, you may want to use 'ansible-vault' to encrypt your passwords:

ansible-vault encrypt_string

Running the Playbook

Execute the playbook with this command:

ansible-playbook -K -D -i inventory/hosts.yml playbook.yml

You can also use helpful tags:

  • config
  • webserver

For debugging errors, you can set the 'debug' variable at runtime:

ansible-playbook -K -D -i inventory/hosts.yml playbook.yml -e debug=yes

Features

  • Package Installation

    • Python3, Python3-PIP, Python3-Virtualenv, Git, Git-LFS
    • AnsibleGuy-WebUI with its Python3 module dependencies
  • Configuration

    • Uses a Virtual Environment located at /home/ansible-webui/venv

    • Default Configuration:

      • Cleans up logs older than 180 days
      • Keeps backups for 30 days
    • Default Options:

      • Installs common Python3 modules ('jmespath', 'netaddr', 'passlib', 'pywinrm', 'requests', 'cryptography')
      • Daily local backups
      • Auto-upgrades app and requirements on service startup
      • Nginx proxy
      • Creates a service user

Additional Information

  • Note: This role currently only supports Debian-based systems.

  • Note: You can choose whether to enable or disable most features of the role.

    For a full list of options, please refer to the default configuration in the main defaults file!

  • Warning: Not all settings or variables will be checked for correctness. Incorrect configurations might cause the role to fail!

```

Informazioni sul progetto

Ansible role to provision a basic WebUI for using Ansible on a linux server

Installa
ansible-galaxy install ansibleguy.sw_ansible_webui
Licenza
other
Download
1.1k
Proprietario
[email protected] | GPG: https://badges.ansibleguy.net/public.gpg