Add nginx conf for pubftp
parent
24018996c0
commit
e2dabd91ed
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
- name: Install NGINX
|
||||
apt:
|
||||
update_cache: true
|
||||
name: nginx
|
||||
register: apt_result
|
||||
retries: 3
|
||||
until: apt_result is succeeded
|
||||
|
||||
- name: Copy configuration files
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
loop:
|
||||
- src: nginx/ftp.j2
|
||||
dest: /etc/nginx/sites-available/ftp
|
||||
- src: html/HEADER.html.j2
|
||||
dest: /pubftp/.html/HEADER.html
|
||||
- src: html/FOOTER.html.j2
|
||||
dest: /pubftp/.html/FOOTER.html
|
||||
- src: html/style.min.css.j2
|
||||
dest: /pubftp/.html/style.min.css
|
||||
|
||||
- name: Indicate role in motd
|
||||
template:
|
||||
src: update-motd.d/05-service.j2
|
||||
dest: /etc/update-motd.d/05-nginx-pubftp
|
||||
mode: 0755
|
|
@ -0,0 +1,21 @@
|
|||
</div></div></div></div>
|
||||
<footer>
|
||||
<div class="row">
|
||||
<nav class="p-footer__nav">
|
||||
<ul class="p-footer__links">
|
||||
<li class="p-footer__item">
|
||||
<a class="p-footer__link" href="https://www.crans.org"><small>Propulsé par le CRANS</small></a>
|
||||
</li>
|
||||
<li class="p-footer__item">
|
||||
<a class="p-footer__link"
|
||||
href="mailto:contact AT crans.org">
|
||||
<small>Nous contacter</small></a>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="u-off-screen">
|
||||
<a href="#">Go to the top of the page</a>
|
||||
</span>
|
||||
</nav>
|
||||
</div>
|
||||
</footer>
|
||||
</body></html>
|
|
@ -0,0 +1,25 @@
|
|||
<!doctype html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<title>CRANS FTP</title>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="description" content="Mirror and CD images provided by the CRANS" />
|
||||
<meta name="author" content="CRANS" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link href='/.html/style.min.css' rel='stylesheet' type='text/css'>
|
||||
<style>
|
||||
body {
|
||||
margin-top: 1em;
|
||||
}
|
||||
[class^="p-heading--"], h1, h2, h3, h4, h5, h6, html {
|
||||
font-family: 'Fira Sans', sans-serif;
|
||||
}
|
||||
</style>
|
||||
<!-- template créée par Canoical pour Ubuntu -->
|
||||
</head>
|
||||
<body>
|
||||
<div id="pageWrapper">
|
||||
<div class="row">
|
||||
<div id="main">
|
||||
<div class='p-table-wrapper'>
|
||||
<a href="https://intranet.crans.org/">← Retour sur l'intranet</a>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,22 @@
|
|||
# {{ ansible_managed }}
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name ftp ftp.* mirror mirror.* archive.ubuntu.com fr.archive.ubuntu.com security.ubuntu.com ftps ftps.*;
|
||||
|
||||
root /pubftp;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
autoindex on;
|
||||
autoindex_exact_size off;
|
||||
add_before_body /.html/HEADER.html;
|
||||
add_after_body /.html/FOOTER.html;
|
||||
}
|
||||
|
||||
location /pub/events/ {
|
||||
mp4;
|
||||
mp4_buffer_size 1m;
|
||||
mp4_max_buffer_size 5m;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/tail +3
|
||||
# {{ ansible_managed }}
|
||||
[0m> [38;5;82mNGINX[0m a été déployé sur cette machine. Voir [38;5;6m/etc/nginx/[0m.
|
|
@ -107,3 +107,4 @@
|
|||
roles:
|
||||
- ftpsync
|
||||
- rsync-mirror
|
||||
- nginx-pubftp
|
||||
|
|
Loading…
Reference in New Issue