Skip to content

Commit 64a4f2a

Browse files
committed
facts.pp: use localhost instead of 127.0.0.1
This way we don't discriminate against IPv6-only configurations.
1 parent b4a0ab1 commit 64a4f2a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

manifests/facts.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
$json_packages = $jira::params::json_packages,
2222
# lint:ignore:parameter_order
2323
$uri = $jira::tomcat_address ? {
24-
undef => '127.0.0.1',
24+
undef => 'localhost',
2525
default => $jira::tomcat_address,
2626
},
2727
# lint:endignore

spec/classes/jira_facts_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
regexp_pe = %r{^#\!/opt/puppet/bin/ruby$}
1212
regexp_oss = %r{^#\!/opt/puppetlabs/puppet/bin/ruby$}
13-
regexp_url = %r{http://127.0.0.1\:8080/rest/api/2/serverInfo}
13+
regexp_url = Regexp.new(Regexp.escape('http://localhost:8080/rest/api/2/serverInfo'))
1414
external_fact_file = '/etc/puppetlabs/facter/facts.d/jira_facts.rb'
1515

1616
it { is_expected.to contain_file(external_fact_file) }
@@ -48,7 +48,7 @@
4848

4949
it do
5050
is_expected.to contain_file(external_fact_file). \
51-
with_content(%r{ url = 'http://127.0.0.1:8080/jira})
51+
with_content(%r{ url = 'http://localhost:8080/jira})
5252
end
5353
end
5454
end

0 commit comments

Comments
 (0)