Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.

Commit c0e5710

Browse files
authored
Merge pull request #220 from dev-sec/fix_sel
Fix selinux inclusion
2 parents 7907e48 + 53e0e60 commit c0e5710

File tree

7 files changed

+5
-8
lines changed

7 files changed

+5
-8
lines changed

.kitchen.vagrant.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ provisioner:
2020
http_proxy: <%= ENV['http_proxy'] || nil %>
2121
https_proxy: <%= ENV['https_proxy'] || nil %>
2222

23-
transport:
24-
max_ssh_sessions: 5
25-
2623
platforms:
2724
- name: ubuntu-16.04
2825
driver_config:

.kitchen.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ driver:
66
http_proxy: <%= ENV['http_proxy'] || nil %>
77
https_proxy: <%= ENV['https_proxy'] || nil %>
88

9-
transport:
10-
max_ssh_sessions: 5
11-
129
provisioner:
1310
name: ansible_playbook
1411
hosts: all

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ group :integration do
1111
gem 'kitchen-sync'
1212
gem 'kitchen-transport-rsync'
1313
gem 'kitchen-docker'
14+
gem 'inspec', '~> 3'
1415
end
1516

1617
group :tools do

tasks/hardening.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@
7373

7474
- name: include selinux specific tasks
7575
include_tasks: selinux.yml
76-
when: ansible_selinux and ansible_selinux.status != "disabled"
76+
when: ansible_selinux and ansible_selinux.status == "enabled"

tasks/selinux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
- name: install selinux policy
5858
command: semodule -i {{ ssh_custom_selinux_dir }}/ssh_password.pp
5959

60-
when: not ssh_use_pam and ansible_selinux != 'Disabled' and ssh_password_module.stdout.find('ssh_password') != 0
60+
when: not ssh_use_pam and ssh_password_module.stdout.find('ssh_password') != 0
6161

6262
# The following tasks only get executed when selinux is installed, UsePam is 'yes' and the ssh_password module is installed.
6363
# See http://danwalsh.livejournal.com/12333.html for more info

tests/default.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
with_items:
77
- "openssh-clients"
88
- "openssh-server"
9+
- "libselinux-python"
910
ignore_errors: true
1011
- apt: name="{{item}}" state=present update_cache=true
1112
with_items:

tests/default_custom.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
with_items:
77
- "openssh-clients"
88
- "openssh-server"
9+
- "libselinux-python"
910
ignore_errors: true
1011
- apt: name="{{item}}" state=present update_cache=true
1112
with_items:

0 commit comments

Comments
 (0)