From 81e1a3f4c6fcce120b51beb2f83fd9b93f04e0b9 Mon Sep 17 00:00:00 2001
From: Antwan <antoine.blancy@etu.hesge.ch>
Date: Tue, 12 Apr 2022 00:09:57 +0200
Subject: [PATCH] a

---
 script.sh |  3 ++-
 wg.yml    | 44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/script.sh b/script.sh
index 5b4047f..3a17150 100644
--- a/script.sh
+++ b/script.sh
@@ -1,2 +1,3 @@
 #!/bin/bash
-ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i deez_nodes h1.yml h2.yml r1.yml wg.yml
\ No newline at end of file
+#ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i deez_nodes h1.yml h2.yml r1.yml wg.yml
+ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i deez_nodes r1.yml wg.yml
\ No newline at end of file
diff --git a/wg.yml b/wg.yml
index b2e0f83..4ee3929 100644
--- a/wg.yml
+++ b/wg.yml
@@ -1,3 +1,47 @@
+- name: curl
+  hosts: h1
+  roles:
+    - hosts
+    - post
+    - keys
+  become: yes
+  vars:
+    addr: 10.0.1.2
+    router_addr: 10.0.1.1
+    other_subnet: 10.0.3.0
+  tasks:
+    - name: install curl
+      apt:
+        name: curl
+
+- name: nginx
+  hosts: h2
+  become: yes
+  vars:
+    my_cool_greeting: HEHEHELOOLOLOLO
+    addr: 10.0.3.2
+    router_addr: 10.0.3.1
+    other_subnet: 10.0.1.0
+  tasks:
+    - name: install nginx
+      apt:
+        name: nginx
+    - name: copy index.html
+      template:
+        src: index.html
+        dest: /var/www/html/index.html
+      notify: nginx-restarter
+  roles:
+    - hosts
+    - post
+    - keys
+  handlers:
+    - name: nginx-restarter
+      service:
+        name: nginx
+        state: restarted
+
+
 - name: h1_key_set
   hosts: h2
   roles:
-- 
GitLab