From 961513940aec173461f3403c7dfb6f174235cd14 Mon Sep 17 00:00:00 2001
From: "debora.benedetto@hpe.com" <debora.benedetto@hpe.com>
Date: Fri, 1 Apr 2022 11:28:44 +0200
Subject: [PATCH] Upload New File

---
 nginx.play | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 nginx.play

diff --git a/nginx.play b/nginx.play
new file mode 100644
index 0000000..c8790e1
--- /dev/null
+++ b/nginx.play
@@ -0,0 +1,45 @@
+---
+- hosts: 16.0.0.1
+  gather_facts: no
+  become: yes
+  vars:
+    ansible_ssh_private_key_file: "/home/user1/.ssh/openstack.key"
+    ansible_ssh_user: "ubuntu"
+  tasks:
+    - name: Update repositories
+      apt:
+        update_cache: yes
+
+    - name: Install nginx
+      package:
+        name: nginx
+
+    - name: Start nginx
+      service:
+        name: nginx
+        enabled: yes
+        state: started
+
+    - name: Set attributes
+      set_stats:
+        data:
+          site_config_dir: /etc/nginx/conf.d
+
+    - name: Install sample site
+      copy:
+        dest: ""
+        content: |
+          <!doctype html>
+          <html lang="en">
+          <head>
+            <title>Hello World!</title>
+          </head>
+          <body>
+            <h1>Sample web page</h1>
+            <p>With little content ;)</p>
+          </body>
+          </html>
+      with_items:
+        - /var/www/html/index.html
+        - /usr/share/nginx/html/index.html
+
-- 
GitLab