mirror of
https://github.com/symkat/MeshMage.git
synced 2024-11-10 17:05:08 +08:00
Update ansible.
This commit is contained in:
parent
ce5c449361
commit
474f00da8e
3 changed files with 60 additions and 2 deletions
17
Ansible/roles/meshmage/files/meshmage-worker.service
Normal file
17
Ansible/roles/meshmage/files/meshmage-worker.service
Normal 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
|
17
Ansible/roles/meshmage/files/meshmage.service
Normal file
17
Ansible/roles/meshmage/files/meshmage.service
Normal 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
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue