From 2d2d224d916fd4a31e10ba9843728316f2cdcada Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Wed, 21 Sep 2016 21:31:09 +0200
Subject: [PATCH] roles/public_html: Add public_html role

---
 playbooks/soyuz.yml                           |   1 +
 .../files/generate-public_html.service        |  10 +
 .../files/generate-public_html.timer          |  10 +
 .../public_html/check_network_status.txt      |   1 +
 .../static/archnavbar/archlogo.gif            | Bin 0 -> 1845 bytes
 .../static/archnavbar/archlogo.png            | Bin 0 -> 4192 bytes
 .../static/archnavbar/archnavbar.css          |  33 +++
 .../files/public_html/static/archweb.css      | 269 ++++++++++++++++++
 .../files/public_html/static/favicon.ico      | Bin 0 -> 575 bytes
 roles/public_html/tasks/main.yml              |  24 ++
 .../templates/generate-public_html.j2         |  89 ++++++
 roles/public_html/templates/nginx.d.conf.j2   |  33 +++
 12 files changed, 470 insertions(+)
 create mode 100644 roles/public_html/files/generate-public_html.service
 create mode 100644 roles/public_html/files/generate-public_html.timer
 create mode 100644 roles/public_html/files/public_html/check_network_status.txt
 create mode 100644 roles/public_html/files/public_html/static/archnavbar/archlogo.gif
 create mode 100644 roles/public_html/files/public_html/static/archnavbar/archlogo.png
 create mode 100644 roles/public_html/files/public_html/static/archnavbar/archnavbar.css
 create mode 100644 roles/public_html/files/public_html/static/archweb.css
 create mode 100644 roles/public_html/files/public_html/static/favicon.ico
 create mode 100644 roles/public_html/tasks/main.yml
 create mode 100755 roles/public_html/templates/generate-public_html.j2
 create mode 100644 roles/public_html/templates/nginx.d.conf.j2

diff --git a/playbooks/soyuz.yml b/playbooks/soyuz.yml
index 56ae1f0d2..12cf60837 100644
--- a/playbooks/soyuz.yml
+++ b/playbooks/soyuz.yml
@@ -17,3 +17,4 @@
     - { role: syncrepo, tags: ['syncrepo'] }
     - { role: sogrep, tags: ['sogrep'] }
     - { role: archbuild, tags: ['archbuild'] }
