puppet-lint --fix
This commit is contained in:
parent
58af85571b
commit
9b2490e415
|
@ -1,6 +1,6 @@
|
||||||
# Lets determin who the customer is by looking at the hostname
|
# Lets determin who the customer is by looking at the hostname
|
||||||
function sunetdrive::get_customer() >> String {
|
function sunetdrive::get_customer() >> String {
|
||||||
$hostnameparts = split($facts['fqdn'],'\.')
|
$hostnameparts = split($facts['networking']['fqdn'],'\.')
|
||||||
if $hostnameparts[1] == 'drive' {
|
if $hostnameparts[1] == 'drive' {
|
||||||
if $hostnameparts[0] =~ /^gss/ {
|
if $hostnameparts[0] =~ /^gss/ {
|
||||||
return 'gss'
|
return 'gss'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Lets determin where we are by looking at the hostname
|
# Lets determin where we are by looking at the hostname
|
||||||
function sunetdrive::get_environment() >> String {
|
function sunetdrive::get_environment() >> String {
|
||||||
$hostname = $facts['fqdn']
|
$hostname = $facts['networking']['fqdn']
|
||||||
if $hostname =~ /^.*\.drive\.sunet\.se$/ {
|
if $hostname =~ /^.*\.drive\.sunet\.se$/ {
|
||||||
if $hostname =~ /^.*\.pilot\.drive\.sunet\.se$/ {
|
if $hostname =~ /^.*\.pilot\.drive\.sunet\.se$/ {
|
||||||
return 'pilot'
|
return 'pilot'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Lets determin where we are by looking at the hostname
|
# Lets determin where we are by looking at the hostname
|
||||||
function sunetdrive::get_node_number() >> Integer {
|
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'],
|
resolver => ['130.242.80.14', '130.242.80.99'],
|
||||||
search => $search,
|
search => $search,
|
||||||
#
|
#
|
||||||
repo => $::cosmos_repo_origin_url,
|
repo => $facts['cosmos_repo_origin_url'],
|
||||||
tagpattern => $::cosmos_tag_pattern,
|
tagpattern => $facts['cosmos_tag_pattern'],
|
||||||
#
|
#
|
||||||
cpus => $cpus,
|
cpus => $cpus,
|
||||||
memory => $memory,
|
memory => $memory,
|
||||||
|
|
|
@ -4,7 +4,7 @@ class sunetdrive::infra_script (
|
||||||
$location = undef
|
$location = undef
|
||||||
) {
|
) {
|
||||||
$environment = sunetdrive::get_environment()
|
$environment = sunetdrive::get_environment()
|
||||||
$customer = "common"
|
$customer = 'common'
|
||||||
$config = hiera_hash($environment)
|
$config = hiera_hash($environment)
|
||||||
$gss_backup_server = $config['gss_backup_server']
|
$gss_backup_server = $config['gss_backup_server']
|
||||||
$lookup_backup_server = $config['lookup_backup_server']
|
$lookup_backup_server = $config['lookup_backup_server']
|
||||||
|
|
|
@ -5,7 +5,7 @@ class sunetdrive::multinode (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
include sunet::packages::yq
|
include sunet::packages::yq
|
||||||
$myname = $facts['hostname']
|
$myname = $facts['networking']['hostname']
|
||||||
$is_multinode = true;
|
$is_multinode = true;
|
||||||
$environment = sunetdrive::get_environment()
|
$environment = sunetdrive::get_environment()
|
||||||
$lb_servers = hiera_hash($environment)['lb_servers']
|
$lb_servers = hiera_hash($environment)['lb_servers']
|
||||||
|
@ -278,7 +278,7 @@ MACAddressPolicy=none'
|
||||||
$s3_host = $customer_config['s3_host']
|
$s3_host = $customer_config['s3_host']
|
||||||
$s3_usepath = hiera('s3_usepath')
|
$s3_usepath = hiera('s3_usepath')
|
||||||
$smtpuser = hiera("smtp_user_${environment}")
|
$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')
|
$tug_office = hiera_array('tug_office')
|
||||||
if $customer_config['twofactor_enforced_groups'] {
|
if $customer_config['twofactor_enforced_groups'] {
|
||||||
$twofactor_enforced_groups = $customer_config['twofactor_enforced_groups']
|
$twofactor_enforced_groups = $customer_config['twofactor_enforced_groups']
|
||||||
|
|
|
@ -16,7 +16,7 @@ class sunetdrive::multinode_db(){
|
||||||
}
|
}
|
||||||
if $facts["networking"]["fqdn"] =~ /^multinode-db1\.drive\.(test\.){1}sunet\.se$/ {
|
if $facts["networking"]["fqdn"] =~ /^multinode-db1\.drive\.(test\.){1}sunet\.se$/ {
|
||||||
notify { 'hostmessage':
|
notify { 'hostmessage':
|
||||||
message => "We are on multinode-db1. Set up statistics environment.",
|
message => 'We are on multinode-db1. Set up statistics environment.',
|
||||||
}
|
}
|
||||||
$rclone_url = 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'
|
$rclone_url = 'https://downloads.rclone.org/rclone-current-linux-amd64.deb'
|
||||||
$local_path = '/tmp/rclone-current-linux-amd64.deb'
|
$local_path = '/tmp/rclone-current-linux-amd64.deb'
|
||||||
|
|
|
@ -69,7 +69,7 @@ class sunetdrive::scriptreceiver()
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
}
|
}
|
||||||
file { "/etc/sudoers.d/99-safer_reboot":
|
file { '/etc/sudoers.d/99-safer_reboot':
|
||||||
ensure => file,
|
ensure => file,
|
||||||
content => "script ALL=(root) NOPASSWD: /usr/local/bin/safer_reboot\n",
|
content => "script ALL=(root) NOPASSWD: /usr/local/bin/safer_reboot\n",
|
||||||
mode => '0440',
|
mode => '0440',
|
||||||
|
|
|
@ -7,7 +7,7 @@ class sunetdrive::sitemonitornaemon() {
|
||||||
$tls_servers_with_port = hiera_array('tls_servers_with_port')
|
$tls_servers_with_port = hiera_array('tls_servers_with_port')
|
||||||
$nextcloud_version_prod = split(hiera('nextcloud_version_prod'),'[-]')[0]
|
$nextcloud_version_prod = split(hiera('nextcloud_version_prod'),'[-]')[0]
|
||||||
$nextcloud_version_test = split(hiera('nextcloud_version_test'),'[-]')[0]
|
$nextcloud_version_test = split(hiera('nextcloud_version_test'),'[-]')[0]
|
||||||
$monitorhost = $::fqdn
|
$monitorhost = $facts['networking']['fqdn']
|
||||||
$environment = sunetdrive::get_environment()
|
$environment = sunetdrive::get_environment()
|
||||||
$influx_passwd = safe_hiera('influx_passwd')
|
$influx_passwd = safe_hiera('influx_passwd')
|
||||||
$slack_url = safe_hiera('slack_url')
|
$slack_url = safe_hiera('slack_url')
|
||||||
|
|
Loading…
Reference in a new issue