EtherCalc role

certbot_on_virtu
Alexandre Iooss 2020-05-09 10:40:50 +02:00
parent fa7f646c9a
commit 21fd284cc5
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
4 changed files with 78 additions and 8 deletions

View File

@ -0,0 +1,52 @@
---
- name: Install APT HTTPS support
apt:
name: apt-transport-https
state: present
update_cache: true
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Import NodeJS GPG signing key
apt_key:
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
state: present
validate_certs: false
register: apt_key_result
retries: 3
until: apt_key_result is succeeded
- name: Add NodeJS repository
apt_repository:
repo: "deb https://deb.nodesource.com/node_10.x {{ ansible_lsb.codename }} main"
state: present
update_cache: true
- name: Install Redis and NPM
apt:
update_cache: true
name:
- redis-server
- nodejs
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Install EtherCalc systemd unit
template:
src: systemd/system/ethercalc.service.j2
dest: /etc/systemd/system/ethercalc.service
- name: Activate EtherCalc service
systemd:
daemon_reload: true
name: ethercalc
enabled: true
state: started
- name: Indicate role in motd
template:
src: update-motd.d/05-service.j2
dest: /etc/update-motd.d/05-ethercalc
mode: 0755

View File

@ -0,0 +1,17 @@
{{ ansible_header | comment }}
[Unit]
Description=Ethercalc
Require=redis-server.service
[Service]
Type=simple
Restart=on-failure
RestartSec=3
User=redis
Group=redis
PIDFile=/var/run/ethercalc.pid
ExecStart=/usr/bin/ethercalc --host 10.231.136.203 --port 8000
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,3 @@
#!/usr/bin/tail +14
{{ ansible_header | comment }}
> EtherCalc a été déployé sur cette machine. Voir /usr/lib/node_modules/ethercalc/.

View File

@ -16,20 +16,18 @@
roles: roles:
- framadate - framadate
# Deploy CAS
- hosts: cas-srv.adm.crans.org - hosts: cas-srv.adm.crans.org
roles: roles: ["django-cas"]
- django-cas
# Deploy Gitlab CI # Deploy Gitlab CI
- hosts: gateau.adm.crans.org - hosts: gateau.adm.crans.org
roles: roles: ["docker"]
- docker
# Deploy TV
- hosts: cochon.adm.crans.org - hosts: cochon.adm.crans.org
roles: roles: ["mumudvb"]
- mumudvb
- hosts: ethercalc-srv.adm.crans.org
roles: ["ethercalc"]
# Deploy OwnCloud # Deploy OwnCloud
- hosts: owncloud-srv.adm.crans.org - hosts: owncloud-srv.adm.crans.org