From 95266f6237df2334741f3ce60050618259452ed4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20D=C3=B6rre?= Date: Sat, 22 Dec 2018 13:19:15 +0100 Subject: [PATCH] add: virtual resource collectors for nginx+pg This makes it possible to define virtual resources (prefixed by an '@' character) in other manifests and have them be automatically added to the correct nodes. For example, a different manifest could define @file and @front_host resources with tag => [nginx], and the collectors added here would automatically add them to the front-nginx node. Change-Id: I8b0fa62ae52632ea228a30bb02fed8bcc2ed8761 --- environments/production/manifests/nginx.pp | 3 +++ environments/production/manifests/postgres-primary.pp | 2 ++ environments/production/manifests/root.pp | 3 +++ 3 files changed, 8 insertions(+) diff --git a/environments/production/manifests/nginx.pp b/environments/production/manifests/nginx.pp index baea15d..9b9c561 100644 --- a/environments/production/manifests/nginx.pp +++ b/environments/production/manifests/nginx.pp @@ -91,4 +91,7 @@ node front-nginx { notify => Service['nginx'], crt => 'gitweb/web' } + + Front_vhost <| tag == nginx |> ~> Service['nginx'] + File <| tag == nginx |> ~> Service['nginx'] } diff --git a/environments/production/manifests/postgres-primary.pp b/environments/production/manifests/postgres-primary.pp index f4e7635..16248a6 100644 --- a/environments/production/manifests/postgres-primary.pp +++ b/environments/production/manifests/postgres-primary.pp @@ -85,4 +85,6 @@ node postgres-primary { target => '/etc/postgresql/9.6/main/postgresql.conf', value => '2' } + Postgresql::Server::Db <| tag == primary |> + Postgresql::Server::Pg_hba_rule <| tag == primary |> } diff --git a/environments/production/manifests/root.pp b/environments/production/manifests/root.pp index 8b80537..9adaee1 100644 --- a/environments/production/manifests/root.pp +++ b/environments/production/manifests/root.pp @@ -233,6 +233,9 @@ if $signerLocation == 'self' { contname => 'quiz', ip => $ips[quiz] } + File <| tag == root |> + Lxc::Container <| tag == root |> + Lxc::Container_bind <| tag == root |> file{'/run/gitweb-socket': ensure => 'directory' } -- 2.39.2