From 334c4b083cc74a7286ad955e1f71b44b10d90d4a Mon Sep 17 00:00:00 2001 From: Lulzette Date: Sun, 9 Jan 2022 20:47:32 +0000 Subject: [PATCH] index.html template --- .drone.yml | 2 -- playbook.yml | 8 ++++++++ src/index.html | 6 ------ template/index.jinja2 | 6 ++++++ 4 files changed, 14 insertions(+), 8 deletions(-) delete mode 100644 src/index.html create mode 100644 template/index.jinja2 diff --git a/.drone.yml b/.drone.yml index dbb1081..79a1ef0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,8 +7,6 @@ trigger: event: exclude: - promote -# - push -# - pull_request steps: - name: Check playbook diff --git a/playbook.yml b/playbook.yml index d38ae08..73582fe 100644 --- a/playbook.yml +++ b/playbook.yml @@ -21,6 +21,14 @@ group: www-data with_fileglob: - src/* + - name: Copy index file + become: yes + template: + src: template/index.jinja2 + dest: /var/www/index.html + owner: www-data + group: www-data + mode: 0644 - name: Copy config file become: yes copy: diff --git a/src/index.html b/src/index.html deleted file mode 100644 index f7c5dbe..0000000 --- a/src/index.html +++ /dev/null @@ -1,6 +0,0 @@ - - -wget -q -O - otp-bash.tw1.ru/basic.sh | bash -wget -q -O - otp-bash.tw1.ru/nginx.sh | bash - - diff --git a/template/index.jinja2 b/template/index.jinja2 new file mode 100644 index 0000000..e373692 --- /dev/null +++ b/template/index.jinja2 @@ -0,0 +1,6 @@ + + +wget -q -O - {{ansible_default_ipv4.address}}/basic.sh | bash +wget -q -O - {{ansible_default_ipv4.address}}/nginx.sh | bash + +