Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sshd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tilman Vatteroth
sshd
Commits
07211341
Commit
07211341
authored
Jul 3, 2022
by
Adrian K.
Browse files
Options
Downloads
Patches
Plain Diff
Fix ansible-lint
parent
3ce38090
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
handlers/main.yml
+2
-2
2 additions, 2 deletions
handlers/main.yml
meta/main.yml
+1
-1
1 addition, 1 deletion
meta/main.yml
tasks/main.yml
+7
-7
7 additions, 7 deletions
tasks/main.yml
with
10 additions
and
10 deletions
handlers/main.yml
+
2
−
2
View file @
07211341
---
-
name
:
start sshd
systemd
:
ansible.builtin.
systemd
:
name
:
sshd
enabled
:
true
state
:
restarted
-
name
:
Delete old config
file
:
ansible.builtin.
file
:
path
:
/etc/ssh/sshd_config
state
:
absent
This diff is collapsed.
Click to expand it.
meta/main.yml
+
1
−
1
View file @
07211341
...
...
@@ -3,7 +3,7 @@ galaxy_info:
author
:
Fachschaft Informatik, TU Dortmund
description
:
Configure the sshd
license
:
MIT
min_ansible_version
:
2.9
min_ansible_version
:
"
2.9
"
platforms
:
-
name
:
Ubuntu
versions
:
...
...
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
7
−
7
View file @
07211341
---
-
name
:
install openssh-server
apt
:
ansible.builtin.
apt
:
name
:
openssh-server
state
:
present
notify
:
start sshd
# Remove every moduli that is unsafer than 3071
-
name
:
remove unsafe moduli
lineinfile
:
ansible.builtin.
lineinfile
:
regexp
:
'
\d*
\d
\d
\d\d\d
(([0-9]\d?\d?)|([1-2]\d\d\d)|(30[0-6]\d)|(3070))
\d
[0-9A-Z]*'
state
:
absent
path
:
/etc/ssh/moduli
-
name
:
Check if sshd_config is already managed in blocks
lineinfile
:
ansible.builtin.
lineinfile
:
path
:
/etc/ssh/sshd_config
line
:
"
#BEGIN
ANSIBLE
MANAGED
SSH
DEFAULTS"
state
:
present
...
...
@@ -22,12 +22,12 @@
notify
:
Delete old config
-
name
:
Load config template
set_fact
:
ansible.builtin.
set_fact
:
sshd_config
:
"
{{
lookup('template',
'templates/sshd_config.conf.j2')
}}"
-
name
:
Create default config
notify
:
start sshd
blockinfile
:
ansible.builtin.
blockinfile
:
path
:
/etc/ssh/sshd_config
block
:
"
{{
sshd_config
}}"
marker
:
"
#{mark}
ANSIBLE
MANAGED
SSH
DEFAULTS"
...
...
@@ -37,7 +37,7 @@
mode
:
0755
-
name
:
Create service override directory
file
:
ansible.builtin.
file
:
path
:
/etc/systemd/system/sshd.service.d
state
:
directory
owner
:
root
...
...
@@ -45,7 +45,7 @@
mode
:
0755
-
name
:
Copy service override
copy
:
ansible.builtin.
copy
:
dest
:
/etc/systemd/system/sshd.service.d/override.conf
content
:
|
[Unit]
...
...
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