Skip to content

Commit

Permalink
Wait for mount to mount (#7)
Browse files Browse the repository at this point in the history
* systemd wait for efs mount

* make wait optional

* Apply suggestions from code review

Co-authored-by: Steven Dickenson <[email protected]>

Co-authored-by: Steven Dickenson <[email protected]>
  • Loading branch information
sblack4 and sdickenson authored Jan 14, 2022
1 parent 8b9a4e7 commit 6d8df65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ iqserver_rut_logout_url:

# Base directory that iqserver is installed in. The module will create
# an untarred dir, a current symlink, and a sonatype-work dir.
wait_for_sonatypework_mount: true
iqserver_base_dir: "/opt/iqserver"
iqserver_download_base_url: "https://download.sonatype.com/clm/server/"
iqserver_user: "iqserver"
5 changes: 5 additions & 0 deletions templates/etc.systemd.system.iqserver.service.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# {{ ansible_managed }}
[Unit]
Description=Nexus IQ Service
{% if wait_for_sonatypework_mount %}
Requires={{ iqserver_base_dir|replace("/", "-") }}-sonatype\x2dwork.mount
After=network.target {{ iqserver_base_dir|replace("/", "-") }}-sonatype\x2dwork.mount
{% else %}
After=network.target
{% endif %}

[Service]
Type=simple
Expand Down

0 comments on commit 6d8df65

Please sign in to comment.