diff --git a/manifests/init.pp b/manifests/init.pp index e8d165c..1cae94d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -5,10 +5,10 @@ $mounts = {}, ) inherits yas3fs::params { - anchor { 'yas3fs::begin': } -> - class { '::yas3fs::package': } -> - class { '::yas3fs::config': } -> - anchor { 'yas3fs::end':} + anchor { 'yas3fs::begin': } + -> class { '::yas3fs::package': } + -> class { '::yas3fs::config': } + -> anchor { 'yas3fs::end':} if !empty($mounts) { create_resources('yas3fs::mount', $mounts) diff --git a/manifests/mount.pp b/manifests/mount.pp index 7ced8bf..4208b34 100644 --- a/manifests/mount.pp +++ b/manifests/mount.pp @@ -45,7 +45,7 @@ exec { "yas3fs_reload_systemd-${name}": # SystemD needs a reload after any unit file change command => 'systemctl daemon-reload', - path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin'], + path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin', '/usr/local/bin'], refreshonly => true, subscribe => File["yas3fs-${name}"], before => Service["s3fs-${name}"], diff --git a/templates/systemd.erb b/templates/systemd.erb index 45fae0d..33723a4 100644 --- a/templates/systemd.erb +++ b/templates/systemd.erb @@ -16,8 +16,8 @@ Environment=AWS_ACCESS_KEY_ID=<%= @aws_access_key_id %> AWS_SECRET_ACCESS_KEY=<% # TODO: systemd requires a fully qualified path... but Puppet doesn't give us a # good way to query what the path to a particular binary is :-/ This may need # some further work, PRs welcome -ExecStart=/usr/bin/yas3fs -f <%= cmd_args %> <%= @s3_url %> <%= @local_path %> -ExecStop=/bin/umount <%= @local_path %> +ExecStart=/usr/bin/env yas3fs -f <%= cmd_args %> <%= @s3_url %> <%= @local_path %> +ExecStop=/usr/bin/env umount <%= @local_path %> RestartSec=5 Restart=on-failure OOMScoreAdjust=-1000