diff options
-rw-r--r-- | modules/mga-mirrors/manifests/init.pp | 13 | ||||
-rw-r--r-- | modules/mga-mirrors/templates/mga-mirrors.ini | 4 |
2 files changed, 16 insertions, 1 deletions
diff --git a/modules/mga-mirrors/manifests/init.pp b/modules/mga-mirrors/manifests/init.pp index 97bdc994..0da8832d 100644 --- a/modules/mga-mirrors/manifests/init.pp +++ b/modules/mga-mirrors/manifests/init.pp @@ -15,5 +15,16 @@ class mga-mirrors { mode => 644, notify => Service['apache'], content => template("mga-mirrors/mirrors_vhost.conf") - } + } + + $password = extlookup("mga_mirror_password") + + file { "mga-mirrors.ini": + path => "/etc/mga-mirrors.ini", + ensure => "present", + owner => apache, + group => apache, + mode => 600, + content => template("mga-mirrors/mga-mirrors.ini") + } } diff --git a/modules/mga-mirrors/templates/mga-mirrors.ini b/modules/mga-mirrors/templates/mga-mirrors.ini new file mode 100644 index 00000000..2c83ce92 --- /dev/null +++ b/modules/mga-mirrors/templates/mga-mirrors.ini @@ -0,0 +1,4 @@ +[db] +pgconn=host=pgsql;dbname=mirrors +user=mirrors +password=<%= password %> |