From 91fac51e471274ce716063d152f29ebbf2b0d886 Mon Sep 17 00:00:00 2001 From: CTPEJIKuH <107935223+CTPEJIKuH@users.noreply.github.com> Date: Sun, 12 May 2024 22:53:01 +0900 Subject: [PATCH] Created Using WireGuard Easy with Ansible (markdown) --- Using-WireGuard-Easy-with-Ansible.md | 68 ++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Using-WireGuard-Easy-with-Ansible.md diff --git a/Using-WireGuard-Easy-with-Ansible.md b/Using-WireGuard-Easy-with-Ansible.md new file mode 100644 index 0000000..bc4d811 --- /dev/null +++ b/Using-WireGuard-Easy-with-Ansible.md @@ -0,0 +1,68 @@ +# Description + +This playbook is designed to automate the installation of Docker and Wireguard Easy on your virtual machine using Ansible. + +*** + +# Installing Ansible + +To begin, install Ansible by following the official [documentation](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html). + +*** + +# Downloading the Playbook + +Clone the repository containing the Wireguard playbook: + +Copy code +```bash +git clone https://gitlab.com/CTPEJIKuH/wireguard-playbook +``` +```bash +cd wireguard-playbook +``` +# Configuring Variables and VM IP Address + +In the inventories/prod/inventory.yml file, specify the IP address of your virtual machine: +```yaml +all: + children: + prod: + +wireguard_addresses: + hosts: + my-vm: + ansible_host: 123.45.67.89 +``` +Instead of 123.45.67.89, you need to specify the IP of your virtual machine. + +Instead of my-vm, specify the name of your virtual machine. + +In the inventories/prod/group_vars/all.yml file, set the password for the Wireguard web interface: +```bash +wg_easy_password: "mypassword" +``` +Replace mypassword with your actual password. + +Other variables are also available in the role that can be configured. +Details can be found [here](https://gitlab.com/CTPEJIKuH/wireguard-playbook/-/blob/main/roles/wireguard/README.md?ref_type=heads). +The playbook also provides backup functionality. + +*** + +# Entry Point +At the end of the Ansible run, a message like the following will be displayed: +UI address: http://123.45.67.890:51821 +This will be the web interface. + +*** + +# Example Playbook +Deployment with a check: +```bash +ansible-playbook -i inventories/prod main.yml -D -C +``` +Deployment without check: +```bash +ansible-playbook -i inventories/prod main.yml -D +``` \ No newline at end of file