Skip to content
Snippets Groups Projects
Commit d0d97abf authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Merge branch 'fs'

parents 2844599d c5d9386b
No related branches found
No related tags found
No related merge requests found
......@@ -55,3 +55,6 @@
[submodule "modules/network"]
path = modules/network
url = https://github.com/example42/puppet-network.git
[submodule "modules/chmod_r"]
path = modules/chmod_r
url = https://github.com/declarativesystems/chmod_r
# Handle GECOS (passwd comment field)
# https://en.wikipedia.org/wiki/Gecos_field
function gecos(
Hash[String,String,0,5] $hash = {}
) {
$default_hash = {
'name' => '',
'room' => '',
'phone1' => '',
'phone2' => '',
'mail' => '',
}
$rh = $default_host + $hash
join([
$rh['name'],
$rh['room'],
$rh['phone1'],
$rh['phone2'],
$rh['mail'],
], ',')
}
......@@ -56,7 +56,7 @@ node 'liufs' {
# NOTE wordpress plugins aren't handled here, but by wordpress
# itself. The important directories seems to be
# wp-content/{plugins,themes}.
wordpress { 'liufs-test':
wordpress { 'liufs':
extra_url => [ 'liuformulastudent.se', ],
webserver => apache,
}
......
......@@ -41,11 +41,7 @@ class baseinstall {
user { 'lysroot':
ensure => 'present',
comment => gecos({
name => 'Lysator admin account',
room => '~',
mail => 'root@lysator.liu.se',
}),
comment => 'Lysator admin account,~,,,root@lysator.liu.se',
membership => 'minimum',
groups => [
'sudo',
......
Subproject commit 8e459b8dcf93d046c1a8a2810cac6f34e10cff6e
......@@ -8,6 +8,10 @@ class liufs::users {
match => '^SHELL=',
}
mysql_plugin { 'auth_socket':
ensure => present,
}
# change
# ensure => present
# to
......@@ -23,6 +27,17 @@ class liufs::users {
]
}
mysql_user { 'hugo@localhost':
ensure => present,
plugin => 'auth_socket'
}
mysql_grant { 'hugo@localhost/*.*':
require => Mysql_User['hugo@localhost'],
privileges => [ 'SELECT', ],
user => 'hugo@localhost',
table => '*.*',
}
user { 'green':
ensure => 'present',
membership => 'inclusive',
......@@ -46,4 +61,21 @@ class liufs::users {
'www-data',
]
}
mysql_user { 'fabian@localhost':
ensure => present,
plugin => 'auth_socket'
}
mysql_grant { 'fabian@localhost/*.*':
require => Mysql_User['fabian@localhost'],
privileges => [ 'SELECT', ],
user => 'fabian@localhost',
table => '*.*',
}
mysql_grant { 'fabian@localhost/wp-liufs.*':
require => Mysql_User['fabian@localhost'],
privileges => [ 'ALL' ],
user => 'fabian@localhost',
table => 'wp-liufs.*',
}
}
......@@ -31,7 +31,6 @@ define wordpress (
ensure => directory,
source => "${wp_root}/wordpress",
recurse => remote,
# TODO ensure that all files keep belonging to www-data
owner => 'www-data',
group => 'www-data',
}
......@@ -48,6 +47,10 @@ define wordpress (
}),
}
chmod_r { $wp_path:
want_mode => '0664',
}
file { "/var/wordpress_dump/${url}":
ensure => directory,
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment