Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
systemd
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
Service Desk
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
webarch
systemd
Commits
035f1901
Verified
Commit
035f1901
authored
1 year ago
by
Chris Croome
Browse files
Options
Downloads
Patches
Plain Diff
Fix usage example and ensure that systemd_unit is defined
parent
3210084e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#26851
passed
1 year ago
Stage: lint
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+6
-2
6 additions, 2 deletions
README.md
meta/argument_specs.yml
+1
-1
1 addition, 1 deletion
meta/argument_specs.yml
tasks/unit_present.yml
+5
-0
5 additions, 0 deletions
tasks/unit_present.yml
with
12 additions
and
3 deletions
README.md
+
6
−
2
View file @
035f1901
...
...
@@ -165,7 +165,7 @@ conf:
Network
:
Address
:
-
192.168.0.2/24
-
192.168.0.3/24
-
192.168.0.3/24
```
The list items are are converted into duplicated keys:
...
...
@@ -230,8 +230,12 @@ This role can be included in another role along these lines (this has been based
ansible.builtin.include_role
:
name
:
systemd
tasks_from
:
unit_present.yml
loop
:
"
{{
docker_systemd_units
}}"
loop_control
:
loop_var
:
systemd_unit
label
:
"
{{
systemd_unit.name
}}"
vars
:
systemd_units
:
docker_
systemd_units
:
-
name
:
docker-compose
state
:
enabled
files
:
...
...
This diff is collapsed.
Click to expand it.
meta/argument_specs.yml
+
1
−
1
View file @
035f1901
...
...
@@ -94,7 +94,7 @@ argument_specs:
options
:
systemd_unit
:
type
:
dict
required
:
fals
e
required
:
tru
e
description
:
A single systemd unit.
options
:
files
:
...
...
This diff is collapsed.
Click to expand it.
tasks/unit_present.yml
+
5
−
0
View file @
035f1901
...
...
@@ -20,6 +20,11 @@
var
:
systemd_unit
verbosity
:
2
-
name
:
The systemd_unit variable needs to be defined
ansible.builtin.assert
:
that
:
-
systemd_unit is defined
-
name
:
Include the package install tasks when defined
ansible.builtin.include_tasks
:
pkg_present.yml
loop
:
"
{{
systemd_unit.pkgs
}}"
...
...
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