2021-03-25 10:25:15 +00:00
|
|
|
[![Test deployment](https://github.com/GeekOops/geekoops-nginx/actions/workflows/CI.yml/badge.svg)](https://github.com/GeekOops/geekoops-nginx/actions/workflows/CI.yml)
|
|
|
|
|
2021-03-24 08:46:11 +00:00
|
|
|
# geekoops-nginx
|
|
|
|
|
|
|
|
Configurable ansible role for setting up a nginx webserver on a Linux server. Works with
|
|
|
|
|
2022-06-27 14:10:59 +00:00
|
|
|
- openSUSE Leap 15.3
|
|
|
|
- openSUSE Leap 15.4
|
2021-03-24 08:46:11 +00:00
|
|
|
- Debian Buster
|
|
|
|
|
|
|
|
## Role Variables
|
|
|
|
--------------
|
|
|
|
|
|
|
|
You can set the following variables to configure the role. Here listed are the variables and their default settings.
|
|
|
|
|
|
|
|
Firewall configuration (disable by default)
|
|
|
|
|
2021-03-25 10:18:14 +00:00
|
|
|
|
|
|
|
| Value | Description | Default |
|
|
|
|
|-------|-------------|---------|
|
|
|
|
|`config_firewall` | Enable firewall configuration | false |
|
|
|
|
|`firewall_zone` | Firewall zone to configure | "public" |
|
|
|
|
|`open_http` | Open http port | true |
|
|
|
|
|`open_https` | Open https port | true |
|
2021-03-25 10:22:10 +00:00
|
|
|
|`setup_default_page` | Setup a default page | false |
|
|
|
|
|`default_page_hostname`| Hostname for the default page | "localhost" |
|
2021-03-24 08:46:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Example Playbook
|
|
|
|
|
|
|
|
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
|
|
|
|
2021-03-26 10:25:30 +00:00
|
|
|
- hosts: jellyfish
|
2021-03-24 08:46:11 +00:00
|
|
|
roles:
|
|
|
|
- { role: geekoops-nginx, config_firewall: true }
|
|
|
|
|
2022-06-27 14:10:59 +00:00
|
|
|
An advanced example for the imaginary `jellyfish` test server
|
2021-03-24 08:46:11 +00:00
|
|
|
|
|
|
|
- hosts: jellyfish
|
|
|
|
roles:
|
|
|
|
- role: geekoops-nginx
|
|
|
|
vars:
|
|
|
|
setup_default_page: true
|
|
|
|
default_page_hostname: "{{ansible_host}}"
|
|
|
|
config_firewall: true
|
|
|
|
firewall_zone: "public"
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
MIT
|
|
|
|
|
|
|
|
# Development
|
|
|
|
|
|
|
|
## Add githooks
|
|
|
|
|
|
|
|
This repository ships pre-commit git hooks that will check the yaml syntax. To configure them do
|
|
|
|
|
|
|
|
git config --local core.hooksPath .githooks/
|