https://github.com/ansibleguy/sw_ansible_webui
Ansible Role to provision AnsibleGuy-WebUI on a Linux server
https://github.com/ansibleguy/sw_ansible_webui
Last synced: 6 months ago
JSON representation
Ansible Role to provision AnsibleGuy-WebUI on a Linux server
- Host: GitHub
- URL: https://github.com/ansibleguy/sw_ansible_webui
- Owner: ansibleguy
- License: other
- Created: 2024-03-03T09:51:58.000Z (over 1 year ago)
- Default Branch: latest
- Last Pushed: 2024-11-10T10:48:43.000Z (8 months ago)
- Last Synced: 2024-11-10T11:30:11.027Z (8 months ago)
- Language: Shell
- Homepage: https://webui.ansibleguy.net/
- Size: 67.4 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
# Ansible Role - Ansible-WebUI
Role to provision [a basic WebUI for using Ansible](https://github.com/ansibleguy/webui) on a linux server.
**DISCLAIMER**: This WebUI is an **unofficial community project**! Do not confuse it with the vanilla [Ansible](https://ansible.com/) product!
[](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/molecule.sh.j2)
[](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/yamllint.sh.j2)
[](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/pylint.sh.j2)
[](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/ansiblelint.sh.j2)
[](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:**
* Debian 12----
## Install
```bash
# latest
ansible-galaxy role install git+https://github.com/ansibleguy/sw_ansible_webui# from galaxy
ansible-galaxy install ansibleguy.sw_ansible_webui# or to custom role-path
ansible-galaxy install ansibleguy.sw_ansible_webui --roles-path ./roles# install dependencies
ansible-galaxy install -r requirements.yml
```----
## Advertisement
* Need **professional support** using Ansible? Contact us:
E-Mail: [[email protected]](mailto:[email protected])
Tel: [+43 3115 40 900 0](tel:+433115409000)
Web: [EN](https://www.o-x-l.com) | [DE](https://www.oxl.at)
Language: German or English
----
## Usage
### Config
Define the config as needed:
Minimal config:
```yaml
ansible_webui:
config:
AW_HOSTNAMES: 'ansible.template.ansibleguy.net'
```Options:
```yaml
ansible_webui:
manage:
webserver: true # install and configure local nginx with min-ca cert
backup: true # install service for daily local database backup (if database is managed)
user: true # create service-user 'ansible-webui'
ansible_cfg: true # provision /home/ansible-webui/ansible.cfgrequirements: # requirements your execution-environment needs
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: '...' # minimum 30 characters; random one will be used if none was providedansible_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: 2nginx:
... # configure the webserver settings => see: https://github.com/ansibleguy/infra_nginx
```You might want to use 'ansible-vault' to encrypt your passwords:
```bash
ansible-vault encrypt_string
```### Execution
Run the playbook:
```bash
ansible-playbook -K -D -i inventory/hosts.yml playbook.yml
```There are also some useful **tags** available:
* config
* webserverTo debug errors - you can set the 'debug' variable at runtime:
```bash
ansible-playbook -K -D -i inventory/hosts.yml playbook.yml -e debug=yes
```----
## Functionality
* **Package installation**
* Python3, Python3-PIP, Python3-Virtualenv, Git, Git-LFS
* AnsibleGuy-WebUI with its Python3 Module-dependencies* **Configuration**
* Virtual-Environment used (`/home/ansible-webui/venv`)* **Default config**:
* Cleanup logs older than 180 days
* Backup retention 30 days* **Default opt-ins**:
* Installing common Python3 modules (*'jmespath', 'netaddr', 'passlib', 'pywinrm', 'requests', 'cryptography'*)
* Daily local backups
* Auto-Upgrade App and Requirements on service-startup
* Nginx proxy
* Create service-user## Info
* **Note:** this role currently only supports debian-based systems
* **Note:** Most of the role's functionality can be opted in or out.
For all available options - see the default-config located in [the main defaults-file](https://github.com/ansibleguy/sw_ansible_webui/blob/latest/defaults/main/1_main.yml)!
* **Warning:** Not every setting/variable you provide will be checked for validity. Bad config might break the role!