Commit df22caf2 authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Setup mysql user.

parent 0cf8267c
......@@ -47,6 +47,27 @@ class profiles::datorhandbok {
# │ <Ok> │
# │ │
# └─────────────────────────────────────────────────────────────────────────────────────────────────┘
# Mariadb gave the following notice on upgrade. Might as well
# explicitly specifify it here
group { 'mysql':
ensure => present,
system => true,
}
user { 'mysql':
ensule => present,
system => true,
gid => 'mysql',
home => '/var/lib/mysql',
}
file { '/var/lib/mysql':
ensure => directory,
owner => mysql,
group => mysql,
mode => '0755',
}
cron { 'backup-mysql':
command => 'TMPFILE=`/bin/mktemp /var/tmp/fulldump.sql.XXX` && /usr/bin/mysqldump --all-databases --events > "$ TMPFILE" && mv "$TMPFILE" /var/lib/mysql-dump/fulldump.sql',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment