Skip to content

Commit

Permalink
Merge pull request #12 from 532910/systemd-units-review
Browse files Browse the repository at this point in the history
review systemd units
  • Loading branch information
sergio authored Apr 15, 2022
2 parents 5132ff0 + 2178cab commit 50bb749
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@

- name: Copy regular systemd unit
ansible.builtin.template:
src: "neogo-legacy.service.bin.j2"
src: "neogo-legacy.service.j2"
dest: "/etc/systemd/system/neogo{{ neogo__instance }}.service"
when: not (neogo__use_compose | bool)
notify: [ 'Restart NeoGo{{ neogo__instance }}' ]

- name: Copy dockerized systemd unit
ansible.builtin.template:
src: "neogo-legacy.service.compose.j2"
src: "neogo-legacy_compose.service.j2"
dest: "/etc/systemd/system/neogo{{ neogo__instance }}.service"
when: neogo__use_compose | bool
notify: [ 'Restart NeoGo{{ neogo__instance }}' ]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ ansible_managed | comment }}

[Unit]
Description=Neo Legacy node on neogo{{ neogo__instance }}
Requires=network.target
Expand All @@ -7,12 +9,10 @@ Type=simple
ExecStart={{ neogo__bin_path }} node --{{ neogo__network }} --config-path={{ neogo__conf_dir }}
User={{ neogo__user }}
Group={{ neogo__group }}
WorkingDirectory={{ neogo__data_dir }}
Restart=always
RestartSec=5
StandardError=syslog
SyslogIdentifier=neogo{{ neogo__instance }}
PrivateTmp=true
WorkingDirectory={{ neogo__data_dir }}

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ ansible_managed | comment }}

[Unit]
Description=Neo Legacy node on neogo{{ neogo__instance }} in Docker
Requires=docker.service
Expand Down

0 comments on commit 50bb749

Please sign in to comment.