Skip to content

Commit

Permalink
Merge pull request #2388 from mhashizume/maint/main/smoke-tests-facter
Browse files Browse the repository at this point in the history
(maint) Replace legacy facts in smoke test
  • Loading branch information
mhashizume authored Aug 23, 2023
2 parents 6fb57f7 + 5789eaa commit ff00f87
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ext/smoke/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function start_puppetdb() {
on_master ${master_vm} "puppet resource service puppetdb ensure=running enable=true"
local puppetdb_conf="/etc/puppetlabs/puppet/puppetdb.conf"
on_master ${master_vm} "echo [main] > ${puppetdb_conf}"
on_master ${master_vm} "echo server_urls = https://\`facter fqdn\`:8081 >> ${puppetdb_conf}"
on_master ${master_vm} "echo server_urls = https://\`facter networking.fqdn\`:8081 >> ${puppetdb_conf}"
echo ""
echo ""

Expand Down Expand Up @@ -113,7 +113,7 @@ function install_puppetdb_from_module() {
on_master ${master_vm} "yum install -y ca-certificates"
on_master ${master_vm} "puppet module install puppetlabs-puppetdb"
local site_pp="/etc/puppetlabs/code/environments/production/manifests/site.pp"
FILE="node '\`facter fqdn\`' {
FILE="node '\`facter networking.fqdn\`' {
class { 'puppetdb::globals':
version => '${puppetdb_version}'
}
Expand Down
2 changes: 1 addition & 1 deletion ext/smoke/packages/steps/setup-master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ on_master ${master_vm} "curl -f -O http://builds.delivery.puppetlabs.net/puppets
# FIXME: Might need to parametrize on Java?
on_master ${master_vm} "yum install -y java-11-openjdk-headless"
on_master ${master_vm} "rpm -ivh puppetserver-${server_version}-1.el7.noarch.rpm"
on_master ${master_vm} "echo \`facter ipaddress\` puppet > /etc/hosts"
on_master ${master_vm} "echo \`facter networking.ip\` puppet > /etc/hosts"
echo ""
echo ""

Expand Down
2 changes: 1 addition & 1 deletion ext/smoke/repos/steps/setup-masters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ for master_vm in ${master_vm1} ${master_vm2}; do

echo "STEP: Install puppet-agent on ${which_master}"
on_master ${master_vm} "rpm --quiet --query puppet-agent-${agent_version} || yum install -y puppet-agent-${agent_version}"
on_master ${master_vm} "echo \`facter ipaddress\` puppet > /etc/hosts"
on_master ${master_vm} "echo \`facter networking.ip\` puppet > /etc/hosts"
echo ""
echo ""

Expand Down
2 changes: 1 addition & 1 deletion ext/smoke/steps/setup-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fi
on_agent "rm -rf /etc/puppetlabs/puppet/ssl; sed -i '/puppet/d' /etc/hosts"

echo "STEP: Install the puppet-agent package"
master_ip=`on_master "facter ipaddress" | tail -n 1`
master_ip=`on_master "facter networking.ip" | tail -n 1`
on_agent "echo ${master_ip} puppet >> /etc/hosts"
if [[ "${type}" = "repo" ]]; then
on_agent "rpm -Uvh http://yum.puppetlabs.com/${collection}-release-el-7.noarch.rpm --force"
Expand Down

0 comments on commit ff00f87

Please sign in to comment.