Compare commits
5 commits
0bf3ebfc53
...
aade6fb2c7
Author | SHA1 | Date | |
---|---|---|---|
Micke Nordin | aade6fb2c7 | ||
Micke Nordin | f2c31c79cd | ||
Micke Nordin | b79eb5d4bf | ||
Magnus Andersson | 606b14db17 | ||
Magnus Andersson | b4e496bf58 |
|
@ -90,6 +90,11 @@ define sunetdrive::db_type(
|
|||
ok_criteria => ['exit_status=0','max_age=2d'],
|
||||
warn_criteria => ['exit_status=1','max_age=3d'],
|
||||
}
|
||||
file { '/usr/local/bin/mysql':
|
||||
ensure => present,
|
||||
content => template('sunetdrive/mariadb/mysql.erb.sh'),
|
||||
mode => '0744',
|
||||
}
|
||||
file { '/usr/local/bin/size-test':
|
||||
ensure => present,
|
||||
content => template('sunetdrive/mariadb/size-test.erb'),
|
||||
|
|
|
@ -109,12 +109,12 @@ class sunetdrive::script (
|
|||
require => Package['python3'],
|
||||
}
|
||||
file { '/opt/backups':
|
||||
ensure => directory,
|
||||
mode => '0700'
|
||||
ensure => directory,
|
||||
mode => '0700'
|
||||
}
|
||||
file { '/opt/backups/scripts':
|
||||
ensure => directory,
|
||||
mode => '0700'
|
||||
ensure => directory,
|
||||
mode => '0700'
|
||||
}
|
||||
file { '/root/.ssh/':
|
||||
ensure => directory,
|
||||
|
|
4
templates/mariadb/mysql.erb.sh
Normal file
4
templates/mariadb/mysql.erb.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
pw=$(yq -r '.services.db.environment[0]' /opt/mariadb/docker-compose.yml | awk -F '=' '{print $2}')
|
||||
|
||||
docker exec -ti mariadb_db_1 mysql -u root -p"${pw}" "${@}"
|
Loading…
Reference in a new issue