From 7f70b0379f64a1b3b609feb186468d96e73a5f4f Mon Sep 17 00:00:00 2001 From: Mateo Date: Fri, 19 Jul 2024 13:31:39 +0200 Subject: [PATCH] Added bootstrap --- bootstrap.sh | 28 ++++++++++++++++++++++++++++ templates/Caddyfile.j2 | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 bootstrap.sh diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100644 index 0000000..a57fab7 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +read -p "Enter root password" password + +# Update APT repos +sudo apt update + +# Make sure python is installed +sudo apt install python3 python3-pip + +# Install pipx +sudo apt install pipx +pipx ensurepath + +# Install Ansible +pipx install --include-deps ansible + +# Install passlib (for ssh password connection) +sudo apt install python3-passlib +pipx inject ansible passlib + +# Make sure git is installed +sudo apt install git + +# Clone ansible_playbooks repo +git clone https://git.athelas-conseils.fr/Stage/ansible_playbooks.git + +ansible-playbook ansible-playbook ansible_playbooks/tasks/full_setup.yml -i ansible_playbooks/inventory.ini \ No newline at end of file diff --git a/templates/Caddyfile.j2 b/templates/Caddyfile.j2 index 2d11f0d..90e31ea 100644 --- a/templates/Caddyfile.j2 +++ b/templates/Caddyfile.j2 @@ -8,7 +8,7 @@ # this machine's public IP, then replace ":80" below with your # domain name. -poc.athelas.fr:8081 { +poc.athelas.fr { # Another common task is to set up a reverse proxy: reverse_proxy localhost:8080