Adding a role for TheRaven

This commit is contained in:
DarkFeather 2021-11-21 04:53:42 -06:00
parent 8f85acce78
commit eb39acaa06
Signed by: DarkFeather
GPG Key ID: 1CC1E3F4ED06F296
3 changed files with 104 additions and 0 deletions

25
roles/TheRaven/README.md Normal file
View File

@ -0,0 +1,25 @@
We run a copy of [TheRaven ircbot](https://foundation.aninix.net/AniNIX/TheRaven) as a service on AniNIX/Core.
# Etymology
Ravens are smart, ubiquitous birds. [DarkFeather](https://foundation.aninix.net/DarkFeather) has chosen them as his avatar, and this bot serves as his IRC emissary and minion.
# Development
You can deploy this service directly with the following invocation:
```
ansible-playbook -i core, -e '{ "role": "TheRaven", "raven": { "ircnetwork": "localhost", "ircport": "6667", "serviceport": "8373" } }' playbooks/one-role.yml
```
# Configuration
Most of the configuration is controlled through the [configuration files](https://foundation.aninix.net/AniNIX/TheRaven/src/branch/main/sample-confs) provided by the package.
Some configuration comes from [the local template](./templates/raven.conf.j2) -- it expects the vault to have a `password.TheRaven` value. The rest of the variables are provided in the -e flag above. These can be set at the host or site level in the inventory.
# Clients
TheRaven can be accessed through any [IRC](../IRC) client -- start with `r.help` to see what commands are available.

View File

@ -0,0 +1,35 @@
---
- name: TheRaven package
become: yes
register: theravenpkg
package:
name: TheRaven
state: present
- name: TheRaven config directory
become: yes
file:
path: /usr/local/etc/TheRaven
owner: raven
group: raven
mode: 0750
state: directory
- name: TheRaven config
become: yes
register: theravenconfig
template:
src: raven.conf.j2
dest: /usr/local/etc/TheRaven/raven.conf
owner: raven
group: raven
mode: 0640
- name: TheRaven service
when: theravenpkg.changed or theravenconfig.changed
become: yes
service:
name: raven.service
state: restarted
enabled: yes

View File

@ -0,0 +1,44 @@
[ Login ]
host={{ raven.ircnetwork }}
port={{ raven.ircport }}
username=TheRaven
password={{ passwords.TheRaven }}
netListenerPort={{ raven.serviceport }}
[ Whitelist ]
DarkFeather
DF|Away
Connor
[ Blacklist ]
[ Notifications ]
#lobby=Connor
#lobby=DarkFeather
[ Rooms ]
lobby
martialarts
mapuzzle
maworkouts
fencing
bjj
ccw
sharingan
foundation
[ Searches ]
r.google|http://google.com/search?q=|+|Google
r.image|http://images.google.com/search?tbm=isch&q=|+|Google Images
r.wiki|http://en.wikipedia.org/wiki/|_|Wikipedia
r.sound|http://www.soundcloud.com/search?q=|%20|SoundCloud
r.dict|http://www.merriam-webster.com/dictionary/|+|Dictionary
r.tropes|http://tvtropes.org/pmwiki/search_result.php?cx=partner-pub-6610802604051523%3Aamzitfn8e7v&cof=FORID%3A10&ie=ISO-8859-1&siteurl=&ref=&ss=&siteurl=tvtropes.org%2F&ref=www.google.com%2F&ss=5135j1581675j28&q=|+|Tropes
r.yt|https://www.youtube.com/results?search_query=|+|YouTube
r.urban|http://www.urbandictionary.com/define.php?term=|+|UrbanDictionary
r.man|http://www.die.net/search/?q=|+|Man-page
r.hoogle|https://www.haskell.org/hoogle/?hoogle=|+|Hoogle
r.so|http://stackoverflow.com/search?q=|+|Stack Overflow
r.aninix|https://aninix.net/|_|AniNIX
r.map|https://www.google.com/maps/search/|+|Google Maps
r.translate|https://translate.google.com/?source=osdd/en/|%20|Google Translate