Skip to content

Commit

Permalink
Merge pull request #11 from alexjfisher/issue_2
Browse files Browse the repository at this point in the history
Make service subscribe to keyfile
  • Loading branch information
bastelfreak authored Jun 17, 2019
2 parents b57abbe + db6269c commit fff2be6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion manifests/tunnel.pp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@
service { "spiped-${title}":
ensure => running,
enable => true,
subscribe => Systemd::Unit_file["spiped-${title}.service"],
subscribe => [
Systemd::Unit_file["spiped-${title}.service"],
File[$keyfile],
],
require => Package['spiped'],
}
}
2 changes: 1 addition & 1 deletion spec/defines/spiped_tunnel_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
is_expected.to contain_service('spiped-redis').with(
ensure: 'running',
enable: true
).that_requires('Package[spiped]').that_subscribes_to('Systemd::Unit_file[spiped-redis.service]')
).that_requires('Package[spiped]').that_subscribes_to(['Systemd::Unit_file[spiped-redis.service]', 'File[/etc/spiped/redis.key]'])
}
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/spiped_tunnel_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
is_expected.to contain_service('spiped-redis').with(
ensure: 'running',
enable: true
).that_requires('Package[spiped]').that_subscribes_to('Systemd::Unit_file[spiped-redis.service]')
).that_requires('Package[spiped]').that_subscribes_to(['Systemd::Unit_file[spiped-redis.service]', 'File[/etc/spiped/redis.key]'])
}
end
end
Expand Down

0 comments on commit fff2be6

Please sign in to comment.