Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
role-systemd-timer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
SLUB - Referat 2.5
Ansible
role-systemd-timer
Commits
3150cfe5
Commit
3150cfe5
authored
1 year ago
by
hofmann
Browse files
Options
Downloads
Patches
Plain Diff
bugfix vars file
parent
b40f7d01
No related branches found
No related tags found
1 merge request
!1
bugfix vars file
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
defaults/main.yml
+1
-1
1 addition, 1 deletion
defaults/main.yml
tasks/main.yml
+27
-38
27 additions, 38 deletions
tasks/main.yml
with
28 additions
and
39 deletions
vars/timers
.yml
→
defaults/main
.yml
+
1
−
1
View file @
3150cfe5
...
@@ -13,4 +13,4 @@ timers:
...
@@ -13,4 +13,4 @@ timers:
timer_OnActiveSec
:
# relative time after the timer unit was last activated
timer_OnActiveSec
:
# relative time after the timer unit was last activated
timer_OnBootSec
:
# Relative time after the computer was booted
timer_OnBootSec
:
# Relative time after the computer was booted
timer_OnStartupSec
:
# Relative time after systemd was started
timer_OnStartupSec
:
# Relative time after systemd was started
timer_OnUnitActiveSec
:
# Relative time after the service unit was last activated
timer_OnUnitActiveSec
:
# Relative time after the service unit was last activated
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
27
−
38
View file @
3150cfe5
---
---
---
-
name
:
Uploading service file
-
block
:
template
:
src
:
service.j2
-
name
:
Failing when timer_command is undefined
dest
:
"
{{
systemd_base_path
|
default('/etc/systemd/system')
}}/{{
item.key
}}.service"
fail
:
owner
:
"
{{
item.value.timer_user
|
default('root')
}}"
msg
:
Varible timer_command is not defined
group
:
"
{{
item.value.timer_user
|
default('root')
}}"
when
:
item.value.timer_command is undefined
mode
:
0644
with_dict
:
"
{{
timers
}}"
with_dict
:
"
{{
timers
}}"
notify
:
Reload systemd
-
name
:
Uploading service file
template
:
src
:
service.j2
dest
:
"
{{
systemd_base_path
|
default('/etc/systemd/system')
}}/{{
item.key
}}.service"
owner
:
"
{{
item.value.timer_user
|
default('root')
}}"
group
:
"
{{
item.value.timer_user
|
default('root')
}}"
mode
:
0644
with_dict
:
"
{{
timers
}}"
notify
:
Reload systemd
-
name
:
Uploading timer file
template
:
src
:
timer.j2
dest
:
"
{{
systemd_base_path
|
default('/etc/systemd/system')
}}/{{
item.key
}}.timer"
owner
:
"
{{
item.value.timer_user
|
default('root')
}}"
group
:
"
{{
item.value.timer_user
|
default('root')
}}"
mode
:
0644
with_dict
:
"
{{
timers
}}"
notify
:
Reload systemd
-
name
:
Enabl
ing timer
s
-
name
:
Upload
ing timer
file
systemd
:
template
:
name
:
"
{{
item.key
}}.
timer
"
src
:
timer
.j2
state
:
restarted
dest
:
"
{{
systemd_base_path
|
default('/etc/systemd/system')
}}/{{
item.key
}}.timer"
enabled
:
true
owner
:
"
{{
item.value.timer_user
|
default('root')
}}"
masked
:
false
group
:
"
{{
item.value.timer_user
|
default('root')
}}"
daemon_reload
:
true
mode
:
0644
scope
:
"
{{
systemd_scope
|
default('system')
}}"
with_dict
:
"
{{
timers
}}"
with_dict
:
"
{{
timers
}}"
notify
:
Reload systemd
when
:
timers is defined
-
name
:
Enabling timers
\ No newline at end of file
systemd
:
name
:
"
{{
item.key
}}.timer"
state
:
restarted
enabled
:
true
masked
:
false
daemon_reload
:
true
scope
:
"
{{
systemd_scope
|
default('system')
}}"
with_dict
:
"
{{
timers
}}"
\ No newline at end of file
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