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 7171 - ssh_challengeresponseauthentication
7272 - ssh_google_auth
7373
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-
8174- name : include selinux specific tasks
8275 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 1414 state : present
1515 when : ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
1616
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+
1726- name : check if ssh_password module is already installed
1827 shell : ' set -o pipefail && semodule -l | grep ssh_password'
1928 args :
4857 - name : install selinux policy
4958 command : semodule -i {{ ssh_custom_selinux_dir }}/ssh_password.pp
5059
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
5261
5362# The following tasks only get executed when selinux is installed, UsePam is 'yes' and the ssh_password module is installed.
5463# See http://danwalsh.livejournal.com/12333.html for more info
You can’t perform that action at this time.
0 commit comments