From 5108efea2399a02665886c57966663b2478d6db9 Mon Sep 17 00:00:00 2001 From: strNophix Date: Thu, 10 Mar 2022 08:55:57 +0100 Subject: [PATCH] Converted nginx-webserver index.html to php --- roles/nginx-webserver/tasks/main.yml | 4 ++-- .../nginx-webserver/templates/{index.html.j2 => index.php.j2} | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) rename roles/nginx-webserver/templates/{index.html.j2 => index.php.j2} (93%) diff --git a/roles/nginx-webserver/tasks/main.yml b/roles/nginx-webserver/tasks/main.yml index a97a175..5f2e042 100644 --- a/roles/nginx-webserver/tasks/main.yml +++ b/roles/nginx-webserver/tasks/main.yml @@ -9,6 +9,6 @@ notify: restart nginx - name: Copy over index.html ansible.builtin.template: - src: ./templates/index.html.j2 - dest: /var/www/html/index.html + src: ./templates/index.php.j2 + dest: /var/www/html/index.php become: true diff --git a/roles/nginx-webserver/templates/index.html.j2 b/roles/nginx-webserver/templates/index.php.j2 similarity index 93% rename from roles/nginx-webserver/templates/index.html.j2 rename to roles/nginx-webserver/templates/index.php.j2 index c4f88f6..68816e4 100644 --- a/roles/nginx-webserver/templates/index.html.j2 +++ b/roles/nginx-webserver/templates/index.php.j2 @@ -8,6 +8,7 @@ +

Hostname: {{ ansible_facts.nodename }}

OS: {{ ansible_facts.distribution }} {{ ansible_facts.distribution_version }}

Kernel: {{ ansible_facts.kernel }}