Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
puppetpublic
base
Commits
95de4bda
Commit
95de4bda
authored
10 years ago
by
Adam Lewenberg
Browse files
Options
Downloads
Patches
Plain Diff
added allow anacron install parameter to base::cron
parent
0c0f93a5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NEWS
+8
-2
8 additions, 2 deletions
NEWS
manifests/cron.pp
+21
-6
21 additions, 6 deletions
manifests/cron.pp
with
29 additions
and
8 deletions
NEWS
+
8
−
2
View file @
95de4bda
UNRELEASED (2015-03-??)
[cron] Add parameter to base::cron to allow anacron package to be
installed (helpful for Ubuntu systems with ubuntu-desktop
package). (adamhl)
release/004.033 (2015-03-13)
release/004.033 (2015-03-13)
Modify the base::ssh::config::sshd define to allow the
Modify the base::ssh::config::sshd define to allow the
specificaton of content or source. This is required to support
specificat
i
on of content or source. This is required to support
host with special ssh requiremens like systems that use duo. (whm)
host with special ssh requiremen
t
s like systems that use duo. (whm)
Fix a missed hyphen in reference to class fragment-template in
Fix a missed hyphen in reference to class fragment-template in
defense.pp. (adamhl)
defense.pp. (adamhl)
...
...
This diff is collapsed.
Click to expand it.
manifests/cron.pp
+
21
−
6
View file @
95de4bda
...
@@ -2,20 +2,35 @@
...
@@ -2,20 +2,35 @@
# be close to calendar days. Also remove anacron, since we don't use it on
# be close to calendar days. Also remove anacron, since we don't use it on
# servers.
# servers.
class
base::cron
{
# allow_install_anacron: if you want to allow the anacron package to be
package
{
'anacron'
:
ensure
=>
absent
}
# installed along with cron, set the parameter to true. This is useful,
# e.g., for Ubuntu as the ubuntu-desktop package depends on anacron.
#
# Note: setting this to true does not install the anacron package, rather
# it simply allows it to be installed.
#
# Default: false.
#
class
base::cron
(
$allow_install_anacron
=
false
)
{
if
(
!
$allow_install_anacron
)
{
package
{
'anacron'
:
ensure
=>
absent
}
}
if
(
$::osfamily
==
'Debian'
)
{
if
(
$::osfamily
==
'Debian'
)
{
$crond
=
'cron'
$crond
=
'cron'
}
}
elsif
(
$::osfamily
==
'RedHat'
)
{
elsif
(
$::osfamily
==
'RedHat'
)
{
$crond
=
'crond'
$crond
=
'crond'
if
(
$::lsbmajdistrelease
==
'6'
)
{
if
(
$::lsbmajdistrelease
==
'6'
)
{
package
{
package
{
'cronie-noanacron'
:
ensure
=>
present
;
'cronie-noanacron'
:
ensure
=>
present
;
'cronie-anacron'
:
ensure
=>
absent
;
'cronie-anacron'
:
ensure
=>
absent
;
}
}
}
}
file
{
[
'/etc/cron.d/dailyjobs'
,
'/etc/cron.d/0hourly'
]:
file
{
[
'/etc/cron.d/dailyjobs'
,
'/etc/cron.d/0hourly'
]:
ensure
=>
absent
ensure
=>
absent
...
@@ -29,7 +44,7 @@ class base::cron {
...
@@ -29,7 +44,7 @@ class base::cron {
ensure
=>
running
,
ensure
=>
running
,
enable
=>
true
,
enable
=>
true
,
}
}
file
{
'/etc/crontab'
:
file
{
'/etc/crontab'
:
content
=>
template
(
'base/cron/crontab.erb'
),
content
=>
template
(
'base/cron/crontab.erb'
),
notify
=>
Service
[
$crond
],
notify
=>
Service
[
$crond
],
...
...
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