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

Commit

Permalink
Merge pull request #220 from dev-sec/fix_sel
Browse files Browse the repository at this point in the history
Fix selinux inclusion
  • Loading branch information
rndmh3ro committed Apr 30, 2019
2 parents 7907e48 + 53e0e60 commit c0e5710
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .kitchen.vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ provisioner:
http_proxy: <%= ENV['http_proxy'] || nil %>
https_proxy: <%= ENV['https_proxy'] || nil %>

transport:
max_ssh_sessions: 5

platforms:
- name: ubuntu-16.04
driver_config:
Expand Down
3 changes: 0 additions & 3 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ driver:
http_proxy: <%= ENV['http_proxy'] || nil %>
https_proxy: <%= ENV['https_proxy'] || nil %>

transport:
max_ssh_sessions: 5

provisioner:
name: ansible_playbook
hosts: all
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ group :integration do
gem 'kitchen-sync'
gem 'kitchen-transport-rsync'
gem 'kitchen-docker'
gem 'inspec', '~> 3'
end

group :tools do
Expand Down
2 changes: 1 addition & 1 deletion tasks/hardening.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@

- name: include selinux specific tasks
include_tasks: selinux.yml
when: ansible_selinux and ansible_selinux.status != "disabled"
when: ansible_selinux and ansible_selinux.status == "enabled"
2 changes: 1 addition & 1 deletion tasks/selinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
- name: install selinux policy
command: semodule -i {{ ssh_custom_selinux_dir }}/ssh_password.pp

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

# The following tasks only get executed when selinux is installed, UsePam is 'yes' and the ssh_password module is installed.
# See http://danwalsh.livejournal.com/12333.html for more info
Expand Down
1 change: 1 addition & 0 deletions tests/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
with_items:
- "openssh-clients"
- "openssh-server"
- "libselinux-python"
ignore_errors: true
- apt: name="{{item}}" state=present update_cache=true
with_items:
Expand Down
1 change: 1 addition & 0 deletions tests/default_custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
with_items:
- "openssh-clients"
- "openssh-server"
- "libselinux-python"
ignore_errors: true
- apt: name="{{item}}" state=present update_cache=true
with_items:
Expand Down

0 comments on commit c0e5710

Please sign in to comment.