Webmin is a web-based system administration tool for Unix-like operating systems. It provides a graphical interface to configure system settings such as user accounts, Apache, DNS, file sharing, and much more. Webmin is particularly useful for administrators who prefer a web-based management interface over command-line interactions. With Webmin, system administration becomes easier, as users can manage servers remotely via a web browser.
This Ansible role automates the installation and configuration of Webmin on Ubuntu systems. It ensures that Webmin is correctly set up with the necessary dependencies, repository configurations, and security settings. The role also provides options for SSL configuration, firewall rule adjustments, and reverse proxy settings.
- Ansible 2.9+
- Supported OS:
- Ubuntu 18.04, 20.04, or later
Variable | Default Value | Description |
---|---|---|
webmin_port |
443 |
Port on which Webmin will be accessible. |
webmin_listen |
0.0.0.0 |
IP address Webmin listens on. |
webmin_ssl |
1 |
Enable or disable SSL (1 = enabled, 0 = disabled). |
webmin_reverse_proxy_referer |
Not defined | A comma-separated list of reverse proxy referers. |
target_cert_path |
/etc/ssl |
Path where the SSL certificates will be stored. |
src_cert_file |
/path/to/cert/ |
Path to the directory where the certificates are stored. |
The role installs essential packages required for Webmin to function properly, including Perl, SSL libraries, and PAM authentication modules.
The Webmin repository is added, and the GPG key is installed to authenticate packages.
The Webmin package is installed from the repository and configured based on user-defined variables.
The following configurations are applied to /etc/webmin/miniserv.conf
:
- Port: The port Webmin will listen on.
- Listen Address: The IP address Webmin listens on.
- SSL: Whether SSL is enabled or disabled.
- Reverse Proxy Referer: Optionally set a referer for reverse proxying.
The role copies the SSL certificates from the Ansible controller to the target machines. It ensures that the required certificates and keys are securely transferred and placed in the appropriate directories on the target systems.
The role ensures Webmin is started and waits for the configured port to become accessible.
Note: Ensure that your firewall is configured to allow access to Webmin on the specified port. Without the appropriate rules, access to Webmin may be blocked when the firewall is active.
restart webmin
: Restarts the Webmin service after configuration changes.
Tag | Purpose |
---|---|
dependencies |
Installs required dependencies for Webmin. |
webmin |
Installs and configures Webmin. |
MIT
Maintained by AIT-CS IaaS.