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

Commit e7ac668

Browse files
author
Sebastian Gumprich
committed
update testing method
use default.yml in repo for testing consolidate kitchen vars
1 parent 004dbca commit e7ac668

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ Berksfile.lock
1111

1212
ansible.cfg
1313
hosts
14-
default.yml

.kitchen.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ provisioner:
99
require_ansible_omnibus: true
1010
require_chef_for_busser: false
1111
require_ruby_for_busser: false
12+
ansible_verbose: true
13+
ansible_diff: true
14+
roles_path: ../ansible-ssh-hardening/
15+
playbook: default.yml
16+
1217
platforms:
1318
- name: ubuntu-12.04
1419
driver_config:
@@ -50,18 +55,7 @@ verifier:
5055
name: inspec
5156
suites:
5257
- name: ansible_1.9
53-
hosts: all
54-
ansible_verbose: true
55-
ansible_diff: true
56-
roles_path: ../ansible-ssh-hardening/
5758
provisioner:
58-
playbook: test/integration/playbooks/default.yml
5959
ansible_version: 1.9.4
6060
- name: ansible_latest
61-
hosts: all
62-
ansible_verbose: true
63-
ansible_diff: true
64-
roles_path: ../ansible-ssh-hardening/
65-
provisioner:
66-
playbook: test/integration/playbooks/default.yml
6761

default.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
- name: wrapper playbook for kitchen testing "ansible-ssh-hardening" with custom settings
3+
hosts: localhost
4+
roles:
5+
- ansible-ssh-hardening
6+
vars:
7+
network_ipv6_enable: true
8+
ssh_allow_root_with_key: true
9+
ssh_client_password_login: true
10+
ssh_client_cbc_required: true
11+
ssh_server_weak_hmac: true
12+
ssh_client_weak_kex: true
13+
14+
- name: wrapper playbook for kitchen testing "ansible-ssh-hardening" with default settings
15+
hosts: localhost
16+
roles:
17+
- ansible-ssh-hardening

tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- name: test to see if selinux is running
66
command: getenforce
77
register: sestatus
8-
changed_when: false
8+
failed_when: false
99
ignore_errors: true
1010

1111
- name: check the ssh_password policy state

0 commit comments

Comments
 (0)