Add systemd service files for the supybots, switch prod to limnoria
This commit is contained in:
parent
e59eb551a8
commit
0a705cc2f3
3 changed files with 56 additions and 17 deletions
14
roles/supybot/files/ursabot.service
Normal file
14
roles/supybot/files/ursabot.service
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[Unit]
|
||||||
|
Description=ursabot irc bot
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=daemon
|
||||||
|
Group=daemon
|
||||||
|
ExecStart=/usr/bin/supybot /var/lib/ursabot/conf/ursabot.conf
|
||||||
|
Restart=always
|
||||||
|
WorkingDirectory=/srv/web/meetbot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
14
roles/supybot/files/zodbot.service
Normal file
14
roles/supybot/files/zodbot.service
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[Unit]
|
||||||
|
Description=zodbot irc bot
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=daemon
|
||||||
|
Group=daemon
|
||||||
|
ExecStart=/usr/bin/supybot /var/lib/zodbot/conf/zodbot.conf
|
||||||
|
Restart=always
|
||||||
|
WorkingDirectory=/srv/web/meetbot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -1,16 +1,3 @@
|
||||||
- name: install supybot package
|
|
||||||
yum: pkg={{ item }} state=present
|
|
||||||
with_items:
|
|
||||||
- supybot-gribble
|
|
||||||
- supybot-fedora
|
|
||||||
- supybot-koji
|
|
||||||
- supybot-notify
|
|
||||||
- supybot-pinglists
|
|
||||||
- supybot-fedmsg
|
|
||||||
- packagedb-cli
|
|
||||||
tags: supybot
|
|
||||||
when: env == "production"
|
|
||||||
|
|
||||||
- name: install limnoria package
|
- name: install limnoria package
|
||||||
yum: pkg={{ item }} state=present enablerepo=epel-testing
|
yum: pkg={{ item }} state=present enablerepo=epel-testing
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -23,7 +10,6 @@
|
||||||
- packagedb-cli
|
- packagedb-cli
|
||||||
- python-simplejson
|
- python-simplejson
|
||||||
tags: supybot
|
tags: supybot
|
||||||
when: env == "staging"
|
|
||||||
|
|
||||||
- set_fact: botname={{ botnames[env] }}
|
- set_fact: botname={{ botnames[env] }}
|
||||||
|
|
||||||
|
@ -74,9 +60,34 @@
|
||||||
- meetbot
|
- meetbot
|
||||||
- supybot
|
- supybot
|
||||||
|
|
||||||
- name: setup cron job to start {{ botname }}/ursabot on boot
|
- name: setup zodbot systemd service file (prod)
|
||||||
cron: name={{ botname }} special_time=reboot job='cd /srv/web/meetbot; supybot -d /var/lib/{{ botname }}/conf/{{ botname }}.conf' user=daemon
|
copy: src=zodbot.service dest=/etc/systemd/system/zodbot.service
|
||||||
|
notify:
|
||||||
|
- reload systemd
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- supybot
|
||||||
|
when: env =! "staging"
|
||||||
|
|
||||||
|
- name: enable zodbot service (prod)
|
||||||
|
service: name=zodbot state=started enabled=true
|
||||||
|
when: env =! "staging"
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- supybot
|
||||||
|
|
||||||
|
- name: setup ursabot systemd service file (stg)
|
||||||
|
copy: src=ursabot.service dest=/etc/systemd/system/ursabot.service
|
||||||
|
notify:
|
||||||
|
- reload systemd
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- supybot
|
||||||
|
when: env == "staging"
|
||||||
|
|
||||||
|
- name: enable ursabot service (stg)
|
||||||
|
service: name=ursabot state=started enabled=true
|
||||||
|
when: env == "staging"
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- meetbot
|
|
||||||
- supybot
|
- supybot
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue