diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-08-22 02:16:31 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-08-22 02:16:31 -0400 |
commit | 2ebf71069cadd301cbe48fd131993651cacddfa1 (patch) | |
tree | df8f38573283a316b597ca29c3cec47bb6fe199f /modules/ttrss | |
parent | b9c7804092ea0393d491aaab065d1896d7dca7b5 (diff) | |
download | puppet-tozt-2ebf71069cadd301cbe48fd131993651cacddfa1.tar.gz puppet-tozt-2ebf71069cadd301cbe48fd131993651cacddfa1.zip |
separate out postgres installation
Diffstat (limited to 'modules/ttrss')
-rw-r--r-- | modules/ttrss/manifests/init.pp | 45 | ||||
-rw-r--r-- | modules/ttrss/templates/postgres-service | 3 |
2 files changed, 3 insertions, 45 deletions
diff --git a/modules/ttrss/manifests/init.pp b/modules/ttrss/manifests/init.pp index e7c9d2f..26767c9 100644 --- a/modules/ttrss/manifests/init.pp +++ b/modules/ttrss/manifests/init.pp @@ -1,10 +1,9 @@ -class ttrss($dbpath) { - include systemd +class ttrss { + include postgres; package { [ "tt-rss", - "postgresql", "php-pgsql", "php-fpm", ]: @@ -12,25 +11,6 @@ class ttrss($dbpath) { } file { - $dbpath: - ensure => directory, - owner => 'postgres', - group => 'postgres', - require => Package["postgresql"]; - "$dbpath/data": - ensure => directory, - owner => 'postgres', - group => 'postgres', - require => [ - Package["postgresql"], - File[$dbpath], - ]; - "/etc/systemd/system/postgresql.service.d": - ensure => directory; - "/etc/systemd/system/postgresql.service.d/override.conf": - content => template('ttrss/postgres-service'), - notify => Exec["/usr/bin/systemctl daemon-reload"], - require => File["/etc/systemd/system/postgresql.service.d"]; "/etc/webapps/tt-rss/config.php": source => "puppet:///modules/ttrss/config.php", require => Package["tt-rss"]; @@ -41,26 +21,7 @@ class ttrss($dbpath) { require => [ File["/etc/pacman.d/hooks"], Package["tt-rss"], - ] - } - - exec { "initialize db path": - command => "/usr/bin/initdb -D $dbpath/data", - user => 'postgres', - creates => "$dbpath/data/PG_VERSION", - require => [ - File["$dbpath/data"], - Package["postgresql"], - ]; - } - - service { "postgresql": - ensure => running, - enable => true, - require => [ - Package["postgresql"], - Exec["initialize db path"], - ]; + ]; } exec { "create db user": diff --git a/modules/ttrss/templates/postgres-service b/modules/ttrss/templates/postgres-service deleted file mode 100644 index aa63550..0000000 --- a/modules/ttrss/templates/postgres-service +++ /dev/null @@ -1,3 +0,0 @@ -[Service] -Environment=PGROOT=<%= @dbpath %> -PIDFile=<%= @dbpath %>/data/postmaster.pid |