This repository was archived by the owner on Dec 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 71
71
- ssh_challengeresponseauthentication
72
72
- ssh_google_auth
73
73
74
- - name : test to see if selinux is installed and running
75
- command : getenforce
76
- register : sestatus
77
- failed_when : false
78
- changed_when : false
79
- check_mode : no
80
-
81
74
- name : include selinux specific tasks
82
75
include_tasks : selinux.yml
83
- when : sestatus.rc == 0
76
+ when : ansible_selinux and ansible_selinux.status != "disabled"
Original file line number Diff line number Diff line change 14
14
state : present
15
15
when : ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
16
16
17
+ - name : " authorize {{ ssh_server_ports }} ports for selinux"
18
+ seport :
19
+ ports : ' {{ item }}'
20
+ proto : tcp
21
+ setype : ssh_port_t
22
+ state : present
23
+ with_items :
24
+ - " {{ ssh_server_ports }}"
25
+
17
26
- name : check if ssh_password module is already installed
18
27
shell : ' set -o pipefail && semodule -l | grep ssh_password'
19
28
args :
48
57
- name : install selinux policy
49
58
command : semodule -i {{ ssh_custom_selinux_dir }}/ssh_password.pp
50
59
51
- when : not ssh_use_pam and sestatus.stdout != 'Disabled' and ssh_password_module.stdout.find('ssh_password') != 0
60
+ when : not ssh_use_pam and ansible_selinux != 'Disabled' and ssh_password_module.stdout.find('ssh_password') != 0
52
61
53
62
# The following tasks only get executed when selinux is installed, UsePam is 'yes' and the ssh_password module is installed.
54
63
# See http://danwalsh.livejournal.com/12333.html for more info
You can’t perform that action at this time.
0 commit comments