forked from mitogen-hq/mitogen
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Refactor sshd configuration into a role
Prep for applying it to macOS 13 GitHub runners. refs mitogen-hq#1186
- Loading branch information
Showing
4 changed files
with
28 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sshd_config_file: /etc/ssh/sshd_config |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
- name: Create login banner | ||
copy: | ||
src: banner.txt | ||
dest: /etc/ssh/banner.txt | ||
mode: u=rw,go=r | ||
|
||
- name: Configure sshd_config | ||
lineinfile: | ||
path: "{{ sshd_config_file }}" | ||
line: "{{ item.line }}" | ||
regexp: "{{ item.regexp }}" | ||
loop: | ||
- line: Banner /etc/ssh/banner.txt | ||
regexp: '^#? *Banner.*' | ||
- line: PermitRootLogin yes | ||
regexp: '.*PermitRootLogin.*' | ||
loop_control: | ||
label: "{{ item.line }}" |