Commit d2f74948 authored by rgaudin's avatar rgaudin
Browse files

Fixed #253: Added Kiwix Hotspot version to http://version.<name>.hotspot/

parent 3ff0c3fa
* Fixed clean cache regression
* Fixed PermissionError on QEMU phase One
* Safer JSON import
* Fixed etcher-cli log display on macOS
* Added http://version.<name>.hotspot to display Kiwix Hotspot version on Plug
* Updated Wikifundi language packs (2018-10-24)
......@@ -10,12 +10,14 @@ hostname: ideasbox
tld: "hotspot"
fqdn: "{{ hostname }}.{{ tld }}"
welcome_fqdn: "goto.kiwix.{{ tld }}"
version_fqdn: "version.{{ fqdn }}"
cert_domain: ideascube.{{ tld }}
hotspot_name: ideasbox
project_name: ideasbox
ideascube_id: pibox
# System
installer_version: devel
disk: /dev/mmcblk0
root_partition: "{{ disk }}p2"
data_partition: "{{ disk }}p3"
......@@ -20,6 +20,12 @@
dest: /var/www/404.html
tags: ['master', 'rename']
- name: install version.html
src: version.html.j2
dest: /var/www/version/index.html
tags: ['master', 'rename']
- name: Remove default nginx vhost config file (if configured).
path: /etc/nginx/sites-enabled/default
......@@ -41,6 +47,13 @@
dest: /etc/nginx/sites-enabled/welcome
tags: ['master', 'rename']
- name: install version vhost
src: version.j2
dest: /etc/nginx/sites-enabled/version
tags: ['master', 'rename']
- name: install default placeholder vhost for services
src: placeholder.j2
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Version - {{ hostname }}</title>
<link rel="icon" href="/ideascube-static/branding/favicon.png">
<link rel="stylesheet" href="/ideascube-static/ideascube/vendor/font-awesome/css/font-awesome.min.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="/ideascube-static/ideascube/vendor/purecss/pure-css-grids-old-ie-min.css">
<!--[if gt IE 8]><!-->
<link rel="stylesheet" type="text/css" href="/ideascube-static/ideascube/vendor/purecss/pure-css-grids-min.css">
<link rel="stylesheet" type="text/css" href="/ideascube-static/ideascube/main.css" />
<link rel="stylesheet" type="text/css" href="/ideascube-static/branding/style.css" />
<body class="">
<a href="/">
<img src="/ideascube-static/branding/header-logo.png"></img>
<span class="boxid">{{ hostname }}</span>
<div class="content">
<h2>This Hotspot is running <em>Kiwix Hotspot <code>{{ installer_version }}</code></em></h2>
<p>Please, <a href="http://{{ fqdn }}">go back home</a> to continue.</p>
<div class="row">
<div class="col third i18n_switch"></div>
<div class="col half">
<img src="/ideascube-static/ideascube/img/logoBSF.png" />
server {
listen 80;
server_name {{ version_fqdn }};
root /var/www/version;
location /ideascube-static/ { alias /var/ideascube/static/; expires 1y; }
location /404.html { internal; root /var/www; }
error_page 404 /404.html;
......@@ -52,12 +52,14 @@
sites_server_name: sites.{{hostname}}
time_server_name: time.{{hostname}}
kiwix_fqdn: kiwix.{{ fqdn }}
kalite_fqdn: khanacademy.{{fqdn}}
aflatoun_fqdn: aflatoun.{{fqdn}}
edupi_fqdn: edupi.{{fqdn}}
wikifundi_fqdn: wikifundi.{{fqdn}}
sites_fqdn: sites.{{fqdn}}
time_fqdn: time.{{fqdn}}
kalite_fqdn: khanacademy.{{ fqdn }}
aflatoun_fqdn: aflatoun.{{ fqdn }}
edupi_fqdn: edupi.{{ fqdn }}
wikifundi_fqdn: wikifundi.{{ fqdn }}
sites_fqdn: sites.{{ fqdn }}
time_fqdn: time.{{ fqdn }}
welcome_fqdn: "goto.kiwix.{{ tld }}"
version_fqdn: "version.{{ fqdn }}"
name: Update names and fqdns for all projects
- lineinfile:
......@@ -9,6 +9,7 @@ import posixpath
import yaml
from data import mirror
from version import get_version_str
from backend.content import get_content
from backend.catalog import CATALOGS, get_catalogs
......@@ -25,6 +26,7 @@ def run(machine, tags, extra_vars={}, secret_keys=[]):
# predefined defaults we want to superseed whichever in ansiblecube
ansible_vars = {
"installer_version": get_version_str(),
"mirror": mirror,
"catalogs": CATALOGS,
"kernel_version": get_content("raspbian_image").get("kernel_version"),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment