diff --git a/docs/plugins.md b/docs/plugins.md index baa4259a1..89be842af 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -119,6 +119,16 @@ The first step is to install the plugin by putting the plugin files inside the c cp -rp ./bunkerweb-plugins/* /data/plugins ``` +=== "Ansible" + When using the [Ansible integration](/1.4/integrations/#ansible), plugins must be written to the varaibles `plugins` within your Ansible inventory. : + ```ini + [all] + "Your_IP" + + [all:vars] + plugins="PathToYourPlugins" + ``` + When a plugin is installed, you are ready to use it, please refer to the plugin documentation for more information. ## Writing a plugin diff --git a/docs/quickstart-guide.md b/docs/quickstart-guide.md index 22a1add53..cca9aac99 100644 --- a/docs/quickstart-guide.md +++ b/docs/quickstart-guide.md @@ -304,6 +304,15 @@ You will find more settings about reverse proxy in the [settings section](/1.4/s variables_env: ../variables.env ``` + Or in INI format : + ```ini + [all] + host + + [all:vars] + variables_env = ../variables.env + ``` + Run the playbook : ```shell ansible-playbook -i inventory.yml playbook.yml @@ -907,11 +916,44 @@ You will find more settings about reverse proxy in the [settings section](/1.4/s ```yaml all: children: - Groups: + host1: hosts: "Your_IP_Address": - vars: - variables_env: ../variables.env + vars: + variables_env: ../variables.env + host2: + hosts: + "Your_IP_Address": + vars: + variables_env = variables.env + enable_ui=true + host3: + hosts: + "Your_IP_Address": + vars: + variables_env = ../variables.env + custom_site=../site + plugins=../plugins + ``` + + Or in INI format : + ```ini + [all] + host1 + host2 + host3 + + [host1:vars] + variables_env = ../variables.env + + [host2:vars] + variables_env = variables.env + enable_ui=true + + [host3:vars] + variables_env = ../variables.env + custom_site=../site + plugins=../plugins ``` Run the playbook : @@ -1090,6 +1132,15 @@ REAL_IP_HEADER=X-Forwarded-For variables_env: ../variables.env ``` + Or in INI format : + ```ini + [all] + host + + [all:vars] + variables_env = ../variables.env + ``` + Run the playbook : ```shell ansible-playbook -i inventory.yml playbook.yml @@ -1259,6 +1310,15 @@ REAL_IP_HEADER=proxy_protocol variables_env: ../variables.env ``` + Or in INI format : + ```ini + [all] + host + + [all:vars] + variables_env = ../variables.env + ``` + Run the playbook : ```shell ansible-playbook -i inventory.yml playbook.yml @@ -1526,6 +1586,16 @@ Some integrations offer a more convenient way of applying configurations for exa } ``` + Or in INI format : + ```ini + [all] + host + + [all:vars] + custom_configs=true + custom_configs_path={'server-http': '../hello-world.conf', 'http': '../http.conf', 'default-server-http': '../default-server-http.conf', 'modsec-crs': '../modsec-crs', 'modsec': '../modsec'} + ``` + Run the playbook : ```shell ansible-playbook -i inventory.yml playbook.yml diff --git a/docs/web-ui.md b/docs/web-ui.md index 04436fcb1..6ab03393b 100644 --- a/docs/web-ui.md +++ b/docs/web-ui.md @@ -241,4 +241,79 @@ Because the web UI is a web application, the recommended installation procedure Restart the BunkerWeb UI service and you are now ready to access it : ```shell systemctl restart bunkerweb-ui - ``` \ No newline at end of file + ``` + +=== "Ansible" + + The installation of the web UI using the [Ansible integration](/1.4/integrations/#ansible) is pretty straightforward because it is installed with BunkerWeb. + + The first thing to do is to edit your local BunkerWeb configuration and add settings related to the web UI : + ```conf + HTTP_PORT=80 + HTTPS_PORT=443 + DNS_RESOLVERS=8.8.8.8 8.8.4.4 + ... + SERVER_NAME=bwadm.example.com + MULTISITE=yes + USE_API=yes + API_WHITELIST_IP=127.0.0.0/8 + bwadm.example.com_USE_UI=yes + bwadm.example.com_USE_REVERSE_PROXY=yes + bwadm.example.com_REVERSE_PROXY_URL=/changeme/ + bwadm.example.com_REVERSE_PROXY_HOST=http://127.0.0.1:7000 + bwadm.example.com_REVERSE_PROXY_HEADER=X-Script-Name /changeme + bwadm.example.com_REVERSE_PROXY_INTERCEPT_ERRORS=no + ... + ``` + + Important things to note : + + * `bwadm.example.com` is the dedicated (sub)domain for accessing the web UI + * replace the `/changeme` URLs with a custom one of your choice + + Once the configuration file is edited, you will start your playbook : + ```shell + ansible-playbook -i inventory.yml playbook.yml + ``` + + The inventory to go with the playbook: + In YAML format: + + ```yaml + all: + children: + Groups: + hosts: + "Your_IP_Address": + vars: + enable_ui: true # Activate the UI + custom_ui: "PathToYourFile" # Path to your UI file + } + ``` + + Or in INI format : + ```ini + [all] + "Your_IP_Address" + + [all:vars] + enable_ui: true # Activate the UI + custom_ui: "PathToYourFile" # Path to your UI file + ``` + + You can edit your local UI file containing the settings of the web UI : + ```conf + ADMIN_USERNAME=admin + ADMIN_PASSWORD=changeme + ABSOLUTE_URI=http(s)://bwadm.example.com/changeme/ + ``` + + Important things to note : + + * `http(s)://bwadmin.example.com/changeme/` is the full base URL of the web UI (must match the sub(domain) and /changeme URL used in **/opt/bunkerweb/variables.env**) + * replace the username `admin` and password `changeme` with strong ones + + Deplay your playbook : + ```shell + ansible-playbook -i inventory.yml playbook.yml + ``` \ No newline at end of file