+    - { role: public_html, public_domain: "pkgbuild.com", tags: ['nginx'] }
diff --git a/roles/public_html/files/generate-public_html.service b/roles/public_html/files/generate-public_html.service
new file mode 100644
index 000000000..8ca81bcbf
--- /dev/null
+++ b/roles/public_html/files/generate-public_html.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Generate public_html files
+RequiresMountsFor=/srv/public_html
+
+[Service]
+Type=oneshot
+ExecStart=/usr/local/bin/generate-public_html
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
diff --git a/roles/public_html/files/generate-public_html.timer b/roles/public_html/files/generate-public_html.timer
new file mode 100644
index 000000000..7d2577d78
--- /dev/null
+++ b/roles/public_html/files/generate-public_html.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Daily creation of public_html files
+
+[Timer]
+OnCalendar=daily
+AccuracySec=24h
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/roles/public_html/files/public_html/check_network_status.txt b/roles/public_html/files/public_html/check_network_status.txt
new file mode 100644
index 000000000..7aa67ad56
--- /dev/null
+++ b/roles/public_html/files/public_html/check_network_status.txt
@@ -0,0 +1 @@
+NetworkManager is online
diff --git a/roles/public_html/files/public_html/static/archnavbar/archlogo.gif b/roles/public_html/files/public_html/static/archnavbar/archlogo.gif
new file mode 100644
index 0000000000000000000000000000000000000000..e1852a06227557cb0d829109278cec2831c2f6b4
GIT binary patch
literal 1845
zcmV-52g>+INk%w1VZHz;0M!5hGcz-pnVBSIh8U2||Ns9nI6HE3a@W__LPA0ugSNG`
zwJb_nT3T8tT5}<9mFDK=Fg`@Y#KePxgHlpb8i&5Et*t6iWM*b&?(Xg_MNuJZgdlgM
zrKP1xN=kcsdo4#(9(=4KZIivdz24s5FgrnJW@e0xj2Vo@DO74FU3mBR_ZO4U%*@Q0
znVBGSoF93nE=N=;N@FfXQ93$0DOYYLVSX8my&-$GBWjH=LQ4Pu000000000000000
z00000A^8La6aWAKEC2ui0KNby000L6K!9*aED}E-qjJe?I-k&}bV{vSp$^A&%k6r<
zU@&PgfP~NJw0g~~tyTiId`_=BD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archlogo.png b/roles/public_html/files/public_html/static/archnavbar/archlogo.png
new file mode 100644
index 0000000000000000000000000000000000000000..e873e94b1a38b58963e15252f6e175fc1c6f1ec7
GIT binary patch
literal 4192
zcmV-m5TEafP)<h;3K|Lk000e1NJLTq006!K001Zm1^@s6KubWw00004b3#c}2nYxW
zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^
zaAhuUa%Y?FJQ@H158X*bK~#90?VNjjRn?WpzxyO4+WI7toFEQXKzW1{6sdl6#-eR4
zw$nN~gI0@*en!)V8*$V!(+AZQ@$D$&1i?6;S_*9yY&-3U(@tmFsal^%a-b<Hj9_`(
zfRCvtkL2d;`D2~?$hqg<bMAxD();^-?kCAUd#}Au&f4p&^;>ISrM0G9Fm31KfDw;b
z&y`JR1r;0wRF_#^45$IVSZ28uR8Ur^a#?)Sc18ey0IGnG#begCvIwrAf`b5~jIyo;
zYLT}{tc-FisG#g9i^Vr>rwVu-IKgXr2N)HPS$j(sUO@#10p+sz7m`+bfMbCx%Ov~H
z0Ve}TmP^>N4|E?>E?I{v%BA>0uFYK2c2t?<A8MEY+ywj>*af@-oK&jNM%!sMZ6{t^
zZQPpKZrbZ7o1M-g)m~QD_D>omvpS~jOajggxHKO44Dj!z&T$B09x&V2Rt_UE8E8PI
zWi_?;)=;N^hGumAaAz%8%gZp&pFGN80rCa1|4;_`6-0$b0yeEuiofBOiT$pjXKAHx
z+0|x!?*m)ghYTfIeA9N02Cm4{<$Tk2CdOk{Zz=OsP$=9XZ;xHA%})bQe?W`*P@+_e
zKO6XHNT0bS&T%NBeChHGxJu+|T^6_LkVdIK{?rJ4t}t!qTk)9HSK?ejI2>pO8i9K6
zqk*{hSqtopC~Fun64)AWts1C9l5;ysTk=7K)*7Wisfyx<plHQ6ZN~)u9tp~3<>`7j
z@O8>-`3>M#z?n#iL@v0%Z-BdjCj+j31^5KegiwmTz!cyZ;4<&i<o&IHYk==$jQ==r
zDKHAzG$V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^t)IVYYJ?Qs?spg!|5iy}(uRn6)~>8Y-xuXrvV1w4Fx8lH}r~
z-$sJF$ASNd$E<=%LOuWeJm7B;N-39{v<Dayk6F75kzYXtg&<S$mm+~?CK8A*y%PA9
zM^BavkGebuN$^}nHov_%9<wT6L{-5-gVI`K+Riv6SV{)FE|P7$H6F8~l=>D8({@H9
zCy%Z~d~y)KcS1a7{m;RiyMjMoB<akBh|+7|M}QTNS+fqd(gVa}*4B8;x(1;(ANAHy
zL-B`IDySe7s-dH2DsqzONnn0FX1)ADF37Z<W<=>f2b}&vucv}T6V*uF`q}ZA^=w$@
q{||U{=I2e@ITKl1Me!>rJN^%bwjGp1kc7<u0000<MNUMnLSTYv7YZK$

literal 0
HcmV?d00001

diff --git a/roles/public_html/files/public_html/static/archnavbar/archnavbar.css b/roles/public_html/files/public_html/static/archnavbar/archnavbar.css
new file mode 100644
index 000000000..d95832bcd
--- /dev/null
+++ b/roles/public_html/files/public_html/static/archnavbar/archnavbar.css
@@ -0,0 +1,33 @@
+/*
+ * ARCH GLOBAL NAVBAR
+ *
+ * We're forcing all generic selectors with !important
+ * to help prevent other stylesheets from interfering.
+ *
+ */
+
+/* container for the entire bar */
+#archnavbar { height: 40px !important; padding: 10px 15px !important; background: #333 !important; border-bottom: 5px #08c solid !important; }
+
+/* logo trickery -- GIF for IE6 and PNG for the rest */
+#archnavbarlogo { float: left !important; margin: 0 !important; padding: 0 !important; height: 40px !important; width: 190px !important; }
+/* IE6 doesn't support alpha PNGs so we serve it a GIF */
+#archnavbarlogo { background: url('archlogo.gif') no-repeat !important; }
+/* and use a proper PNG for all other modern browsers */
+html > body #archnavbarlogo { background: url('archlogo.png') no-repeat !important; }
+
+/* move the heading/paragraph text offscreen */
+#archnavbarlogo p { margin: 0 !important; padding: 0 !important; text-indent: -9999px !important; }
+#archnavbarlogo h1 { margin: 0 !important; padding: 0 !important; text-indent: -9999px !important; }
+
+/* make the link the same size as the logo */
+#archnavbarlogo a { display: block !important; height: 40px !important; width: 190px !important; }
+
+/* display the list inline, float it to the right and style it */
+#archnavbar ul { display: inline !important; float: right !important; list-style: none !important; margin: 0 !important; padding: 0 !important; }
+#archnavbar ul li { float: left !important; font-size: 14px !important; font-family: sans-serif !important; line-height: 45px !important; padding-right: 15px !important; padding-left: 15px !important; }
+
+/* style the links */
+#archnavbar ul#archnavbarlist li a { color: #999; font-weight: bold !important; text-decoration: none !important; }
+#archnavbar ul li a:hover { color: white !important; text-decoration: underline !important; }
+
diff --git a/roles/public_html/files/public_html/static/archweb.css b/roles/public_html/files/public_html/static/archweb.css
new file mode 100644
index 000000000..d45ea10b3
--- /dev/null
+++ b/roles/public_html/files/public_html/static/archweb.css
@@ -0,0 +1,269 @@
+/*
+ * ARCH LINUX DJANGO (MAIN SITE)
+ *
+ * Font sizing based on 16px browser defaults (use em):
+ *   14px = 0.875em
+ *   13px = 0.812em
+ *   12px = 0.75em
+ *   11px = 0.6875em
+ *
+ */
+
+/* import the global navbar stylesheet */
+@import url('archnavbar/archnavbar.css');
+
+/* simple reset */
+* { margin: 0; padding: 0; line-height: 1.4; }
+
+/* general styling */
+body { min-width: 650px; background: #f6f9fc; color: #222; font: normal 100% sans-serif; text-align: center; }
+p { margin: .33em 0 1em; }
+ol, ul { margin-bottom: 1em; padding-left: 2em; }
+ul { list-style: square; }
+code { font: 1.2em monospace; background: #ffa; padding: 0.15em 0.25em; }
+pre { font: 1.2em monospace; border: 1px solid #bdb; background: #dfd; padding: 0.5em; margin: 0.25em 2em; }
+blockquote { margin: 1.5em 2em; }
+input { vertical-align: middle; }
+select[multiple] { padding-top: 1px; padding-bottom: 1px; }
+select[multiple] option { padding-left: 0.3em; padding-right: 0.5em; }
+input[type=submit] { padding-left: 0.6em; padding-right: 0.6em; }
+.clear { clear: both; }
+hr { border: none; border-top: 1px solid #888; }
+img { border: 0; }
+
+/* scale fonts down to a sane default (16 * .812 = 13px) */
+#content { font-size: 0.812em; }
+
+/* link style */
+a { text-decoration: none; }
+a:link, th a:visited { color: #07b; }
+a:visited { color: #666; }
+a:hover { text-decoration: underline; color: #666; }
+a:active { color: #e90; }
+
+/* headings */
+h2 { font-size: 1.5em; margin-bottom: 0.5em; border-bottom: 1px solid #888; }
+h3 { font-size: 1.25em; margin-top: 1em; }
+h4 { font-size: 1.15em; margin-top: 1em; }
+h5 { font-size: 1em; margin-top: 1em; }
+
+/* general layout */
+div#content { width: 95%; margin: 0 auto; text-align: left; } 
+div#content-left-wrapper { float: left; width: 100%; } /* req to keep content above sidebar in source code */ 
+div#content-left { margin: 0 340px 0 0; }
+div#content-right { float: left; width: 300px; margin-left: -300px; }
+div.box { margin-bottom: 1.5em; padding: 0.65em; background: #ecf2f5; border: 1px solid #bcd; }
+div#footer { clear: both; margin: 2em 0 1em; }
+div#footer p { margin: 0; text-align: center; font-size: 0.85em; }
+
+/* alignment */
+div.center, table.center, img.center { width: auto; margin-left: auto; margin-right: auto; }
+p.center, td.center, th.center { text-align: center; }
+
+/* table generics */
+table { width: 100%; border-collapse: collapse; }
+table .wrap { white-space: normal; }
+th, td { white-space: nowrap; text-align: left; }
+th { vertical-align: middle; font-weight: bold; }
+td { vertical-align: top; }
+
+/* table pretty styles */
+table.pretty1 { width: auto; margin-top: 0.25em; margin-bottom: 0.5em; border-collapse: collapse; border: 1px solid #bcd; }
+table.pretty1 th { padding: 0.35em; background: #e4eeff; border: 1px solid #bcd; }
+table.pretty1 td { padding: 0.35em; border: 1px dotted #bcd; }
+table.pretty2 { width: auto; margin-top: 0.25em; margin-bottom: 0.5em; border-collapse: collapse; border: 1px solid #bbb; }
+table.pretty2 th { padding: 0.35em; background: #eee; border: 1px solid #bbb; }
+table.pretty2 td { padding: 0.35em; border: 1px dotted #bbb; }
+
+/* forms and input styling */
+form p { margin: 0.5em 0; }
+fieldset { border: 0; }
+label { width: 12em; vertical-align: top; display: inline-block; font-weight: bold; }
+input[type=text], input[type=password], textarea { padding: 0.10em; }
+form.general-form label, form.general-form .form-help { width: 10em; vertical-align: top; display: inline-block; }
+form.general-form input[type=text], form.general-form textarea { width: 45%; }
+
+/* archdev navbar */
+div#archdev-navbar { margin: 1.5em 0; }
+div#archdev-navbar ul { list-style: none; margin: -0.5em 0; padding: 0; }
+div#archdev-navbar li { display: inline; margin: 0; padding: 0; font-size: 0.9em; }
+div#archdev-navbar li a { padding: 0 0.5em; color: #07b; }
+
+/* error/info messages (x pkg is already flagged out-of-date, etc) */
+#sys-message { width: 35em; text-align: center; margin: 1em auto; padding: 0.5em; background: #fff; border: 1px solid #f00; }
+#sys-message p { margin: 0; }
+
+ul.errorlist { color: red; }
+
+/*
+ *  PAGE SPECIFIC STYLES
+ */
+
+/* home: introduction */
+#intro p.readmore { margin: -0.5em 0 0 0; font-size: .9em; text-align: right; }
+
+/* home: news */
+#news { margin-top: 1.5em; }
+#news h3 { border-bottom: 1px solid #888; }
+#news div { margin-bottom: 1em; }
+#news div p { margin-bottom: 0.5em; }
+#news .more { font-weight: normal; }
+#news .rss-icon { float: right; margin: -1.6em 0.4em 0 0; }
+#news h4 { font-size: 1em; margin-top: 1.5em; border-bottom: 1px dotted #bbb; }
+#news .timestamp { float: right; font-size: 0.85em; margin: -1.8em 0.5em 0 0; }
+
+/* home: pkgsearch box */
+#pkgsearch { padding: 1em 0.75em; background: #3ad; color: #fff; border: 1px solid #08b; } 
+#pkgsearch label { width: auto; padding: 0.1em 0; }
+#pkgsearch input { width: 10em; float: right; font-size: 1em; color: #000; background: #fff; border: 1px solid #09c; }
+
+/* home: recent pkg updates */
+#pkg-updates h3 { margin: 0 0 0.3em; }
+#pkg-updates .more { font-weight: normal; }
+#pkg-updates .rss-icon { float: right; margin: -2em 0 0 0; }
+#pkg-updates table { margin: 0; }
+#pkg-updates td.pkg-name { white-space: normal; }
+#pkg-updates td.pkg-arch { text-align: right; }
+#pkg-updates span.testing, #pkg-updates span.community-testing, span.multilib-testing { font-style: italic; }
+
+/* home: sidebar navigation */
+div#nav-sidebar ul { list-style: none; margin: 0.5em 0 0.5em 1em; padding: 0; }
+
+/* home: sponsor banners */
+div#arch-sponsors img { padding: 0.3em 0; }
+
+/* home: sidebar components (navlist, sponsors, pkgsearch, etc) */
+div.widget { margin-bottom: 1.5em; }
+
+/* feeds page */
+#rss-feeds .rss { padding-right: 20px; background: url(rss.png) top right no-repeat; }
+
+/* artwork: logo images */
+#artwork img.inverted { background: #333; padding: 0; }
+#artwork div.imagelist img { display: inline; margin: 0.75em; }
+
+/* news: article list */
+.news-nav { float: right; margin-top: -2.2em; }
+.news-nav .prev, .news-nav .next { margin-left: 1em; margin-right: 1em; }
+
+/* news: article pages */
+div.news-article .article-info { margin: 0; color: #999; }
+
+/* news: add/edit article */
+form#newsform { width: 60em; }
+form#newsform input[type=text], form#newsform textarea  { width: 75%; }
+
+/* donate: donor list */
+div#donor-list ul { width: 100%; }
+/* max 4 columns, but possibly fewer if screen size doesn't allow for more */
+div#donor-list li { float: left; width: 25%; min-width: 20em; }
+
+/* download page */
+#arch-downloads h3 { border-bottom: 1px dotted #aaa; }
+table#download-torrents .cpu-arch { text-align: center; }
+table#download-mirrors { width: auto; margin-bottom: 1em; }
+table#download-mirrors td.mirror-country { padding-top: 1em; }
+table#download-mirrors td.mirror-server { padding-right: 1em; }
+table#download-mirrors a { display: block; float: right; width: 4em; }
+
+/* pkglists/devlists */
+table.results { font-size: 0.846em; border-top: 1px dotted #999; border-bottom: 1px dotted #999; }
+table.results th { padding: 0.5em 1em 0.25em 0.25em; border-bottom: 1px solid #999; white-space: nowrap; background-color:#fff; }
+table.results td { padding: .3em 1em .3em 3px; }
+table.results tr.odd { background: #fff; }
+table.results tr.even { background: #e4eeff; }
+/* additional styles for JS sorting */
+table.results th.header { padding-right: 20px; background-image: url(nosort.gif); background-repeat: no-repeat; background-position: center right; cursor: pointer; }
+table.results th.headerSortDown { background-color: #e4eeff; background-image: url(desc.gif); }
+table.results th.headerSortUp { background-color: #e4eeff; background-image: url(asc.gif); }
+table.results .flagged { color: red; }
+
+/* pkglist: layout */
+div#pkglist-about { margin-top: 1.5em; }
+
+/* pkglist: results navigation */
+#pkglist-stats-top, #pkglist-stats-bottom { font-size: 0.85em; }
+#pkglist-results .pkglist-nav { float: right; margin-top: -2.2em; }
+.pkglist-nav .prev { margin-right: 1em; }
+.pkglist-nav .next { margin-right: 1em; }
+
+/* search fields  and other filter selections */
+.filter-criteria h3 { font-size: 1em; margin-top:0; }
+.filter-criteria div { float: left; margin-right: 1.65em; font-size: 0.85em; }
+.filter-criteria legend { display: none; }
+.filter-criteria label { width: auto; display: block; font-weight: normal; }
+
+/* pkgdetails: details links that float on the right */
+#pkgdetails #detailslinks { float: right; }
+#pkgdetails #detailslinks h4 { margin-top: 0; margin-bottom: 0.25em; }
+#pkgdetails #detailslinks ul { list-style: none; padding: 0; margin-bottom: 0; font-size: 0.846em; }
+#pkgdetails #detailslinks > div { padding: 0.5em; margin-bottom: 1em; background: #eee; border: 1px solid #bbb; }
+#pkgdetails #actionlist .flagged { color: red; font-size: 0.9em; font-style: italic; }
+
+/* pkgdetails: pkg info */
+#pkgdetails #pkginfo { width: auto; }
+#pkgdetails #pkginfo td { padding: 0.25em 0 0.25em 1.5em; }
+
+/* pkgdetails: flag package */
+form#flag-pkg-form label { width: 10em; }
+form#flag-pkg-form textarea, form#flag-pkg-form input[type=text] { width: 45%; } 
+
+/* pkgdetails: deps, required by and file lists */
+#pkgdetails #metadata h3 { background: #555; color: #fff; font-size: 1em; margin-bottom: 0.5em; padding: 0.2em 0.35em; }
+#pkgdetails #metadata ul { list-style: none; margin: 0; padding: 0; }
+#pkgdetails #metadata li { padding-left: 0.5em; }
+#pkgdetails #metadata p { padding-left: 0.5em; }
+#pkgdetails #metadata .message { font-style: italic; }
+#pkgdetails #metadata br { clear: both; }
+#pkgdetails #pkgdeps { float: left; width: 48%; margin-right: 2%; }
+#pkgdetails #pkgreqs { float: left; width: 50%; }
+#pkgdetails #pkgfiles { clear: left; padding-top: 1em; }
+
+/* dev/TU biographies */
+div#arch-bio-toc { width: 75%; margin: 0 auto; text-align: center; }
+table.arch-bio-entry td.pic { vertical-align: top; padding-right: 15px; padding-top: 10px; }
+table.arch-bio-entry td.pic img { padding: 4px; border: 1px solid #ccc; }
+table.arch-bio-entry table.bio { margin-bottom: 2em; }
+table.arch-bio-entry table.bio th { text-align: left; padding-right: 0.5em; vertical-align: top; white-space: nowrap; }
+table.arch-bio-entry table.bio td { width: 100%; padding-bottom: 0.25em; }
+
+/* dev: login/out */
+p.login-error {}
+table#dev-login { width: auto; } 
+
+/* dev dashboard: flagged packages */
+form#dash-pkg-notify { text-align: right; padding: 1em 0 0; margin-top: 1em; font-size: 0.85em; border-top: 1px dotted #aaa; }
+form#dash-pkg-notify label { width: auto; font-weight: normal; }
+form#dash-pkg-notify input { vertical-align: middle; margin: 0 0.25em; }
+form#dash-pkg-notify input[type=submit] { margin-top: -0.25em; }
+form#dash-pkg-notify p { margin: 0; }
+
+/* dev dashboard: collapse stat tables by default */
+table#stats-by-maintainer, table#stats-by-repo, table#stats-by-arch { display: none; }
+table.dash-stats .key { width: 50%; } 
+span.dash-click { font-weight: normal; font-size: 0.8em; color: #888; }
+div.dash-stats h3 { color: #07b; }
+
+/* read only (public) todo lists */
+#public_todo_lists .todo_list {
+    margin-left: 2em;
+}
+
+/* dev dashboard: admin actions (add news items, todo list, etc) */
+ul.admin-actions { float: right; list-style: none; margin-top: -2.5em; }
+ul.admin-actions li { display: inline; padding-left: 1.5em; }
+
+/* dev: todo list */
+.todo-table .complete { color: green; }
+.todo-table .incomplete { color: red; }
+
+/* dev: signoff page */
+#dev-signoffs ul { list-style: none; margin: 0; padding: 0; }
+#dev-signoffs .signoff-yes { color: green; font-weight: bold; }
+#dev-signoffs .signoff-no { color: red; }
+#dev-signoffs .signed-username { color: #888; margin-left: 0.5em; }
+
+/* highlight current website in the navbar */
+#archnavbar.anb-home ul li#anb-home a { color: white !important; }
+#archnavbar.anb-packages ul li#anb-packages a { color: white !important; }
+#archnavbar.anb-download ul li#anb-download a { color: white !important; }
diff --git a/roles/public_html/files/public_html/static/favicon.ico b/roles/public_html/files/public_html/static/favicon.ico
new file mode 100644
index 0000000000000000000000000000000000000000..55497b852fc438a7a63041822a64deac8ad92527
GIT binary patch
literal 575
zcmV-F0>J%=P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW
zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^
zaAhuUa%Y?FJQ@H10lY~>K~y-6jgvo!6G0Tle=|GDx_9PaSMatt8xuJ=jueWZ*0zF(
zjc8@z38oPY2!}RWYjKN}g`kaCi1-H-uCNkOgxf<!F?yUS7Cl4^B$v3eW8nr8FBANl
zdA#?%kKYW8Fveh07{&W13sN-}=3m%6%DVkm=Nus>0BeA-5$w9Lx<d$>MMtXHz@2@3
zyz+UJPuh|vi*mtJavK=cNwf1dpEbZ!a<``>o|1IZ?Bv;J>;8WS9J=%2sOyMVt`f_h
zlJvCko4<OCqr6+*VBf9x#lTYyW0*;e`H>lXZH(|7*(w!f`Tnu;_pt<lr|J_0IpZpU
zF$7(miQn3=sk2f?n@eK}=5D^5+7q~I8|~Ep+Un8M!*s4AT2ro5Sv@`XZ6v{_&gyTH
zw%_>K?Jqw7?)K+hZAu%R^ukDjFp75q4Pbjddz93wNAlTi;8fmk1LdSvP5vdgJg^M#
zaG-vgp9c5>)Q7GRMsXQ9!>~RL)NlL5fD7Ck3IMJGg}hz^t^pqh0-C^eU>&Fc%V89s
z01(qlD|><0z!Ts~QmejXjKU~B2rL4Jfq5~#v~m%6p46(=A2%lGz#nlao8kSq3cLUS
N002ovPDHLkV1na%{Dc4i

literal 0
HcmV?d00001

diff --git a/roles/public_html/tasks/main.yml b/roles/public_html/tasks/main.yml
new file mode 100644
index 000000000..03cebda5c
--- /dev/null
+++ b/roles/public_html/tasks/main.yml
@@ -0,0 +1,24 @@
+---
+
+- stat: path="/etc/letsencrypt/live/{{ public_domain }}/fullchain.pem"
+  register: certfile
+
+- name: copy webroot files
+  copy: src=public_html dest=/srv owner=root group=root mode=0644 directory_mode=0755
+
+- name: install public_html scripts
+  template: src=generate-public_html.j2 dest=/usr/local/bin/generate-public_html owner=root group=root mode=0755
+
+- name: install public_html units
+  copy: src={{ item }} dest=/etc/systemd/system/{{ item }} owner=root group=root mode=0644
+  with_items:
+    - generate-public_html.timer
+    - generate-public_html.service
+
+- name: start and enable public_html units
+  service: name=generate-public_html.timer enabled=yes state=started
+
+- name: set up nginx
+  template: src=nginx.d.conf.j2 dest=/etc/nginx/nginx.d/public_html.conf owner=root group=root mode=0644
+  notify:
+    - restart nginx
diff --git a/roles/public_html/templates/generate-public_html.j2 b/roles/public_html/templates/generate-public_html.j2
new file mode 100755
index 000000000..0348314d9
--- /dev/null
+++ b/roles/public_html/templates/generate-public_html.j2
@@ -0,0 +1,89 @@
+#!/bin/bash -e
+
+target=/srv/public_html/index.html
+
+cat >${target}.tmp <<END
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>celestia</title>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+  <link rel="stylesheet" type="text/css" href="/static/archweb.css" media="screen, projection" />
+  <link rel="icon" type="image/x-icon" href="/static/favicon.ico" />
+  <link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico" />
+</head>
+<body>
+  <div id="archnavbar"><!-- Arch Linux global navigation bar -->
+    <div id="archnavbarlogo">
+      <p><a href="http://www.archlinux.org/" title="Arch news, packages, projects and more"></a></p>
+    </div>
+    <div id="archnavbarmenu">
+      <ul id="archnavbarlist">
+        <li id="anb-home"><a href="http://www.archlinux.org/" title="Arch news, packages, projects and more">Home</a></li>
+        <li id="anb-packages"><a href="http://www.archlinux.org/packages/" title="Arch Package Database">Packages</a></li>
+        <li id="anb-forums"><a href="https://bbs.archlinux.org/" title="Community forums">Forums</a></li>
+        <li id="anb-wiki"><a href="https://wiki.archlinux.org/" title="Community documentation">Wiki</a></li>
+        <li id="anb-bugs"><a href="https://bugs.archlinux.org/" title="Report and follow bugs">Bugs</a></li>
+        <li id="anb-aur"><a href="https://aur.archlinux.org/" title="Arch Linux User Repository">AUR</a></li>
+        <li id="anb-download"><a href="http://www.archlinux.org/download/" title="Get Arch Linux">Download</a></li>
+      </ul>
+    </div>
+  </div><!-- #archnavbar -->
+  <div id="content">
+    <div id="archdev-navbar">
+    </div>
+    <div id="content-left-wrapper">
+      <div id="content-left">
+        <div id="intro" class="box">
+          <h2>Build server</h2>
+          <p>This is an {{ ansible_processor[1] }} server with {{ ansible_memtotal_mb }} MB of memory.</p>
+          <p>
+            This machine is meant for building packages for Arch Linux distribution.
+            The server is paid from donations and is available to all Trusted Users and Developers.
+          </p>
+          <p>It runs Arch Linux and packages are built in clean chroots using devtools.</p>
+        </div><!-- #intro -->
+        <div id="news">
+          <!-- <h3>Some text1</h3> #optional for news-->
+        </div> <!-- #news -->
+      </div><!-- #content_left -->
+    </div>
+    <div id="content-right">
+      <div id="pkg-updates" class="widget box">
+        <h3>TU/Dev User Dirs</h3>
+        <ul>
+END
+
+cd /
+sudo -u http find /home -mindepth 1 -maxdepth 1 \
+  -exec test -r {}/public_html \; \
+  -printf '           <li><a href="/~%P">%P</a></li>\n' \
+  | sort >> ${target}.tmp
+
+cat >>${target}.tmp <<END
+        </ul>
+      </div>
+    </div>
+    <div id="footer">
+      <p>
+        Copyright &copy; 2002-2016
+        <a href="mailto:jvinet@zeroflux.org" title="Contact Judd Vinet">Judd Vinet</a>
+        and <a href="mailto:aaron@archlinux.org" title="Contact Aaron Griffin">Aaron Griffin</a>.
+      </p>
+      <p>
+        The Arch Linux name and logo are recognized
+        <a href="https://wiki.archlinux.org/index.php/DeveloperWiki:TrademarkPolicy" title="Arch Linux Trademark Policy">trademarks</a>.
+        Some rights reserved.
+      </p>
+      <p>
+        The registered trademark Linux® is used pursuant to a sublicense from LMI,
+        the exclusive licensee of Linus Torvalds, owner of the mark on a world-wide basis.
+      </p>
+    </div><!-- #footer -->
+  </div><!-- #content -->
+</body>
+</html>
+END
+
+mv ${target}.tmp ${target}
diff --git a/roles/public_html/templates/nginx.d.conf.j2 b/roles/public_html/templates/nginx.d.conf.j2
new file mode 100644
index 000000000..e6d07d21e
--- /dev/null
+++ b/roles/public_html/templates/nginx.d.conf.j2
@@ -0,0 +1,33 @@
+server {
+    listen       80;
+    listen       [::]:80;
+    server_name  {{ public_domain }};
+    root         /srv/public_html;
+
+    include snippets/letsencrypt.conf;
+
+    location ~ ^/~([A-Za-z0-9]+)(/.*)? {
+        alias /home/$1/public_html$2;
+        index index.html index.htm;
+        autoindex on;
+    }
+}
+
+server {
+    listen       443 ssl http2;
+    listen       [::]:443 ssl http2;
+    server_name  {{ public_domain }};
+    root         /srv/public_html;
+
+{% if certfile.stat.exists %}
+    ssl_certificate      /etc/letsencrypt/live/{{ public_domain }}/fullchain.pem;
+    ssl_certificate_key  /etc/letsencrypt/live/{{ public_domain }}/privkey.pem;
+    ssl_trusted_certificate /etc/letsencrypt/live/{{ public_domain }}/chain.pem;
+{% endif %}
+
+    location ~ ^/~([A-Za-z0-9]+)(/.*)? {
+        alias /home/$1/public_html$2;
+        index index.html index.htm;
+        autoindex on;
+    }
+}
-- 
GitLab