Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
puppet: Switch from top-level fact variables to facts dict, again.
Alex Vandiver235e2eefc8c2
diff --git a/puppet/kandra/manifests/aws_tools.pp b/puppet/kandra/manifests/aws_tools.ppindex 34965eaa5a7..d6d006afdee 100644--- a/puppet/kandra/manifests/aws_tools.pp+++ b/puppet/kandra/manifests/aws_tools.pp@@ -18,7 +18,7 @@ class kandra::aws_tools {}if ! $is_ec2 {- if $::os['architecture'] != 'amd64' {+ if $facts['os']['architecture'] != 'amd64' {# We would need to build aws_signing_helper from sourcefail('Only amd64 hosts supported on non-EC2')}diff --git a/puppet/kandra/manifests/ksplice_uptrack.pp b/puppet/kandra/manifests/ksplice_uptrack.ppindex 641f32e023d..4f611d5a238 100644--- a/puppet/kandra/manifests/ksplice_uptrack.pp+++ b/puppet/kandra/manifests/ksplice_uptrack.pp@@ -14,7 +14,7 @@ class kandra::ksplice_uptrack {mode => '0644',content => template('kandra/uptrack/uptrack.conf.erb'),}- $setup_apt_repo_file = "${::zulip_scripts_path}/lib/setup-apt-repo"+ $setup_apt_repo_file = "${facts['zulip_scripts_path']}/lib/setup-apt-repo"exec{ 'setup-apt-repo-ksplice':command => "${setup_apt_repo_file} --list ksplice",unless => "${setup_apt_repo_file} --list ksplice --verify",diff --git a/puppet/kandra/manifests/profile/base.pp b/puppet/kandra/manifests/profile/base.ppindex 40334c49ea4..03998d3aec8 100644--- a/puppet/kandra/manifests/profile/base.pp+++ b/puppet/kandra/manifests/profile/base.pp@@ -50,7 +50,7 @@ class kandra::profile::base {mode => '0644',source => 'puppet:///modules/kandra/apt/apt.conf.d/50unattended-upgrades',}- if $::os['distro']['release']['major'] == '22.04' {+ if $facts['os']['distro']['release']['major'] == '22.04' {file { '/etc/needrestart/conf.d/zulip.conf':ensure => file,mode => '0644',@@ -83,7 +83,7 @@ class kandra::profile::base {file { '/etc/chrony/chrony.conf':ensure => file,mode => '0644',- source => "puppet:///modules/kandra/chrony-${::os['distro']['release']['major']}.conf",+ source => "puppet:///modules/kandra/chrony-${facts['os']['distro']['release']['major']}.conf",require => Package['chrony'],notify => Service['chrony'],}diff --git a/puppet/kandra/manifests/teleport/base.pp b/puppet/kandra/manifests/teleport/base.ppindex 72857db6ac8..7e1feb8ed19 100644--- a/puppet/kandra/manifests/teleport/base.pp+++ b/puppet/kandra/manifests/teleport/base.pp@@ -1,7 +1,7 @@class kandra::teleport::base {include zulip::supervisor- $setup_apt_repo_file = "${::zulip_scripts_path}/lib/setup-apt-repo"+ $setup_apt_repo_file = "${facts['zulip_scripts_path']}/lib/setup-apt-repo"exec{ 'setup-apt-repo-teleport':command => "${setup_apt_repo_file} --list teleport",unless => "${setup_apt_repo_file} --list teleport --verify",diff --git a/puppet/kandra/manifests/teleport/db.pp b/puppet/kandra/manifests/teleport/db.ppindex 9152526c591..28d17234eb4 100644--- a/puppet/kandra/manifests/teleport/db.pp+++ b/puppet/kandra/manifests/teleport/db.pp@@ -5,6 +5,7 @@class kandra::teleport::db {include kandra::teleport::base+ $fqdn = $facts['networking']['fqdn']$is_ec2 = zulipconf('machine', 'hosting_provider', 'ec2') == 'ec2'$join_token = zulipsecret('secrets', 'teleport_join_token', '')file { '/etc/teleport_db.yaml':diff --git a/puppet/kandra/manifests/vector.pp b/puppet/kandra/manifests/vector.ppindex ee253b278a8..fec109fbf0f 100644--- a/puppet/kandra/manifests/vector.pp+++ b/puppet/kandra/manifests/vector.pp@@ -5,7 +5,7 @@ class kandra::vector {$dir = "/srv/zulip-vector-${version}"$bin = "${dir}/bin/vector"- $arch = $::os['architecture'] ? {+ $arch = $facts['os']['architecture'] ? {'amd64' => 'x86_64','aarch64' => 'aarch64',}diff --git a/puppet/zulip/manifests/external_dep.pp b/puppet/zulip/manifests/external_dep.ppindex 0886528db0a..dea52fbf06a 100644--- a/puppet/zulip/manifests/external_dep.pp+++ b/puppet/zulip/manifests/external_dep.pp@@ -5,11 +5,12 @@ define zulip::external_dep(String $sha256 = '',String $mode = '0755',) {+ $arch = $facts['os']['architecture']if $sha256 == '' {if $zulip::common::versions[$title]['sha256'] =~ Hash {- $sha256_filled = $zulip::common::versions[$title]['sha256'][$::os['architecture']]+ $sha256_filled = $zulip::common::versions[$title]['sha256'][$arch]if $sha256_filled == undef {- err("No sha256 found for ${title} for architecture ${facts['os']['architecture']}")+ err("No sha256 found for ${title} for architecture ${arch}")fail()}} else {diff --git a/puppet/zulip/manifests/postfix_localmail.pp b/puppet/zulip/manifests/postfix_localmail.ppindex 3e5a2270dcb..d86b18dd749 100644--- a/puppet/zulip/manifests/postfix_localmail.pp+++ b/puppet/zulip/manifests/postfix_localmail.pp@@ -2,7 +2,7 @@ class zulip::postfix_localmail {include zulip::snakeoil$postfix_packages = [ 'postfix', ]- $fqdn = $::networking['fqdn']+ $fqdn = $facts['networking']['fqdn']if $fqdn == '' {fail('Your system does not have a fully-qualified domain name defined. See hostname(1).')}