aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mga-mirrors
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2010-11-04 20:34:59 +0000
committerMichael Scherer <misc@mageia.org>2010-11-04 20:34:59 +0000
commit2bf54c20cff127eb7afa2850306a8929b10cab7d (patch)
tree2fe03d0976906a2e104186e7cb0db11732fe3b5c /modules/mga-mirrors
parent19b97db934afc1f58a05ab109c2d494846dc7137 (diff)
downloadpuppet-2bf54c20cff127eb7afa2850306a8929b10cab7d.tar
puppet-2bf54c20cff127eb7afa2850306a8929b10cab7d.tar.gz
puppet-2bf54c20cff127eb7afa2850306a8929b10cab7d.tar.bz2
puppet-2bf54c20cff127eb7afa2850306a8929b10cab7d.tar.xz
puppet-2bf54c20cff127eb7afa2850306a8929b10cab7d.zip
- add the config file in svn
Diffstat (limited to 'modules/mga-mirrors')
-rw-r--r--modules/mga-mirrors/manifests/init.pp13
-rw-r--r--modules/mga-mirrors/templates/mga-mirrors.ini4
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 %>