Compare commits
7 commits
5c0e05394d
...
d7e7e260c2
Author | SHA1 | Date | |
---|---|---|---|
Micke Nordin | d7e7e260c2 | ||
Micke Nordin | 52869ca089 | ||
Micke Nordin | 1a39e0dbec | ||
Micke Nordin | e0c06d4571 | ||
Micke Nordin | f29e074ded | ||
Micke Nordin | c761c56052 | ||
Micke Nordin | 026c5c5d03 |
|
@ -1,6 +1,6 @@
|
|||
# Lets determin who the customer is by looking at the hostname
|
||||
function sunetdrive::get_customer() >> String {
|
||||
$hostnameparts = split($facts['fqdn'],'\.')
|
||||
$hostnameparts = split($facts['networking']['fqdn'],'\.')
|
||||
if $hostnameparts[1] == 'drive' {
|
||||
if $hostnameparts[0] =~ /^gss/ {
|
||||
return 'gss'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Lets determin where we are by looking at the hostname
|
||||
function sunetdrive::get_environment() >> String {
|
||||
$hostname = $facts['fqdn']
|
||||
$hostname = $facts['networking']['fqdn']
|
||||
if $hostname =~ /^.*\.drive\.sunet\.se$/ {
|
||||
if $hostname =~ /^.*\.pilot\.drive\.sunet\.se$/ {
|
||||
return 'pilot'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Lets determin where we are by looking at the hostname
|
||||
function sunetdrive::get_node_number() >> Integer {
|
||||
Integer(regsubst($::fqdn, /^[a-zA-Z\-]+(\d).*$/, '\\1'))
|
||||
Integer(regsubst($facts['networking']['fqdn'], /^[a-zA-Z\-]+(\d).*$/, '\\1'))
|
||||
}
|
||||
|
|
|
@ -38,8 +38,8 @@ define sunetdrive::cloudimage(
|
|||
resolver => ['130.242.80.14', '130.242.80.99'],
|
||||
search => $search,
|
||||
#
|
||||
repo => $::cosmos_repo_origin_url,
|
||||
tagpattern => $::cosmos_tag_pattern,
|
||||
repo => $facts['cosmos_repo_origin_url'],
|
||||
tagpattern => $facts['cosmos_tag_pattern'],
|
||||
#
|
||||
cpus => $cpus,
|
||||
memory => $memory,
|
||||
|
|
|
@ -4,7 +4,7 @@ class sunetdrive::infra_script (
|
|||
$location = undef
|
||||
) {
|
||||
$environment = sunetdrive::get_environment()
|
||||
$customer = "common"
|
||||
$customer = 'common'
|
||||
$config = hiera_hash($environment)
|
||||
$gss_backup_server = $config['gss_backup_server']
|
||||
$lookup_backup_server = $config['lookup_backup_server']
|
||||
|
|
|
@ -10,9 +10,9 @@ class sunetdrive::mariadb (
|
|||
$quorum_id = $facts['networking']['fqdn']
|
||||
$quorum_password = safe_hiera('quorum_password')
|
||||
$db = sunetdrive::db_type { 'base_db':
|
||||
bootstrap => $bootstrap,
|
||||
tag_mariadb => $tag_mariadb,
|
||||
location => $location,
|
||||
bootstrap => $bootstrap,
|
||||
tag_mariadb => $tag_mariadb,
|
||||
location => $location,
|
||||
}
|
||||
file { '/etc/quorum.conf':
|
||||
ensure => file,
|
||||
|
|
|
@ -5,7 +5,7 @@ class sunetdrive::multinode (
|
|||
)
|
||||
{
|
||||
include sunet::packages::yq
|
||||
$myname = $facts['hostname']
|
||||
$myname = $facts['networking']['hostname']
|
||||
$is_multinode = true;
|
||||
$environment = sunetdrive::get_environment()
|
||||
$lb_servers = hiera_hash($environment)['lb_servers']
|
||||
|
@ -278,7 +278,7 @@ MACAddressPolicy=none'
|
|||
$s3_host = $customer_config['s3_host']
|
||||
$s3_usepath = hiera('s3_usepath')
|
||||
$smtpuser = hiera("smtp_user_${environment}")
|
||||
$trusted_domains = [$site_name, $facts['fqdn'], 'localhost']
|
||||
$trusted_domains = [$site_name, $facts['networking']['fqdn'], 'localhost']
|
||||
$tug_office = hiera_array('tug_office')
|
||||
if $customer_config['twofactor_enforced_groups'] {
|
||||
$twofactor_enforced_groups = $customer_config['twofactor_enforced_groups']
|
||||
|
|
|
@ -17,7 +17,7 @@ class sunetdrive::multinode_db(){
|
|||
if $facts["networking"]["fqdn"] =~ /^multinode-db1\.drive\.(test\.){1}sunet\.se$/ {
|
||||
$statistics_secret = safe_hiera('statistics_secret')
|
||||
notify { 'hostmessage':
|
||||
message => "We are on multinode-db1. Set up statistics environment.",
|
||||
message => 'We are on multinode-db1. Set up statistics environment.',
|
||||
}
|
||||
$custdata=$customers.reduce({}) |$memo, $value| {
|
||||
$memo + {$value => lookup($value)}
|
||||
|
|
|
@ -69,7 +69,7 @@ class sunetdrive::scriptreceiver()
|
|||
owner => 'root',
|
||||
group => 'root',
|
||||
}
|
||||
file { "/etc/sudoers.d/99-safer_reboot":
|
||||
file { '/etc/sudoers.d/99-safer_reboot':
|
||||
ensure => file,
|
||||
content => "script ALL=(root) NOPASSWD: /usr/local/bin/safer_reboot\n",
|
||||
mode => '0440',
|
||||
|
|
|
@ -7,7 +7,7 @@ class sunetdrive::sitemonitornaemon() {
|
|||
$tls_servers_with_port = hiera_array('tls_servers_with_port')
|
||||
$nextcloud_version_prod = split(hiera('nextcloud_version_prod'),'[-]')[0]
|
||||
$nextcloud_version_test = split(hiera('nextcloud_version_test'),'[-]')[0]
|
||||
$monitorhost = $::fqdn
|
||||
$monitorhost = $facts['networking']['fqdn']
|
||||
$environment = sunetdrive::get_environment()
|
||||
$influx_passwd = safe_hiera('influx_passwd')
|
||||
$slack_url = safe_hiera('slack_url')
|
||||
|
|
Loading…
Reference in a new issue