Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
apache
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nationellt superdatorcentrum
puppetmodules
apache
Commits
3782c197
Commit
3782c197
authored
1 year ago
by
Thomas Bellman
Browse files
Options
Downloads
Patches
Plain Diff
Add ensure parameter to apache::listen.
This allows users to stop listening to specific URLs (address/ports).
parent
b394d9b4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
manifests/listen.pp
+32
-5
32 additions, 5 deletions
manifests/listen.pp
with
32 additions
and
5 deletions
manifests/listen.pp
+
32
−
5
View file @
3782c197
# Copyright (C) 2014 Thomas Bellman.
# Copyright (C) 2014
-2024
Thomas Bellman.
# Licensed under the GNU LGPL v3+; see the README file for more information.
# Licensed under the GNU LGPL v3+; see the README file for more information.
...
@@ -26,15 +26,42 @@
...
@@ -26,15 +26,42 @@
*
combination
more
than
once
,
so
named
virtual
hosts
need
to
coordinate
*
combination
more
than
once
,
so
named
virtual
hosts
need
to
coordinate
*
the
set
of
listening
addresses
between
themselves
.
This
is
not
*
the
set
of
listening
addresses
between
themselves
.
This
is
not
*
enforced
by
this
definition
,
but
by
Apache
.
*
enforced
by
this
definition
,
but
by
Apache
.
*
*
To
stop
listening
on
a
set
of
URLs
,
specify
the
'ensure'
parameter
*
with
the
value
'absent'
.
If
you
just
remove
the
apache::listen
*
resource
,
the
include
file
containing
the
Listen
directives
will
be
*
removed
,
but
there
will
still
be
an
Include
directive
referencing
it
,
*
and
Apache
httpd
will
refuse
to
start
!
*/
*/
define
apache::listen
(
$urls
)
define
apache::listen
(
$urls
=
false
,
$ensure
=
'present'
,
)
{
{
include
apache::listen::no_global_listen
include
apache::listen::no_global_listen
apache::include_file
{
case
$ensure
"_Listen_
${name}
"
:
{
content
=>
template
(
'apache/listen.erb'
);
'present'
:
{
if
(
$urls
==
false
)
{
fail
(
"Apache::Listen[
${title}
]: Bad urls parameter,
${urls}
"
)
}
apache::include_file
{
"_Listen_
${name}
"
:
ensure
=>
$ensure
,
content
=>
template
(
'apache/listen.erb'
);
}
}
'absent'
:
{
apache::include_file
{
"_Listen_
${name}
"
:
ensure
=>
$ensure
;
}
}
default
:
{
fail
(
"Apache::Listen[
${title}
]: Bad parameter ensure,
${ensure}
"
)
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment