rearrange a lot
This commit is contained in:
8 files changed
+29
-29
No files matched your search
@@ -5,23 +5,8 @@
|
||||
ansible_user: root
|
||||
alt_ssh_port: 1023
|
||||
name: setup server natsuco
|
||||
|
||||
roles:
|
||||
- kevinnlsamuel.galaxy.sshd.disablepasswd
|
||||
- kevinnlsamuel.galaxy.sshd.altport
|
||||
tasks:
|
||||
- name: harden ssh
|
||||
block:
|
||||
- name: disable password auth
|
||||
include_role:
|
||||
name: kevinnlsamuel.galaxy.sshd.disablepasswd
|
||||
- name: change ssh port
|
||||
when: false
|
||||
template:
|
||||
src: sshd/00-altport.conf
|
||||
dest: /etc/ssh/ssh_config.d/00-altport.conf
|
||||
- name: install semanage
|
||||
dnf:
|
||||
state: present
|
||||
name: policycoreutils-python-utils
|
||||
- name: give sshd access to alt port on selinux
|
||||
register: result_change_to_alt_port
|
||||
ignore_errors: true
|
||||
changed_when: "'already defined' not in result_change_to_alt_port.stdout"
|
||||
command: semanage port -a -t ssh_port_t -p tcp {{ alt_ssh_port }}
|
||||
Reference in new issue
Block a user