From 876c79177a8ff86f7685feb9309adb2d1b842655 Mon Sep 17 00:00:00 2001 From: Anton McClure Date: Thu, 23 May 2019 22:21:16 -0400 Subject: [PATCH] ansible-ize analog --- roles/webserver/files/analog-cron | 3 + roles/webserver/files/etc/analog.cfg | 90 ++++++++++++++++++++++++++++ roles/webserver/tasks/analog.yml | 15 +++++ roles/webserver/tasks/main.yml | 1 + 4 files changed, 109 insertions(+) create mode 100644 roles/webserver/files/analog-cron create mode 100644 roles/webserver/files/etc/analog.cfg create mode 100644 roles/webserver/tasks/analog.yml diff --git a/roles/webserver/files/analog-cron b/roles/webserver/files/analog-cron new file mode 100644 index 0000000..3886667 --- /dev/null +++ b/roles/webserver/files/analog-cron @@ -0,0 +1,3 @@ +#!/bin/bash +# hourly cron job for analog -- https://stats.thunix.net/ +analog -r +1 +4 +5 +6 +7 +D +d +P +p +v diff --git a/roles/webserver/files/etc/analog.cfg b/roles/webserver/files/etc/analog.cfg new file mode 100644 index 0000000..88c20cb --- /dev/null +++ b/roles/webserver/files/etc/analog.cfg @@ -0,0 +1,90 @@ +# Config file for analog +# All sites on thunix +LOGFILE /var/log/apache2/*.log +OUTFILE /var/www/stats.thunix.net/index.html +HOSTNAME "all sites on thunix" +ERRFILE /var/www/stats.thunix.net/errors.txt +REQINCLUDE pages +REQLINKINCLUDE pages +REFLINKINCLUDE * +REDIRREFLINKINCLUDE * +FAILREFLINKINCLUDE * +SUBBROW */* +SUBTYPE *.gz,*.Z +OSCHARTEXPAND & +PAGEINCLUDE *.* +SEARCHENGINE http://*google.*/* q,as_q,as_epq,as_oq +SEARCHENGINE http://*altavista.*/* q +SEARCHENGINE http://*yahoo.*/* p +SEARCHENGINE http://*lycos.*/* query,wfq +SEARCHENGINE http://*aol.*/* query +SEARCHENGINE http://*excite.*/* search +SEARCHENGINE http://*go2net.*/* general +SEARCHENGINE http://*metacrawler.*/* general +SEARCHENGINE http://*msn.*/* q,MT +SEARCHENGINE http://*netscape.*/* search +SEARCHENGINE http://*looksmart.*/* key +SEARCHENGINE http://*webcrawler.*/* qkw,search,searchText +SEARCHENGINE http://*overture.*/* Keywords +SEARCHENGINE http://*teoma.*/* q +SEARCHENGINE http://*infospace.*/* qkw +SEARCHENGINE http://*alltheweb.*/* q +SEARCHENGINE http://*dogpile.*/* q +SEARCHENGINE http://*ask.*/* q,ask +SEARCHENGINE http://*alltheweb.*/* query +SEARCHENGINE http://*northernlight.*/* qr +SEARCHENGINE http://*nlsearch.*/* qr +SEARCHENGINE http://*dmoz.*/* search +SEARCHENGINE http://*/netfind* query +SEARCHENGINE http://*/pursuit query +ROBOTINCLUDE REGEXPI:robot +ROBOTINCLUDE REGEXPI:spider +ROBOTINCLUDE REGEXPI:crawler +ROBOTINCLUDE Googlebot* +ROBOTINCLUDE msnbot* +ROBOTINCLUDE Infoseek* +ROBOTINCLUDE Scooter* +ROBOTINCLUDE *Slurp* +ROBOTINCLUDE *Validator* +ROBOTINCLUDE Ultraseek* +TYPEALIAS .html ".html [Hypertext Markup Language]" +TYPEALIAS .htm ".htm [Hypertext Markup Language]" +TYPEALIAS .shtml ".shtml [Server-parsed HTML]" +TYPEALIAS .ps ".ps [PostScript]" +TYPEALIAS .gz ".gz [Gzip compressed files]" +TYPEALIAS .tar.gz ".tar.gz [Compressed archives]" +TYPEALIAS .jpg ".jpg [JPEG graphics]" +TYPEALIAS .jpeg ".jpeg [JPEG graphics]" +TYPEALIAS .gif ".gif [GIF graphics]" +TYPEALIAS .png ".png [PNG graphics]" +TYPEALIAS .txt ".txt [Plain text]" +TYPEALIAS .cgi ".cgi [CGI scripts]" +TYPEALIAS .pl ".pl [Perl scripts]" +TYPEALIAS .css ".css [Cascading Style Sheets]" +TYPEALIAS .class ".class [Java class files]" +TYPEALIAS .pdf ".pdf [Adobe Portable Document Format]" +TYPEALIAS .zip ".zip [Zip archives]" +TYPEALIAS .hqx ".hqx [Macintosh BinHex files]" +TYPEALIAS .exe ".exe [Executables]" +TYPEALIAS .wav ".wav [WAV sound files]" +TYPEALIAS .avi ".avi [AVI movies]" +TYPEALIAS .arc ".arc [Compressed archives]" +TYPEALIAS .mid ".mid [MIDI sound files]" +TYPEALIAS .mp3 ".mp3 [MP3 sound files]" +TYPEALIAS .ogg ".ogg [OGG sound files]" +TYPEALIAS .doc ".doc [Microsoft Word 97-2003 document]" +TYPEALIAS .doc ".docx [Microsoft Word document]" +TYPEALIAS .doc ".xls [Microsoft Excel 97-2003 document]" +TYPEALIAS .doc ".xlsx [Microsoft Excel document]" +TYPEALIAS .doc ".ppt [Microsoft PowerPoint 97-2003 document]" +TYPEALIAS .doc ".pptx [Microsoft PowerPoint document]" +TYPEALIAS .rtf ".rtf [Rich Text Format]" +TYPEALIAS .mov ".mov [Quick Time movie]" +TYPEALIAS .mpg ".mpg [MPEG movie]" +TYPEALIAS .mpeg ".mpeg [MPEG movie]" +TYPEALIAS .asp ".asp [Classic Active Server Pages]" +TYPEALIAS .asp ".aspx [Active Server Pages]" +TYPEALIAS .jsp ".jsp [Java Server Pages]" +TYPEALIAS .cfm ".cfm [Cold Fusion]" +TYPEALIAS .php ".php [PHP scripts]" +TYPEALIAS .js ".js [JavaScript code]" diff --git a/roles/webserver/tasks/analog.yml b/roles/webserver/tasks/analog.yml new file mode 100644 index 0000000..723d8a1 --- /dev/null +++ b/roles/webserver/tasks/analog.yml @@ -0,0 +1,15 @@ +# Install analog yml file and hourly cron job +--- +- name: Add mirror rsync cron job + copy: + src: ../files/etc/analog.cfg + dest: /etc/analog.cfg + owner: root + mode: 644 + +- name: Add mirror rsync cron job + copy: + src: ../files/analog-cron + dest: /etc/cron.hourly/analog + owner: root + mode: 744 diff --git a/roles/webserver/tasks/main.yml b/roles/webserver/tasks/main.yml index f90bd25..5d0bc56 100644 --- a/roles/webserver/tasks/main.yml +++ b/roles/webserver/tasks/main.yml @@ -7,3 +7,4 @@ - include: codedeploy.yml - include: apache2-mods.yml - include: tor.yml +- include: analog.yml