diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-04-21 01:09:28 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-04-21 10:21:23 +0200 |
commit | d5f4e591f9cfedefdd4a71515b46c78e9a77e2ad (patch) | |
tree | 58624f2d05cf74587ecf74fba92618f0c60b4bc9 /modules/profile | |
parent | 9f430d51eec914c00249b9dc73e82500d312d7af (diff) | |
download | Puppet-d5f4e591f9cfedefdd4a71515b46c78e9a77e2ad.tar.gz Puppet-d5f4e591f9cfedefdd4a71515b46c78e9a77e2ad.tar.zst Puppet-d5f4e591f9cfedefdd4a71515b46c78e9a77e2ad.zip |
Add redis to cryptoportfolio
Diffstat (limited to 'modules/profile')
-rw-r--r-- | modules/profile/files/redis/socket_shutdown_override.conf | 3 | ||||
-rw-r--r-- | modules/profile/manifests/redis.pp | 34 |
2 files changed, 37 insertions, 0 deletions
diff --git a/modules/profile/files/redis/socket_shutdown_override.conf b/modules/profile/files/redis/socket_shutdown_override.conf new file mode 100644 index 0000000..8b73264 --- /dev/null +++ b/modules/profile/files/redis/socket_shutdown_override.conf | |||
@@ -0,0 +1,3 @@ | |||
1 | [Service] | ||
2 | ExecStop= | ||
3 | ExecStop=/usr/bin/redis-cli -s /run/redis/redis.sock shutdown | ||
diff --git a/modules/profile/manifests/redis.pp b/modules/profile/manifests/redis.pp new file mode 100644 index 0000000..79871b1 --- /dev/null +++ b/modules/profile/manifests/redis.pp | |||
@@ -0,0 +1,34 @@ | |||
1 | class profile::redis { | ||
2 | file { '/etc/systemd/system/redis.service.d/': | ||
3 | ensure => "directory", | ||
4 | path => "/etc/systemd/system/redis.service.d/", | ||
5 | mode => "0755", | ||
6 | owner => "root", | ||
7 | group => "root" | ||
8 | } -> | ||
9 | file { '/etc/systemd/system/redis.service.d/socket_shutdown.conf': | ||
10 | ensure => "present", | ||
11 | path => "/etc/systemd/system/redis.service.d/noclear.conf", | ||
12 | source => 'puppet:///modules/profile/redis/socket_shutdown_override.conf', | ||
13 | recurse => true, | ||
14 | mode => "0644", | ||
15 | owner => "root", | ||
16 | group => "root", | ||
17 | notify => Service["redis"], | ||
18 | } | ||
19 | |||
20 | package { "ruby-augeas": | ||
21 | ensure => installed, | ||
22 | } -> | ||
23 | class { '::redis': | ||
24 | unixsocket => "/run/redis/redis.sock", | ||
25 | unixsocketperm => "777", | ||
26 | ulimit => false, | ||
27 | daemonize => false, | ||
28 | config_file => "/etc/redis.conf", | ||
29 | config_file_orig => "/etc/redis.conf.puppet", | ||
30 | port => 0, | ||
31 | require => File["/etc/systemd/system/redis.service.d/socket_shutdown.conf"], | ||
32 | } | ||
33 | |||
34 | } | ||