Update ansible.

This commit is contained in:
Kaitlyn Parkhurst 2021-07-12 23:11:07 -07:00
parent ce5c449361
commit 474f00da8e
3 changed files with 60 additions and 2 deletions

View file

@ -0,0 +1,17 @@
[Unit]
Description=MeshMage Worker Service
After=network.target
[Service]
ExecStart=/home/meshmage/perl5/bin/plx ./script/meshmage_web minion worker
Restart=on-failure
User=meshmage
Group=meshmage
WorkingDirectory=/home/meshmage/MeshMage/Web
Environment="PERL_MB_OPT=--install_base \"/home/meshmage/perl5\""
Environment="PERL_MM_OPT=INSTALL_BASE=/home/meshmage/perl5"
Environment="PERL5LIB=/home/meshmage/perl5/lib/perl5"
Environment="PATH=/home/meshmage/perl5/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,17 @@
[Unit]
Description=MeshMage Web Service
After=network.target
[Service]
ExecStart=/home/meshmage/perl5/bin/plx ./script/meshmage_web daemon
Restart=on-failure
User=meshmage
Group=meshmage
WorkingDirectory=/home/meshmage/MeshMage/Web
Environment="PERL_MB_OPT=--install_base \"/home/meshmage/perl5\""
Environment="PERL_MM_OPT=INSTALL_BASE=/home/meshmage/perl5"
Environment="PERL5LIB=/home/meshmage/perl5/lib/perl5"
Environment="PATH=/home/meshmage/perl5/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
[Install]
WantedBy=multi-user.target

View file

@ -228,6 +228,30 @@
become: true become: true
become_user: meshmage become_user: meshmage
# Setup services files for meshmage - name: Install meshmage.service file.
copy:
dest: /etc/systemd/system/meshmage.service
src: "{{ role_path }}/files/meshmage.service"
owner: root
group: root
mode: 0644
# Enable services for meshmage web / worker - name: Install meshmage-worker.service file.
copy:
dest: /etc/systemd/system/meshmage-worker.service
src: "{{ role_path }}/files/meshmage-worker.service"
owner: root
group: root
mode: 0644
- name: Start MeshMage
service:
name: meshmage
state: started
enabled: true
- name: Start MeshMage-Worker
service:
name: meshmage-worker
state: started
enabled: true