21 lines
692 B
YAML
21 lines
692 B
YAML
---
|
|
- name: wrapper playbook for kitchen testing "ansible-ssh-hardening" with default settings
|
|
hosts: localhost
|
|
pre_tasks:
|
|
- package: name="{{item}}" state=present
|
|
with_items:
|
|
- "openssh-clients"
|
|
- "openssh-server"
|
|
ignore_errors: true
|
|
- apt: name="{{item}}" state=present update_cache=true
|
|
with_items:
|
|
- "openssh-client"
|
|
- "openssh-server"
|
|
ignore_errors: true
|
|
- file: path="/var/run/sshd" state=directory
|
|
- name: create ssh host keys
|
|
command: "ssh-keygen -A"
|
|
when: not ((ansible_os_family in ['Oracle Linux', 'RedHat']) and ansible_distribution_major_version < '7')
|
|
|
|
roles:
|
|
- ansible-ssh-hardening
|